Bug 1314479 - upgrade broke my /boot/grub2/grub.cfg
Summary: upgrade broke my /boot/grub2/grub.cfg
Keywords:
Status: CLOSED DUPLICATE of bug 1289314
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: grubby
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Peter Jones
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-03 17:08 UTC by Matěj Cepl
Modified: 2017-01-05 15:58 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-22 21:37:34 UTC
Target Upstream Version:


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

Description Matěj Cepl 2016-03-03 17:08:13 UTC
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 21:37:34 UTC
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.