Bug 743119 - wrong kernel version in "Loading ... " output of grub after kernel upgrade
wrong kernel version in "Loading ... " output of grub after kernel upgrade
Status: CLOSED DUPLICATE of bug 732654
Product: Fedora
Classification: Fedora
Component: grubby (Show other bugs)
16
All Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F16-accepted/F16FinalFreezeExcept
  Show dependency treegraph
 
Reported: 2011-10-03 17:54 EDT by igor.redhat@gmail.com
Modified: 2011-10-17 12:32 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-10-17 12:32:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
my /boot/grub2/grub.cfg (5.65 KB, application/octet-stream)
2011-10-03 17:55 EDT, igor.redhat@gmail.com
no flags Details
Patch based upon grubby-8.3 to fix the problem. (731 bytes, patch)
2011-10-12 15:51 EDT, Dr. Tilmann Bubeck
no flags Details | Diff

  None (edit)
Description igor.redhat@gmail.com 2011-10-03 17:54:27 EDT
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.
Comment 1 igor.redhat@gmail.com 2011-10-03 17:55:34 EDT
Created attachment 526146 [details]
my /boot/grub2/grub.cfg
Comment 2 igor.redhat@gmail.com 2011-10-05 15:15:07 EDT
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
}
Comment 3 Mattia Verga 2011-10-09 04:38:19 EDT
I can confirm this.
Comment 4 Dr. Tilmann Bubeck 2011-10-11 16:40:59 EDT
This seems to be a bug in grubby, because grubby is used in kernel-updates through %post with /sbin/new-kernel-pkg
Comment 5 Dr. Tilmann Bubeck 2011-10-12 15:51:53 EDT
Created attachment 527772 [details]
Patch based upon grubby-8.3 to fix the problem.
Comment 6 Dr. Tilmann Bubeck 2011-10-12 15:58:07 EDT
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.
Comment 7 Charles R. Anderson 2011-10-12 16:25:35 EDT
*** Bug 732654 has been marked as a duplicate of this bug. ***
Comment 8 Andre Robatino 2011-10-17 11:47:08 EDT
Nominating for F16 NTH.
Comment 9 Mads Kiilerich 2011-10-17 12:21:13 EDT
/me polishes his ego: Bug 732654 already had a patch for this when this duplicate issue was filed.
Comment 10 Andre Robatino 2011-10-17 12:32:51 EDT
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 ***

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