pcmedicjax
Posts: 10
Joined: Tue Jan 05, 2016 3:42 am

Reboot to specific OS based on command

Tue Feb 02, 2016 12:10 am

Is there a way to run a command via ssh that will reboot the RPI2 to a specified OS.
Scenario:
I have an RPI2 with BerryBoot and 3 OSes on it. Raspbian, Openelec and Retropie.

Openelec is the Default OS right now.

What I want to do is if I am watching a movie in kodi and want to play a game after that I want to be able to use my smartphone with raspSSH to tell the RPI to reboot to Retropie. or Raspbian if i want to surf the net.

elatllat
Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

Re: Reboot to specific OS based on command

Tue Feb 02, 2016 3:11 am

Yes you can edit

Code: Select all

root=/dev/mmcblk0p2
in

Code: Select all

/boot/cmdline.txt
though replacing all of boot is recommended

You can also add a button to do that for you in kodi with "Advanced Launcher".
SBC with 32GB RAM: https://hardkernel.com

FAQ : https://raspberrypi.stackexchange.com

Unanswered: https://www.raspberrypi.org/forums/search.php?search_id=unanswered

pcmedicjax
Posts: 10
Joined: Tue Jan 05, 2016 3:42 am

Re: Reboot to specific OS based on command

Tue Feb 02, 2016 3:40 am

I don't think I understand your reply. I am looking for a simple command line thst can be sent via ssh ie;
sudo reboot os1 or
sudo reboot os2 or
sudo reboot os3

I hope this makes sense.

DirkS
Posts: 9902
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Reboot to specific OS based on command

Tue Feb 02, 2016 9:29 am

pcmedicjax wrote:Is there a way to run a command via ssh that will reboot the RPI2 to a specified OS.
https://github.com/maxnet/berryboot/issues/233 and http://rvalbuena.blogspot.com.au/2013/0 ... os-on.html describe what needs t obe done.
If you create a script it's possible to run that script using ssh...

DirkS
Posts: 9902
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Reboot to specific OS based on command

Tue Feb 02, 2016 9:31 am

elatllat wrote:Yes you can edit

Code: Select all

root=/dev/mmcblk0p2
in

Code: Select all

/boot/cmdline.txt
I don't think that will work with berryboot...

Return to “Other projects”