Tech Support > Operating Systems > Linux / Variants > GRUB for Two Linux Kernels
GRUB for Two Linux Kernels
Posted by W. Watson on February 23rd, 2004


I've built a realtime kernel, and would like to select it a boot time. Here's
basically what I have for grub.conf:

default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.7-10)
root (hd0,0)
kernel /vmlinuz-2.4.7-10 ro root=/dev/hda6
initrd /initrd-2.4.7-10.img
title Realtime Linux (xxx)
root (hd0,0)
kernel /vmlinuz-2.4.7-10-rtl3.2 ro root=LABEL/
initrd /initrd-2.4.7-10-rtl3.2.img

I don't have a initrd-2.4.7-10-rtl3.2.img file, so either I don't need the initrd or
I goofed in building the kernel. I commented it out, but I still get one choice for a
kernel when I boot. Something's amiss. What?
--
Wayne T. Watson (121.015 Deg. W, 39.262 Deg. N, 2,701 feet, Nevada City, CA)
-- GMT-8 hr std. time, RJ Rcvr 39° 8' 0" N, 121° 1' 0" W

"Don't hassle me with your signs, Chuck" -- Peppermint Patty, Peanuts

Web Page: <home.earthlink.net/~mtnviews>
sierra_mtnview -at- earthlink -dot- net
Imaginarium Museum: <home.earthlink.net/~mtnviews/imaginarium.html>

Posted by Lenard on February 23rd, 2004


On Mon, 23 Feb 2004 01:03:53 +0000, W. Watson wrote:

The correct line;

kernel /vmlinuz-2.4.7-10-rtl3.2 ro root=/dev/hda6

Also check that the /boot/vmlinuz-2.4.7-10-rtl3.2 file does exist.


--
Posted under the XFree86 v.1.0 license
Copyright remains with the author

Posted by W. Watson on February 23rd, 2004


Lenard wrote:

using GRUB. I just installed RH 9.0 and thought I specified GRUB. But the graphics
boot window doesn't seem at all like what I put in grub.conf. How do I know which
loader I'm really using?

--
Wayne T. Watson (121.015 Deg. W, 39.262 Deg. N, 2,701 feet, Nevada City, CA)
-- GMT-8 hr std. time, RJ Rcvr 39° 8' 0" N, 121° 1' 0" W

"Don't hassle me with your signs, Chuck" -- Peppermint Patty, Peanuts

Web Page: <home.earthlink.net/~mtnviews>
sierra_mtnview -at- earthlink -dot- net
Imaginarium Museum: <home.earthlink.net/~mtnviews/imaginarium.html>

Posted by Eric Moors on February 23rd, 2004


dd if=/dev/hda count=1 | strings

If it says grub, you're using grub.
If it says lilo, you're using lilo.
If says something else ...

(If hda is not what you are booting from, change that)

Eric

Posted by Timothy Murphy on February 23rd, 2004


W. Watson wrote:

If you want grub, why not say "grub-install --recheck /dev/hda" ?

--
Timothy Murphy
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

Posted by W. Watson on February 24th, 2004


Timothy Murphy wrote:
had some idea that maybe I would install GRUB, but guess I didn't.

Is it possible to change bootloaders at will?

grub-install --recheck /dev/hda -- one day
lilo-install --recheck /dev/hda -- another day

I don't really plan to do that, just curious.

--
Wayne T. Watson (121.015 Deg. W, 39.262 Deg. N, 2,701 feet, Nevada City, CA)
-- GMT-8 hr std. time, RJ Rcvr 39° 8' 0" N, 121° 1' 0" W

"Don't hassle me with your signs, Chuck" -- Peppermint Patty, Peanuts

Web Page: <home.earthlink.net/~mtnviews>
sierra_mtnview -at- earthlink -dot- net
Imaginarium Museum: <home.earthlink.net/~mtnviews/imaginarium.html>

Posted by Eric Moors on February 24th, 2004


you need to run lilo before the changes are applied.
run `/sbin/lilo` to commit the changes in lilo.conf

Yes, it is.

lilo has different syntax. Just run:

/sbin/lilo

to install lilo


Eric

Posted by Timothy Murphy on February 24th, 2004


W. Watson wrote:

Perfectly possible.

Personally, if I'm in any doubt about my boot-loader,
I save the MBR with
dd if=/dev/hda of=mbr-lilo bs=512 count=1
and then if something goes wrong it can be re-installed with
dd if=mbr-lilo of=/dev/hda bs=512 count=1

I feel grub is quite a lot safer,
since the MBR is not re-written each time you change grub.conf .
Also it is reasonably easy to go into interactive mode
if any problems do occur
(though I find the documentation in "info grub" less than lucid
on this).

--
Timothy Murphy
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland


Similar Posts