LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-22-2003, 02:05 AM   #1
Kocil
Member
 
Registered: Feb 2003
Distribution: Redhat since 5.2, Slackware since 9.0, Vector since 4.0
Posts: 209

Rep: Reputation: 31
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.
 
Old 08-22-2003, 02:36 AM   #2
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,372

Rep: Reputation: 47
I don't understand the question, elaborate.
 
Old 08-22-2003, 04:16 AM   #3
Kocil
Member
 
Registered: Feb 2003
Distribution: Redhat since 5.2, Slackware since 9.0, Vector since 4.0
Posts: 209

Original Poster
Rep: Reputation: 31
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.

Last edited by Kocil; 08-22-2003 at 04:22 AM.
 
Old 08-22-2003, 04:21 AM   #4
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
I hope you can choose the OS from the lilo menu.
 
Old 08-22-2003, 04:22 AM   #5
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
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.
 
Old 08-22-2003, 04:27 AM   #6
Kocil
Member
 
Registered: Feb 2003
Distribution: Redhat since 5.2, Slackware since 9.0, Vector since 4.0
Posts: 209

Original Poster
Rep: Reputation: 31
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.

Last edited by Kocil; 08-22-2003 at 04:29 AM.
 
Old 08-22-2003, 04:31 AM   #7
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
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.
 
Old 08-22-2003, 04:45 AM   #8
Kocil
Member
 
Registered: Feb 2003
Distribution: Redhat since 5.2, Slackware since 9.0, Vector since 4.0
Posts: 209

Original Poster
Rep: Reputation: 31
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.
 
Old 08-22-2003, 05:34 AM   #9
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
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.
 
Old 08-23-2003, 05:30 PM   #10
Kocil
Member
 
Registered: Feb 2003
Distribution: Redhat since 5.2, Slackware since 9.0, Vector since 4.0
Posts: 209

Original Poster
Rep: Reputation: 31
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
 
Old 08-23-2003, 06:29 PM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
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...
 
Old 08-23-2003, 11:13 PM   #12
luischardon
LQ Newbie
 
Registered: Aug 2003
Distribution: Mandrake
Posts: 4

Rep: Reputation: 0
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
 
Old 08-24-2003, 07:41 AM   #13
Samsara
Member
 
Registered: May 2003
Distribution: Ubuntu, Mac OS X Tiger
Posts: 481

Rep: Reputation: 32
bootinto application

Quote:
Originally posted by Kocil
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'm developing it. Currently rewriting from scratch as I want to add a lot more functionality. It's in Perl. This is the most recent beta (which works perfectly, but lacks features):

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.

Last edited by Samsara; 08-24-2003 at 07:46 AM.
 
Old 08-24-2003, 07:42 AM   #14
Samsara
Member
 
Registered: May 2003
Distribution: Ubuntu, Mac OS X Tiger
Posts: 481

Rep: Reputation: 32
Quote:
Originally posted by luischardon
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
Oops, really??? Seems I'm rewriting something that exists already... well, I'll just have to make a better job of it than the original

Samsara
 
Old 08-24-2003, 07:43 AM   #15
Samsara
Member
 
Registered: May 2003
Distribution: Ubuntu, Mac OS X Tiger
Posts: 481

Rep: Reputation: 32
Quote:
Originally posted by ppuru
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.
Have you been able to find out? I'd like to know (for reason see my above posts)

Samsara
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lilo reboot K1d Slackware - Installation 10 10-13-2004 07:35 PM
if lilo bmp image missing ? abs Slackware 8 08-17-2004 04:40 PM
lilo boot image mi6 Slackware 9 04-30-2004 10:14 PM
Ethernet Detection Failure after .20 Image set in lilo and reboot sai Slackware 1 03-09-2003 12:41 AM
Lilo boot Image karunesh Linux - General 2 01-24-2002 06:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration