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)
Created attachment 148198 [details] gdb gubby output of gdb run with a breakpoint set at lineWrite
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.
I've been testing this further an it seems to write a correct menu.lst in the / directory.
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.