Auto-reboot into selected OS
Hey guys! I'm running Ubuntu 9.04 on my laptop computer and I also have Window XP, and Windows Vista running alongside on different partition/hard drives.
I just got an idea here! I'd like it if I could selectively decide which OS to boot into when rebooting. The easiest solution (of course) is just to modify the "default OS" number in /etc/grub/boot.lst but I wanted to do a little something more elegant. Since I've been learning Tk and Ruby in a class this semester, I was thinking that something along those lines (or Python and Tk) would be cool and a good use of what I learned. Any comments / ideas on this? Has this already been done? Would there be any way to actually include this in the GNOME sessions menu? Thanks for any feedback! -Russell |
Hmm why do you want to do this?
If for some reason you don't want to use the normal GRUB menu to choose the operating system, in operating systems that have access to your root /boot partion, just change the parameter you refer to in the grub.conf file via code...? Then, on reboot, the selected operating system should start up... |
Well, sometimes shut-downs and reboots can take some time so if I want to, say, reboot and go grab a sammich while it's working, I have to wait until Grub loads up and then select the non-default option that I wanted and then go grab my sammich.
Also, like I said before, I wanted to do this kinda' like a pet project or a proof of I-can-do-it type of thing. The best way to learn is to actually get your mitts dirty in code and actually program something (semi-)useful! |
Quote:
|
Think this can be done by installing a program called kexec
|
Yep, kexec, useful to read alot about it...
NetbootCD-3.0, based off Tinycore-1.3, has a isolinux/syslinux entry for kexec support... LABEL tinycore-kexec menu label ^TinyCoreKexec Support kernel /boot/isolinux/kexec.bzI append initrd=/boot/isolinux/tinycore.gz quiet Try it out, it might work... |
Sweet! I'll check that out as soon as I can! No real reason for re-inventing the wheel, eh?
EDIT: Hmm... after reading the article, I'm not sure that I'd be able to use this if I want to boot from Linux into Windows.... or am I reading this wrong? |
There is another way too. One can put Grub in a partition that can be edited while using a M$ Windows and so a different operating system is fired up in the next reboot.
I have just finished this technique to boot 126 Xp. Everything can be done by a script or a simple program. |
All times are GMT -5. The time now is 09:17 PM. |