[RELEASE] Reboot2oOS - Reboot once to another OS.

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
teeedubb Offline
Donor
Posts: 2,595
Joined: Mar 2010
Reputation: 62
Location: Down Under
Post: #1
This addon will reboot your linux pc once into another OS of your choice then boot back into linux. It uses GRUB so a working multi-boot setup with GRUB is required. It has been tested with GRUB 1.99 + 2.00, but it will probably work with any distro that uses GRUB. Manual editing of system files and files contained within the addon zip is required to get this addon working (edit icon.png preferably before installation):

script.reboot2oos\addon.xml
Code:
name=
Edit the name= tag to your liking. I currently have it named Games because I reboot into windows to play games and emulators.

script.reboot2oos\default.py
Code:
if dialog.yesno("Reboot to windows...", "XBMC needs to reboot for Games"):
This is the message that is contained in the Yes/No dialog

script.reboot2oos\icon.png
The addon icon can be changed based on your needs. It is currently a Atari 2600 joystick as I reboot into windows to play games.

script.reboot2oos\resources\reboot2oos.sh
Code:
REBOOT_TO=
DEFAULT_OS=
The entries following the above options correspond to your GRUB menu entries - REBOOT_TO= is the OS you want to reboot once to, DEFAULT_OS= is your default OS.
You can get a listing of OS's recognised by GRUB with the following command:
Code:
sed -n '/menuentry/s/.*\(["'\''].*["'\'']\).*/\1/p' /boot/grub/grub.cfg


After installing the addon edit /etc/default/grub and change the line
Code:
GRUB_DEFAULT=
to
Code:
GRUB_DEFAULT=saved
then exit and now you need to edit the sudoers file so the commands that require root can run without a password:
Code:
sudo visudo
At the end of the file after #includedir /etc/sudoers.d add (note you need to edit the username, mine is xbmc):
Code:
%xbmc ALL = NOPASSWD: /sbin/reboot, /usr/sbin/grub-set-default, /usr/sbin/grub-reboot

Now time to make the reboot2oos.sh script executable and update GRUB:
Code:
chmod +x ~/.xbmc/addons/script.reboot2oos/reboot2oos.sh
sudo update-grub

Now select 'Games' under Programs to use the addon and reboot once to the OS of your choice.

DOWNLOAD

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
(This post was last modified: 2014-09-06 02:57 by teeedubb.)
find quote
bam80 Offline
Junior Member
Posts: 25
Joined: Dec 2011
Reputation: 0
Location: Russia
Post: #2
Coool!
I wish that Chromium OS has Reboot button now Wink
find quote
phear Offline
Member
Posts: 70
Joined: Oct 2010
Reputation: 1
Post: #3
This is great.

Using hyperspin in windows for games and Ubuntu for xbmc.
So this is perfect and will test tonight.
find quote
teeedubb Offline
Donor
Posts: 2,595
Joined: Mar 2010
Reputation: 62
Location: Down Under
Post: #4
Here is a new version of resboot2oos.sh that Ive been using, which should make os selection more robust - it uses disks uuid's + other info to select the os to reboot to, instead of the grub menu order, so it should still work after changes to the menu order. Replace the entire contents of the file with:

EDIT: script now in addon

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
(This post was last modified: 2014-09-06 02:58 by teeedubb.)
find quote
tripkip Offline
Fan
Posts: 422
Joined: Aug 2010
Reputation: 2
Location: Belgium
Post: #5
Hi teeedubb,

Thanks for the tip on the OpenELEC forums on your Reboot2oOS addon.
If I understand it correctly, this will not change the default grub entry? (Because I want OE to stay as my default OS and switch to Win8 with this addon, thus after reboot come back into OE automatically.

[Image: all-thin-banner.jpg]


find quote
teeedubb Offline
Donor
Posts: 2,595
Joined: Mar 2010
Reputation: 62
Location: Down Under
Post: #6
It sets the default boot device each time it runs and it can be set to any grub entry For oe you need this version
http://openelec.tv/forum/128-addons/6235...another-os

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
find quote
nimanic Offline
Junior Member
Posts: 34
Joined: May 2013
Reputation: 1
Post: #7
Hi,

do you also have this new version available for Ubuntu XBMC?

I used 0.1.8 before, but now using 14.04LTS this is not working any more.

Thanks Nimanic
(This post was last modified: 2014-09-05 23:48 by nimanic.)
find quote
teeedubb Offline
Donor
Posts: 2,595
Joined: Mar 2010
Reputation: 62
Location: Down Under
Post: #8
The current version should still work with 14.04, although I have been using the script above for a while now which is more robust. Try with that one and post the output of when you run the reboot2oos.sh script from the command line (comment out the 'sudo reboot' line to prevent reboots while testing).

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
(This post was last modified: 2014-09-06 01:40 by teeedubb.)
find quote
teeedubb Offline
Donor
Posts: 2,595
Joined: Mar 2010
Reputation: 62
Location: Down Under
Post: #9
Updated addon in first post to include new reboot2oos.sh script, plus cleaned up included docs.

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
find quote
nimanic Offline
Junior Member
Posts: 34
Joined: May 2013
Reputation: 1
Post: #10
Hi,

form the consol the script is working and restarting the PC.

Out of XBMC the script fails (little window bottom right), but a video which is runing is stoped.

My system is a fresh installed XBMCUbuntu 13.2 based on 14.0LTS.

any idea what i might have missed?
find quote
teeedubb Offline
Donor
Posts: 2,595
Joined: Mar 2010
Reputation: 62
Location: Down Under
Post: #11
Did you make the script executable?

chmod +x ~/.xbmc/addons/script.reboot2oos/reboot2oos.sh

If that doesn't work post your xbmc.log file of when the error occurs.

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
find quote