41

Say I wished to have Debian Squeeze and Arch Linux ARM on my SD card. Would it be possible to dual boot from Grub?

Jivings
  • 22,208
  • 11
  • 88
  • 138

4 Answers4

27

While it is possible to put multiple operating systems on the SD card, there is no boot manager at the moment that runs on the Pi and can handle switching operating systems at runtime.

What you could do though, is to have a shell script, located in /boot, that sets which operating system you want to use on the next boot.

You could accomplish this by storing the boot files for different operating systems in another directory, like so.

  • /boot/debian
  • /boot/fedora
  • /boot/arch

Note: The needed files that have to be copied are /boot/cmdline.txt and /boot/config.txt.

Then have your shell script copy the files from the appropriate directory and into /boot. That way, when you restart it boots into the desired operating system.

References

18

Berryboot is essentially a boot loader designed specifically for the Raspberry Pi that will accomplish this for you:

Berryboot is a simple boot selection screen, allowing you to put multiple Linux distribution on a single SD card. In addition it allows you to put the operating system files on an external USB hard drive instead of on the SD card itself.

Caleb
  • 1,166
  • 11
  • 17
user4349
  • 181
  • 1
  • 2
  • Can you explain a bit what BerryBoot does? – hifkanotiks Jan 10 '13 at 20:34
  • But I have read elsewhere that Berryboot is not a boot-loader in the same way that Grub is, and that everything is virtualised in some way, or that Berryboot runs everything in a chroot environment. Is that true? – Paul Beardsell Apr 08 '13 at 10:11
  • As far as I know Berryboot uses the same kernel (Berryboot kernel) for all distros it handles. So it is not true boot manager, but rather chroot wrapper. – Bartosz Pierzchlewicz May 15 '14 at 19:08
2

Using u-boot(which is used by berry-boot behind the scenes), it is possible to switch between any installed distros to boot at runtime, either using something like askenv for switching between OS's on the same SD or possibly nfs server or with PXE using a different installation on a PXE boot server, though it isn't the most trivial thing to get running. I will try to prepare a tutorial.

Max
  • 217
  • 2
  • 10
-7

I think, it will work. You only have to instal GRUB right with all "settings"...

Marzel
  • 1
  • 1
    What version of GRUB would even run on a Pi? And what would those "settings" be? This answer sounds like you just made something up without knowing what the Pi hardware actually does to boot up. – Caleb Jan 10 '13 at 10:11
  • 1
    Grub was extended to run on top of u-boot on ARM courtesy of linaro. The original patches are from last october, the more recent ones can be found here: http://blog.gmane.org/gmane.comp.boot-loaders.grub.devel/month=20130401 – Max Apr 12 '13 at 11:43