Bug 228996 - yum install kernel (grubby actually) does not update grub.conf
yum install kernel (grubby actually) does not update grub.conf
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2007-02-16 08:05 EST by Mark Levitt
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-03-26 10:17:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
gdb gubby (7.86 KB, text/plain)
2007-02-16 10:17 EST, Mark Levitt
no flags Details

  None (edit)
Description Mark Levitt 2007-02-16 08:05:30 EST
Description of problem:
grubby does not update grub.conf with new kernel. 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. yum install kernel (when a new kernel is available)
2. Wait for yum to complete
3. cat /boot/grub/grub.conf
Actual results:
The grub.conf file remains unchanged, i.e., not updated with the new kernel.

Expected results:
A new entry for the new kernel is listed as the default entry.

Additional info:
If I move menu.lst and grub.conf into the / directory, grubby finds them and
updates them there. 

/boot is on /dev/sda2 and has a label of /boot
/ is on /dev/sda1 and has a label of /

I've tried running grubby using the same command line that new-kernel-pkg uses
and it fails in the same way (which isn't surprising because it seems that
package calls new-kernel-pkg which calls grubby to do the actual work)
Comment 1 Mark Levitt 2007-02-16 10:17:29 EST
Created attachment 148198 [details]
gdb gubby

output of gdb run with a breakpoint set at lineWrite
Comment 2 Mark Levitt 2007-02-16 10:20:10 EST

OK, my C debugging skills are a little rusty, but I managed to build a debug
version of grubby and run it under gdb.

I set a breakpoint at lineWrite just to see if I could tell why it was getting
corrupted. I've attached the output.

I think, from what I can see, lineWrite is getting passed bad data, so the
problem is elsewhere, but I'll keep digging if I can.
Comment 3 Mark Levitt 2007-02-18 13:30:26 EST
I've been testing this further an it seems to write a correct menu.lst in the / directory. 
Comment 4 Mark Levitt 2007-03-26 10:17:34 EDT

I've solved my issue. 

I noticed that /boot/grub/grub.conf was a symlink to menu.lst

However, on another system that worked correctly /boot/grub/menu.lst is a
symlink to grub.conf.

In other words, non-working:
grub.conf -> ./menu.lst 

menu.lst -> ./grub.conf

Swapping around the real file and the symlink has fixed the problem. 

Note You need to log in before you can comment on or make changes to this bug.