LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-04-2003, 07:59 AM   #1
markb
LQ Newbie
 
Registered: Dec 2001
Posts: 14

Rep: Reputation: 0
Boot to different image from command line


I am running Mandrake 9.0 and KDE 3.1. I have a dual boot computer which boots either Windows 98 or Linux. While in Linux, I would like to be able to reboot the computer into Windows from the command prompt. I am able to do this from KDE by Logging off and then at the log in screen I can select reboot and pick the image I want to boot into. The available images I can boot to are listed in /etc/lilo.conf. When I'm done in Windows, I can simply reboot and my default image will load which happens to be linux.

I know I can edit /etc/lilo.conf and set the default image to be Windows, run lilo, and then reboot which will boot into Windows but then when I reboot Windows the default image is still Windows but I want the default to remain linux.

Can this be done from the command line?
 
Old 04-04-2003, 08:05 AM   #2
FredrikN
Member
 
Registered: Nov 2001
Location: Sweden
Distribution: GNU/Linux since -97
Posts: 149

Rep: Reputation: 15
Sure , just write the name of the kernel you want to load and hit enter.

Works fine 4 me
 
Old 04-04-2003, 08:11 AM   #3
markb
LQ Newbie
 
Registered: Dec 2001
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks for the quick response. So you are saying all I have to do is from the command line type the kernel name? That doesn't make sense because I could name a kernel "sendmail" and linux would think I'm trying to run the sendmail program.

I would assume it would have to be something like "reboot kernel_name" but I'm not sure.
 
Old 04-04-2003, 08:18 AM   #4
FredrikN
Member
 
Registered: Nov 2001
Location: Sweden
Distribution: GNU/Linux since -97
Posts: 149

Rep: Reputation: 15
Sure it make sense.

If you have a kernel named Sendmail you can start it by typing Sendmail.

The mailserver sendmail will not start beacuse there is now way that Lilo can know that sendmail is a program
 
Old 04-04-2003, 08:26 AM   #5
markb
LQ Newbie
 
Registered: Dec 2001
Posts: 14

Original Poster
Rep: Reputation: 0
I just tried this and it didn't work. I was sitting at a command prompt in linux (not at the lilo prompt) and I typed the name of the image I wanted to change to and it said "Command not found". I even tried "reboot kernel_name" and I got the following:
"reboot [-n] [-w] [-d] [-f] [-i] [-p]"
I then tried:
"shutdown -rn now kernel_name" and the comptuer rebooted but did not boot to the new "kernel_name"

When I'm trying to reboot, I'm not at the lilo prompt or else just typing the name of the kernel would work.
 
Old 04-04-2003, 08:33 AM   #6
FredrikN
Member
 
Registered: Nov 2001
Location: Sweden
Distribution: GNU/Linux since -97
Posts: 149

Rep: Reputation: 15
Well, I tought you wanted to select the kernel from the Lilo prompt :-)

You can't do this from the console.

Sorry for the missunderstanding
 
Old 04-04-2003, 08:35 AM   #7
markb
LQ Newbie
 
Registered: Dec 2001
Posts: 14

Original Poster
Rep: Reputation: 0
I would assume that there is a way to do it or else it wouldn't work from the login promt for KDE. Thanks for helping and for your suggestions.
 
Old 04-04-2003, 03:54 PM   #8
maxspeed
Member
 
Registered: Mar 2003
Posts: 41

Rep: Reputation: 15
dont know how to do this and am not on linux right know to tell you but you might try reading the man pages of shutdown.
 
Old 04-06-2003, 08:32 PM   #9
markb
LQ Newbie
 
Registered: Dec 2001
Posts: 14

Original Poster
Rep: Reputation: 0
I have read the man pages for "shutdown", "reboot", and the "init" scripts and I didn't see anything about rebooting to a different image. Thanks for the suggestion.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Line Image Editing fractal_chaos Linux - Software 8 10-03-2005 05:33 PM
Any command-line tools which can edit EXIF image data? neocookie Linux - Software 1 01-27-2005 11:23 AM
mandrake 10 command line to gui boot, then stuck at boot with hour glass chris008 Linux - Laptop and Netbook 1 11-14-2004 05:29 PM
Command line question - creating ISO image satimis Linux - General 8 09-25-2004 03:18 AM
View image from command line? Rotwang Linux - General 1 03-22-2004 02:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:55 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
Open Source Consulting | Domain Registration