Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

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

share|improve this question
2  
In addition to the answer below, see: berryterminal.com/doku.php/berryboot –  George Duckett Aug 30 '12 at 14:11
    
@GeorgeDuckett Nice! Thanks. –  Jivings Aug 30 '12 at 21:09
    
By the way, @Jivings, just found this, you may want to check it out. –  ACarter Dec 12 '12 at 17:47

4 Answers 4

up vote 21 down vote accepted

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

share|improve this answer
    
Thanks for your answer, but I think I'll have to test it before accepting! Seems a bit of a hack. –  Jivings Jun 15 '12 at 13:05
2  
@Jivings It is a hack. =P –  Bryan Dunsmore Jun 15 '12 at 13:07
    
Do you know why the Pi can't use Grub? –  Jivings Jun 15 '12 at 13:08
    
@Jivings No clue. –  Bryan Dunsmore Jun 15 '12 at 14:12
    
I suppose the main reason is that nobody's ported GRUB. The main reason for that is probably that such a loader isn't needed. –  XTL Aug 15 '12 at 8:51

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.

share|improve this answer
    
Can you explain a bit what BerryBoot does? –  bearbin 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 8 '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 at 19:08

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.

share|improve this answer
    
That would be awesome, thanks :) –  Jivings Apr 18 '13 at 7:05
    
@Jivings, Did you use this solution ? Would love to read your feedback –  Suhaib May 12 '13 at 21:18

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

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

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
2  
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  Mark Booth Jan 21 '13 at 16:22
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: blog.gmane.org/gmane.comp.boot-loaders.grub.devel/… –  Max Apr 12 '13 at 11:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.