Description of problem: After upgrading to kernel 3.1.0-0.rc8, grub2 menu shows (and loads) the correct version in the main prompt but "Loading" prompt still says "rc6". Also, older kernel versions that are no longer installed are still shown in grub menu. Version-Release number of selected component (if applicable): $ rpm -qi kernel Name : kernel Version : 3.0.0 Release : 1.fc16 Architecture: x86_64 Install Date: Fri 23 Sep 2011 07:38:56 PM EDT Group : System Environment/Kernel Size : 116728010 License : GPLv2 Signature : RSA/SHA256, Wed 27 Jul 2011 04:04:20 PM EDT, Key ID 067f00b6a82ba4b7 Source RPM : kernel-3.0.0-1.fc16.src.rpm Build Date : Fri 22 Jul 2011 12:45:47 PM EDT Build Host : x86-17.phx2.fedoraproject.org Relocations : (not relocatable) Packager : Fedora Project Vendor : Fedora Project URL : http://www.kernel.org/ Summary : The Linux kernel Description : The kernel package contains the Linux kernel (vmlinuz), the core of any Linux operating system. The kernel handles the basic functions of the operating system: memory allocation, process allocation, device input and output, etc. Name : kernel Version : 3.1.0 Release : 0.rc6.git0.3.fc16 Architecture: x86_64 Install Date: Fri 23 Sep 2011 04:18:05 PM EDT Group : System Environment/Kernel Size : 116031317 License : GPLv2 Signature : RSA/SHA256, Sat 17 Sep 2011 07:47:46 AM EDT, Key ID 067f00b6a82ba4b7 Source RPM : kernel-3.1.0-0.rc6.git0.3.fc16.src.rpm Build Date : Fri 16 Sep 2011 09:06:23 AM EDT Build Host : x86-02.phx2.fedoraproject.org Relocations : (not relocatable) Packager : Fedora Project Vendor : Fedora Project URL : http://www.kernel.org/ Summary : The Linux kernel Description : The kernel package contains the Linux kernel (vmlinuz), the core of any Linux operating system. The kernel handles the basic functions of the operating system: memory allocation, process allocation, device input and output, etc. Name : kernel Version : 3.1.0 Release : 0.rc8.git0.0.fc16 Architecture: x86_64 Install Date: Fri 30 Sep 2011 05:52:20 AM EDT Group : System Environment/Kernel Size : 116063876 License : GPLv2 Signature : RSA/SHA256, Wed 28 Sep 2011 06:32:51 AM EDT, Key ID 067f00b6a82ba4b7 Source RPM : kernel-3.1.0-0.rc8.git0.0.fc16.src.rpm Build Date : Tue 27 Sep 2011 10:13:18 PM EDT Build Host : x86-15.phx2.fedoraproject.org Relocations : (not relocatable) Packager : Fedora Project Vendor : Fedora Project URL : http://www.kernel.org/ Summary : The Linux kernel Description : The kernel package contains the Linux kernel (vmlinuz), the core of any Linux operating system. The kernel handles the basic functions of the operating system: memory allocation, process allocation, device input and output, etc. How reproducible: I started out with Fedora 16 Alpha DVD installed and never mucked around with grub config manually. Expected results: Correct kernel version is shown in "Loading" line and removed kernel versions removed from the grub menu.
Created attachment 526146 [details] my /boot/grub2/grub.cfg
Same issue after upgrading to 3.1.0-0.rc8.git0.1: menuentry 'Fedora (3.1.0-0.rc8.git0.1.fc16.x86_64)' --class fedora --class gnu-linux --class gnu --class os { load_video set gfxpayload=keep insmod part_msdos insmod ext2 set root='(hd0,msdos2)' search --no-floppy --fs-uuid --set=root d2531571-bb88-4675-9d82-9a415f060210 echo 'Loading Fedora (3.1.0-0.rc6.git0.3.fc16.x86_64)' linux /vmlinuz-3.1.0-0.rc8.git0.1.fc16.x86_64 root=UUID=c07db0f8-16c8-4d06-9f59-5a04a34fb2b1 ro rd.md=0 rd.lvm=0 rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0 LANG=en_US.UTF-8 echo 'Loading initial ramdisk ...' initrd /initramfs-3.1.0-0.rc8.git0.1.fc16.x86_64.img }
I can confirm this.
This seems to be a bug in grubby, because grubby is used in kernel-updates through %post with /sbin/new-kernel-pkg
Created attachment 527772 [details] Patch based upon grubby-8.3 to fix the problem.
This is a bug in grubby-8.3. Please find attached a patch which fixed this problem. What went wrong? grubby searches the template file for lines containing "Loading Linux" and will append the version number after that text. However, Fedora does not contain "Loading Linux", but "Loading Fedora". So this line is never detected as such a "special" line and therefore the current linux version number is never appended. Instead the line is copied unchanged. Therefore you will stick with the message generated at install time from anaconda. It will never change. How was it fixed? We now detect "Loading Linux" AND "Loading Fedora" as such "special" lines. Therefore the version number is appended. Feel free to apply upstream.
*** Bug 732654 has been marked as a duplicate of this bug. ***
Nominating for F16 NTH.
/me polishes his ego: Bug 732654 already had a patch for this when this duplicate issue was filed.
Closed as a duplicate since essentially the same exact patch was already available in https://bugzilla.redhat.com/show_bug.cgi?id=732654#c9 . *** This bug has been marked as a duplicate of bug 732654 ***