[RELEASE] Reboot2oOS - Reboot once to another OS. - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151) +---- Thread: [RELEASE] Reboot2oOS - Reboot once to another OS. (/showthread.php?tid=172715) Pages:
1
2
|
[RELEASE] Reboot2oOS - Reboot once to another OS. - teeedubb - 2013-12-21 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= script.reboot2oos\default.py Code: if dialog.yesno("Reboot to windows...", "XBMC needs to reboot for Games"): 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\reboot2oos.sh Code: REBOOT_TO= 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= Code: GRUB_DEFAULT=saved Code: sudo visudo 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 Now select 'Games' under Programs to use the addon and reboot once to the OS of your choice. DOWNLOAD RE: [RELEASE] Reboot2oOS - Reboot once to another OS. - bam80 - 2014-04-16 Coool! I wish that Chromium OS has Reboot button now Re: [RELEASE] Reboot2oOS - Reboot once to another OS. - phear - 2014-04-16 This is great. Using hyperspin in windows for games and Ubuntu for xbmc. So this is perfect and will test tonight. RE: [RELEASE] Reboot2oOS - Reboot once to another OS. - teeedubb - 2014-05-08 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 RE: [RELEASE] Reboot2oOS - Reboot once to another OS. - tripkip - 2014-05-14 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. RE: [RELEASE] Reboot2oOS - Reboot once to another OS. - teeedubb - 2014-05-14 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/62352-addon-reboot-once-to-another-os RE: [RELEASE] Reboot2oOS - Reboot once to another OS. - nimanic - 2014-09-05 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 RE: [RELEASE] Reboot2oOS - Reboot once to another OS. - teeedubb - 2014-09-06 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). RE: [RELEASE] Reboot2oOS - Reboot once to another OS. - teeedubb - 2014-09-06 Updated addon in first post to include new reboot2oos.sh script, plus cleaned up included docs. RE: [RELEASE] Reboot2oOS - Reboot once to another OS. - nimanic - 2014-09-06 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? RE: [RELEASE] Reboot2oOS - Reboot once to another OS. - teeedubb - 2014-09-06 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. RE: [RELEASE] Reboot2oOS - Reboot once to another OS. - Claudio.Sjo - 2014-09-24 Hi, I downloaded your addon, and had a look at the reboot script. I have a few comments based on my own experience, and about what I read from this blog http://askubuntu.com/questions/18170/how-to-reboot-into-windows-from-ubuntu as well as from reading Grub2 documentation. At first, if you simply change /etc/default/grub as you suggest GRUB_DEFAULT=0 and modify it to GRUB_DEFAULT=saved this doesn't mean that Grub will boot from the last saved entry. Saving an OS can be achieved by running sudo grub-set-default if GRUB_DEFAULT=saved is set in /etc/default/grub. It may also be saved if GRUB_SAVEDEFAULT=true is also set in /etc/default/grub. In this case, the default OS remains until a new OS is manually selected from the GRUB 2 menu or the grub-set-default command is executed. Otherwise, if you simply set GRUB_DEFAULT=saved and issue a command grub-reboot x the entry x will be used once only, then the next time grub will reboot the default entry. This makes the script much simpler, and you don't need to give grub-set-default the possibility to run as root. What I did with my script was to search for the windows entry in /boot/grub/grub.cfg by using the command grep -i 'windows' /boot/grub/grub.cfg|cut -d"'" -f2 this gives you a string like Windows 7 (loader) (on /dev/sda1) then I wrote my script as #!/bin/bash sudo grub-reboot "Windows 7 (loader) (on /dev/sda1)" sudo reboot It works for me, I'm willing to try my script within your addon. RE: [RELEASE] Reboot2oOS - Reboot once to another OS. - Claudio.Sjo - 2014-09-25 Hi, I tried and it works perfect with the following: 1. Install your app 2. Apply the changes as you describe apart from vi visudo that is going to be Code: %xbmc ALL = NOPASSWD: /sbin/reboot, /usr/sbin/grub-reboot 3. Replace reboot2oos.sh that you provide with mine Code: #!/bin/bash Code: grep -i 'windows' /boot/grub/grub.cfg|cut -d"'" -f2 Thanks for the great job! RE: [RELEASE] Reboot2oOS - Reboot once to another OS. - teeedubb - 2014-09-29 Cool glad you got it working. The DEFAULT_OS entry isnt necessary, though I think I left it in there as a precautionary measure - it doesnt hurt, plus its been a few years since I set this up, there might have been another reason too. RE: [RELEASE] Reboot2oOS - Reboot once to another OS. - teeedubb - 2015-01-01 V0.3.0 in First post: default.py is now helix compatible - back up your old script as it can be used with this version - They WILL be overwritten with this update. |