LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-15-2004, 06:05 AM   #1
soc
LQ Newbie
 
Registered: Oct 2004
Posts: 2

Rep: Reputation: 0
Boot old kernel if new kernel fails


Hi,

I was thinking of something today, no idea if this is possible, but i'd might as well give it a try

Take this scenario:

You build a new (Linux 2.6) kernel and add it to GRUB. You reboot the system through the console and wait until the kernel you just compiled boots up.

After about 5 minutes you find out that the kernel doesn't boot (must have forgotten something heh ).

You log in to your APC (Remote Power Switch) and reboot the box.

Is it then possible in some way to make GRUB boot the old kernel (on a remote box, so no screen and only a power switch)?
 
Old 10-15-2004, 07:15 AM   #2
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
I don't know about grub but with lilo you can use the -R command.

Code:
       -R command line
              This  option  sets the default command for the boot loader the next
              time it executes. The boot loader will then erase this  line:  this
              is  a  once-only  command.  It is typically used in reboot scripts,
              just before calling `shutdown -r'.  Used without any arguments,  it
              will cancel a lock-ed or fallback command line.
So what you do is you use the /sbin/lilo -R command to tell lilo to boot the new kernel. Then when it boots lilo will erase this command so you are back to your default kernel. You must have a n append panic=30 in lilo.conf for the new kernel image so it will reboot automatically in the event of a panic.
 
Old 10-15-2004, 09:21 AM   #3
jainashish
LQ Newbie
 
Registered: Oct 2004
Posts: 5

Rep: Reputation: 0
for grub you can add a line :
fallback <index # of title> (Note: index starts from 0)

in /boot/grub/menu.lst file


for more details ....read info pages on grub and to configuration file section
 
Old 10-17-2004, 04:50 PM   #4
soc
LQ Newbie
 
Registered: Oct 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by /bin/bash
I don't know about grub but with lilo you can use the -R command.
Thanks, seems LILO is the only one capable of doing that, I guess i'll have to try LILO then, thanks
 
  


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
Newly-Built Kernel Won't Boot, Old One Fails Kenji Miyamoto Slackware 6 05-27-2005 10:30 PM
New kernel fails to boot: It can't find modules.dep though it's there lixy Linux - General 2 04-16-2005 07:23 AM
newly compiled kernel, boot fails class_struggle Linux - Newbie 2 07-30-2004 09:10 AM
Kernel 2.6.6 upgraded - fails to boot Eux Debian 3 06-30-2004 02:51 AM
New kernel fails to boot! Unsure of the cause nro Linux - Newbie 1 11-13-2003 04:01 AM

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

All times are GMT -5. The time now is 10:39 AM.

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