LILO reboot a particular image
Dear all.
Supposed I have 3 images in lilo.conf, labeled : dos, linux1, linux2. The default is dos (since my wife need it :). I'm looking for a utility xyz that allows me reboot a particullar image, e.g: # xyz linux1 -> will reboot the linux1 image instead of dos # xyz linux2 -> will reboot the linux2 image instead of dos Please tell me where to find it. Thanks. |
I don't understand the question, elaborate.
|
Hi.
Ok, I'll try again. My LILO has 3 boot images: dos, linux1 (plain kernel) and linux2 (patched kernel). The default is dos. I'm not allowed to change the default, since my wife will scream. Supposed the computer is running linux1, and then I remote login with ssh from far-far away. I want to reboot to the computer with linux2 remotely, without have to come to the computer. What command should I give ? If I give only: # reboot The computer will reboot to DOS (the default), which is not expected. Currently I have to walk to the computer (not so far, but annoying), reboot, then select the lilo menu by hand. Thanks. |
I hope you can choose the OS from the lilo menu.
|
Its a tough one, you could right a script to re-right lilo.conf and install, to change its default.
You could also do something similar in grub, but then its just a text file (No Install). But basically your asking it to remeber something between boots, and then something the Bootloader has to look for, that ain't easy. |
Really ?.
The computer is a Redhat 8.0. If I login locally with GUI, I can shutdown and choose which image to reboot next. But how to do it from console (remote ssh) ? Thanks. |
You can use the
default= option in lilo.conf; set the default to the OS you want to boot in; run lilo and reboot. But you will need to do this each time you intend to reboot into a different partition/OS. |
Ok, I got the idea.
I'll write two perl scripts. One for change it to any image, run by me. One to change it back to DOS, run from rc.local. Thanks folks. |
I believe Mandrake has(d) a feature where you can request it to reboot into Windows. After you shutdown Windows and restart, it boots back into Linux....
wonder how they accomplish it. Coming back to Kocil's earlier question ... is there any utility to do this, without any modifications to lilo.conf. |
I found this the -D option for lilo :
lilo -D new_image It configures lilo to put new_image as a default without changing the lilo.conf. So my dumb scipt is: #!/bin/sh # Boot with a new default echo "1" > /etc/lilo.new lilo -D $1 And I add this to rc.local if [ /etc/lilo.new ]; then rm /etc/lilo.new lilo fi |
that's really a risky way to go about things.... try seeing if you have a "rebootin" script on your system, i know it comes on mandrake...
|
I have seen on Mandrake that a 'rebootin label' command exists, and basically you do a "rebootin windows" or "rebootin linux-2.4.19" or something like that and it will reboot directly into that, using the same label names in /etc/lilo.conf
|
bootinto application
Quote:
http://www.linuxforen.de/forums/atta...&postid=541981 (it seems to be a tar file, but it's not, just do "mv bootinto.tar bootinto) Usage: bootinto win bootinto lin Manpage will be coming your way soon. It works for both GRUB and LILO, btw, and you don't even need to know which one you've got running! Hope you find it useful. Samsara PS: It's a Perl script, so you'll find it easy to adapt. |
Quote:
Samsara |
Quote:
Samsara |
All times are GMT -5. The time now is 06:23 PM. |