0

Short question:

Is there any way to have more than one operating system on the same SD Card of my RaspBerry Pi 2 and remotely boot from one to another?

Long question:

I access my RaspBerry Pi 2 remotely via SSH. It have no keyboard nor screen, and uses to be permanently ON.

I use to work with Ubuntu and Kali, each on a different SD card. So, when I want to boot from one to the other, I have to:

  • Remotely power off the RaspBerry.
  • Go to the place where my RaspBerry Pi 2 is (another floor of the building).
  • Change SD card.
  • Power on the RaspBerry.

On desktop computers, I can do all these steps remotely, by installing both Kali and Linux on the same computer, and changing boot options via GRUB.

Is there anything similar on RaspBerry?

Answers for any couple of operating systems accepted, yet Ubuntu/Kali couple preferred.

Some info about the partition structure of the SD card would be fine (one partition for everything? one for boot and another for the operating systems? one for each operating systems?).

1

Yes, you can use

sudo shutdown -r now

to reboot the raspberrypi, and you can change the boot partition by editing

root=/dev/mmcblk0p2

in

/boot/cmdline.txt

and optionally swapping out other files on in /boot like the kernel.

Possible duplicate.

  • 1
    Maybe we can forge a more precise answer by testing a real case, detailing partition structure, operating systems, files to modify and exact modification to them. I could perform the tests. What about meeting us on the chat or so? – Sopalajo de Arrierez Jul 27 '15 at 16:46
  • @SopalajodeArrierez Keep in mind this is your project, not anyone else's. There's nothing wrong with asking for clarification or more pertinent information, but what you are now asking for is someone else to do the project for you. That is beyond the scope of a Q&A site. – goldilocks Jul 28 '15 at 11:52
  • @goldilocks , when I wrote "Maybe we can forge" I did not mean "Maybe you can forge for me". Of course I want to do the job: I have even stupidly posed the same question in two different manners (I forgot it, and I am sorry). But, respecting to what a "Questions & Answer" site may look, I prefer detailed answers like this one: askubuntu.com/questions/48535/… . User1133275 wrote a nearly minimal answer, so, instead of saying him "Please expand" (like usual), I offered myself to work together. That is the real soul of internet. – Sopalajo de Arrierez Jul 28 '15 at 15:20
  • Absolutely. But answers like that take many hours to write, collaboratively or not, and it is unreasonable to expect it to take place for everything. Besides which, this answer is reasonably complete as is (perhaps a few hundred words at most to clarify). There is no need for a specific partition structure, and the files to modify are already indicated -- /boot/cmdline.txt and possibly /boot/config.txt if you wish to use different kernels and or configurations. That's it. That's all. There is nothing more to this. – goldilocks Jul 28 '15 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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