LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 09-28-2004, 06:11 AM   #1
chrisss
LQ Newbie
 
Registered: Sep 2004
Posts: 4

Rep: Reputation: 0
how to do lilo -R with grub ?


well the topic says it all actually.

How to boot a kernel only once with grub (like lilo -R <image>) so if it fails i can reboot the machine with a remote powerboot and it boot's the previous kernel (the one that did work)

thanks chris
 
Old 10-03-2004, 07:43 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
well my questions say it all actually

1) does that mean your current grub is failing?

2) are you using an experiemental kernel and just need a choice in the menu.lst?

3) post your /etc/fstab and your /boot/menu.lst (or /etc/grub.conf) and someone should be able to help if I can't
 
Old 10-03-2004, 08:23 AM   #3
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
I should have been nicer?

default 0

fallback 1

title this will be first if no option chosen
kernel etc
initrd etc

title fallback
kernel can be same but will need better appends
initrd can be same or different
 
Old 10-04-2004, 02:14 AM   #4
chrisss
LQ Newbie
 
Registered: Sep 2004
Posts: 4

Original Poster
Rep: Reputation: 0
I'm sorry, i missed your previous post, and no, you don't have to be nicer :-) helping/answering me is nice enough

my grub is not failing.

I don't have physical access to most of my machines, but they are connected to a remote powerboot.

So i want to do the following:

if i upgrade for example from 2.4.x to 2.6.x and i'm not sure my 2.6 kernel will boot

i do the following with lilo

set default kernel to 2.4.x and run lilo with lilo -R vmlinuz-2.6.x
this will boot the 2.6.x kernel once

if it boots i change the default to 2.6.x

If it doesn't boot I hit the remote powerswitch, the machine reboots and lilo wil load the old 2.4.x kernel so i can log in remote and fix 2.6.x

I have no idea how to do that with grub.

chris@chris:~$ cat /boot/grub/menu.lst|grep -v ^#
default 0
timeout 5
color cyan/blue white/blue
splashimage=(hd0,0)/boot/grub/splashimages/debsplash.xpm.gz

title Debian GNU/Linux, kernel 2.6.8.1
root (hd0,0)
kernel /boot/vmlinuz-2.6.8.1 root=/dev/hda1 ro
savedefault
boot

title Debian GNU/Linux, kernel 2.6.8.1 (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.8.1 root=/dev/hda1 ro single
savedefault
boot

title Debian GNU/Linux, kernel 2.4.26-1-386
root (hd0,0)
kernel /boot/vmlinuz-2.4.26-1-386 root=/dev/hda1 ro
initrd /boot/initrd.img-2.4.26-1-386
savedefault
boot

title Debian GNU/Linux, kernel 2.4.26-1-386 (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.4.26-1-386 root=/dev/hda1 ro single
initrd /boot/initrd.img-2.4.26-1-386
savedefault
boot

chris@chris:~$ cat /etc/fstab

proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda8 /home ext3 defaults 0 2
/dev/hda7 /tmp ext3 defaults 0 2
/dev/hda5 /usr ext3 defaults 0 2
/dev/hda6 /var ext3 defaults 0 2
/dev/hda9 none swap sw 0 0
/dev/hdc /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
chris@chris:~$


my fstab
 
Old 10-04-2004, 03:58 AM   #5
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
insert this line immediately after default 0 line in grub
fallback 2
(to boot the third entry)

2) delete savedefault lines from grub, keep it simple
3) delete boot lines not needed same reason
4) by remote powerboot I assume you mean you have set up your bios and kernel for power settings


5) glad to know your grub works or is it your kernel compiles that aren't working?

Last edited by aus9; 10-04-2004 at 03:59 AM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Booting of raw ISO from GRUB/LILO (though preferably GRUB) Orkie Linux - Software 28 12-15-2013 09:37 PM
Switching from grub to lilo, messed up Lilo.conf, rescuing via Knoppix. SonicGT Debian 2 08-21-2005 01:15 PM
LILO or GRUB linuxnoobhelp Linux - General 6 12-07-2004 01:01 AM
Lilo vs Grub - PROBLEM with lilo nelsonnery Linux - Software 2 09-09-2004 11:09 AM
Grub or Lilo better ? futurist Linux - Newbie 4 03-16-2003 10:22 PM

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

All times are GMT -5. The time now is 07:49 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