Bug 228996 - yum install kernel (grubby actually) does not update grub.conf
Summary: yum install kernel (grubby actually) does not update grub.conf
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: mkinitrd
Version: 5
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Peter Jones
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-02-16 13:05 UTC by Mark Levitt
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-03-26 14:17:58 UTC
Type: ---
Embargoed:


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

Description Mark Levitt 2007-02-16 13:05:30 UTC
Description of problem:
grubby does not update grub.conf with new kernel. 

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

How reproducible:
Always

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 15:17:29 UTC
Created attachment 148198 [details]
gdb gubby

output of gdb run with a breakpoint set at lineWrite

Comment 2 Mark Levitt 2007-02-16 15:20:10 UTC
Hi,

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 18:30:26 UTC
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 14:17:34 UTC
OK,

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 

Works:
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.