jeanthom / boot2duino

The World's Most Useless Arduino Platform.
BSD Zero Clause License
72 stars 10 forks source link

Could I boot into a boot2duino image from grub? #3

Closed sbrl closed 5 months ago

sbrl commented 2 years ago

I have a bootable flash drive upon which I store ISOs of various Linux distributions and other tools. For example, I can boot into an Ubuntu ISO like this:

menuentry "Ubuntu 20.04 [ejectable]" {
    set isofile="/images/ubuntu-20.04.2-amd64.iso"
    echo ">>> ISO file: ${isofile}"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile setkmap=uk eject noprompt splash toram iso-scan/filename=${isofile} --
    initrd (loop)/casper/initrd.lz
}

....or memtest86+ like so:

menuentry "Memtest 86+ 5.01" {
    linux16 /images/memtest86+.bin
}

(I have a full tutorial on it here: https://starbeamrainbowlabs.com/blog/article.php?article=posts/389-multiboot-2.html)

My question is this: Can I boot into boot2duino images using a similar approach from grub? If so, one could have many images on a single flash drive, and a nice menu to choose between them.

jeanthom commented 2 years ago

Hi, I'm not an expert in OS development (boot2duino was my very first venture into the world of x86 real-mode programming) but I think you could manage to get boot2duino to boot from GRUB with some changes.

There are two things to keep in mind:

Let me know if you manage to get it up and running!