[Techtalk] grub/boot image problems

Katie Bechtold katie at katie-and-rob.org
Thu Jul 15 14:02:00 EST 2004


This all happened when I decided I'd finally configure
linux to talk to my HP Laserjet printer correctly.  It had been
working at one point, but I think it stopped working after a Gentoo
re-installation.  

I went to the Gentoo Printing Guide[1] for instructions.  I already 
had cups and foomatic installed.  Since a 'modprobe parport' produced
'Can't locate module parport', I figured I'd need to re-compile my 
kernel (the Kernel HOWTO[2], which might have told me how to compile 
and install the parport module without having to recompile the 
kernel, is down for review).  I went to 
/usr/src/linux-2.4.26-gentoo-r5/ and did a 'make menuconfig', making 
sure to enable parallel printer support.  The compilation went fine; 
I copied the kernel image and system map to /boot.

Now to tell grub, my bootloader, about the new kernel image.
That's where things started to appear awry.  Where was grub.conf?
Where was /boot/grub/?  Nowhere to be found.  Scarier: where was
the older kernel image (2.4.20-gentoo-r9) that I was currently
running?  I couldn't find it, not in /boot, not anywhere.

Had I been wiser and more patient, I might have asked y'all
for help then.  Not being that way, I threw together a new
grub.conf for my new kernel image, crossed my fingers, and
rebooted.

The boot menu I got didn't have my new kernel image on it -- that
is, it didn't correspond to the new grub.conf I'd just thrown
together.  The options were the same old kernels I'd had before.
It booted all right, and apparently to the older kernel
image -- which was where?  During bootup, it complained about
not finding 8139too.  It didn't recognize eth0, and it didn't seem
to remember that my window manager of choice was enlightenment.

I tried booting with the grub boot diskette, but I had no idea what
to do in the grub command interface with which it presented me.

Back to booting the ghost kernel.  After a lot of screwing around,
I found that grub-install (with an install device corresponding to
my root partition) and 'genkernel all' populated /boot with all the 
old familiar kernel images and configuration files.  One or both of 
those programs seemed to have saved the day.  I rebooted and eth0 
was back, although my old window manager was not (despite both 
~/.xinitrc and ~/.xsession containing 'exec /usr/bin/enlightenment').  
It was good enough for me.

Good enough, that is, until I started describing this problem to
others.  *Now* I look in /boot and it's the same emptiness
that scaried me before.  Only the newly-compiled kernel is
there -- where did the others that grub-install put there
*go*?  And /boot/grub/ no longer had the nice menu.lst and
other configuration files that grub-install put there.  I'm so
confused.  Maybe another 'grub-install /dev/hda3' will
do it?  Nuh-uh.  It did add a bunch of files to /boot/grub: 
stage1, stage2, device.map, *_stage1_5.  Now what?  I'm *so* 
confused.  What's going on here?

[1] http://www.gentoo.org/doc/en/printing-howto.xml
[2] http://www.tldp.org/HOWTO/Kernel-HOWTO.html

Possibly relevant configuration details:

# uname --kernel-release
2.4.20-gentoo-r9

# cat /boot/grub/grub.conf
default 0
timeout 30

title=Gentoo Linux 2.4.26 r5 with printer support
root(hd0,0)
kernel /bzImage-2.4.26-gentoo-r5-with-printer-support root=/dev/hda3

# cat /etc/mtab
/dev/hda3 / reiserfs rw,noatime 0 0
none /proc proc rw 0 0
none /dev devfs rw 0 0
none /dev/shm tmpfs rw 0 0
none /proc/bus/usb usbfs rw 0 0

# ls /boot/grub/
device.map     fat_stage1_5  grub.conf     minix_stage1_5     stage1 vstafs_stage1_5
e2fs_stage1_5  ffs_stage1_5  jfs_stage1_5  reiserfs_stage1_5  stage2 xfs_stage1_5

# cat /boot/grub/device.map 
(fd0)   /dev/floppy/0
(hd0)   /dev/ide/host0/bus0/target0/lun0/disc

-- 
Katie Bechtold         http://katie-and-rob.org/




More information about the Techtalk mailing list