Bug 1314479 - upgrade broke my /boot/grub2/grub.cfg
upgrade broke my /boot/grub2/grub.cfg
Status: CLOSED DUPLICATE of bug 1289314
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: grubby (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Peter Jones
Release Test Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-03 12:08 EST by Matěj Cepl
Modified: 2017-01-05 10:58 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-22 17:37:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fuller report by jstancek (34.31 KB, text/plain)
2016-03-03 12:08 EST, Matěj Cepl
no flags Details

  None (edit)
Description Matěj Cepl 2016-03-03 12:08:13 EST
Created attachment 1132868 [details]
fuller report by jstancek

Description of problem:
When upgrading from regular 7.2 system to the nightly of http://download.eng.brq.redhat.com/nightly/RHEL-7.3-20160229.n.0/ my /boot/grub2/grub.cfg gets badly mangled. jstancek found this for me:

You start with RHEL7.2, new kernel is installed, then redhat-release-workstation is installed (you go from 7.2 to 7.3).

When all packages are installed, some kernel post install script runs and generates initrd. However grubby fails to update grub.cfg because title doesn't match (7.2 vs 7.3):

new_kernel_pkg --package kernel --mkinitrd --dracut --depmod --update 3.10.0-356.el7.x86_64
runs
/sbin/grubby --grub2 -c /boot/grub2/grub.cfg --update-kernel=/boot/vmlinuz-3.10.0-356.el7.x86_64 --initrd /boot/initramfs-3.10.0-356.el7.x86_64.img '--args= LANG=en_US.UTF-8' '--title=Red Hat Enterprise Linux Server (3.10.0-356.el7.x86_64) 7.3 (Maipo)' -> FAILS to add initrd line to grub.cfg

but in grub.cfg is:

menuentry 'Red Hat Enterprise Linux Server (3.10.0-356.el7.x86_64) 7.2 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.10.1.el7.x86_64-advanced-7669efd2-2832-4d5c-af6c-419a4c8db7cb' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod xfs
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  824f188c-8019-4ffa-bd17-ece8ff317df9
        else
          search --no-floppy --fs-uuid --set=root 824f188c-8019-4ffa-bd17-ece8ff317df9
        fi
        linux16 /vmlinuz-3.10.0-356.el7.x86_64 root=/dev/mapper/rhel_dell--pem520--03-root ro oops=panic crashkernel=auto rd.lvm.lv=rhel_dell-pem520-03/root rd.lvm.lv=rhel_dell-pem520-03/swap console=ttyS0,115200n81 LANG=en_US.UTF-8
}

Version-Release number of selected component (if applicable):
grubby-8.28-17.el7.x86_64
Comment 3 Herton R. Krzesinski 2016-08-22 17:37:34 EDT
The description here points to the same issue as was discussed/fixed on bug 1289314, thus marking this one as duplicate. It's fixed on kernel package starting with version kernel-3.10.0-468.el7

*** This bug has been marked as a duplicate of bug 1289314 ***

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