Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1085040

Summary: after rhel6-to-rhel7 upgrade grub config loses initrd
Product: Red Hat Enterprise Linux 7 Reporter: Ray Strode [halfline] <rstrode>
Component: grubbyAssignee: Peter Jones <pjones>
Status: CLOSED CANTFIX QA Contact: Release Test Team <release-test-team-automation>
Severity: urgent Docs Contact:
Priority: high    
Version: 7.1CC: d.bz-redhat, fkluknav, james.antill, jantill, mganisin, ovasik, phracek, pjones, pstodulk, rstrode, ttomecek
Target Milestone: rcKeywords: Regression, Reopened, TestBlocker
Target Release: 7.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1169344 1169756 1227616 (view as bug list) Environment:
Last Closed: 2015-06-18 19:14:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1169756, 1205794, 1227616    
Attachments:
Description Flags
old grub.conf
none
new grub.conf
none
redhat-upgrade-tool log
none
upgrade.log
none
audit.log none

Description Ray Strode [halfline] 2014-04-07 15:26:22 UTC
On friday I started a rhel6 to rhel7 upgrade and let it run over the weekend. Apparently, this machine was previously a RHEL 5 machine before it was a rhel6 machine because before doing the upgrade it showed rhel5 grub artwork.   When I got into the office, the now rhel 7 machine was was sitting at a kernel panic.  It didn't recognize the filesystem root. After some troubleshooting, I discovered the problem was a missing initrd line in the grub (grub 1 !) config.

So it seems like there are 2 issues:

1) it's not upgrading to grub2
2) it's not adding the initrd to the grub1 config.

I don't know how much of this trouble is caused by preexisting wonkiness.  I do have a clone of the rhel6 VM from before the upgrade was started if that's useful.

I wasn't sure if I should file this against redhat-upgrade-tool or grubby, so feel free to reassign if necessary.

Comment 1 David Shea 2014-04-07 15:42:20 UTC
Can you attach the grub.cfg from before and after the upgrade, as well as /var/log/redhat_upgrade_tool.log and /var/log/upgrade.log?

Comment 2 Ray Strode [halfline] 2014-04-07 16:29:55 UTC
will attach those files. I actually wouldn't be surprised if this is caused by bug 1062714  .  the upgrade left me with broken python.

Comment 3 Ray Strode [halfline] 2014-04-07 16:34:26 UTC
Created attachment 883694 [details]
old grub.conf

Comment 4 Ray Strode [halfline] 2014-04-07 16:34:49 UTC
Created attachment 883695 [details]
new grub.conf

Comment 5 Ray Strode [halfline] 2014-04-07 16:35:15 UTC
Created attachment 883696 [details]
redhat-upgrade-tool log

Comment 6 Ray Strode [halfline] 2014-04-07 16:35:42 UTC
Created attachment 883697 [details]
upgrade.log

Comment 7 David Shea 2014-04-07 17:39:58 UTC
This is similar to bug 1062714, but yum appears to be making some decisions that don't make any sense. The logs indicate grubby-7.0.15-5.el6.x86_64 is being upgraded to grubby-8.28-8.el7.x86_64, but then there's:

[   151.433] (DD) redhat_upgrade_tool.depsolve:format_missing_requires() MISSING REQ: kernel-2.6.32-358.14.1.el6.x86_64 requires /sbin/new-kernel-pkg
[   151.436] (DD) redhat_upgrade_tool.yum:_requiringFromTransaction() TSINFO: Marking grubby-7.0.15-5.el6.i686 as install for kernel-2.6.32-358.14.1.el6.x86_64

The kernel package is being removed, so I assume it's for the preun dependency, but the dependencies in the rpm are for  grubby >= 7.0.4-1 and /sbin/new-kernel-pkg, both of which are provided by grubby-8.28-8. Unless this is related to UsrMove, I guess, but the RHEL 7 kernel.spec still uses /sbin and not /usr/sbin as the dependency.

Reassigning to yum.

Comment 10 James Antill 2014-06-16 13:53:51 UTC
> The kernel package is being removed, so I assume it's for the preun
> dependency, but the dependencies in the rpm are for  grubby >= 7.0.4-1 and
> /sbin/new-kernel-pkg, both of which are provided by grubby-8.28-8. Unless
> this is related to UsrMove, I guess, but the RHEL 7 kernel.spec still uses
> /sbin and not /usr/sbin as the dependency.

 8.28 doesn't provide that.

% rpm -qlp 7.0.15/5.el6/i686/grubby-7.0.15-5.el6.i686.rpm
/sbin/grubby
/sbin/installkernel
/sbin/new-kernel-pkg
/usr/share/doc/grubby-7.0.15
/usr/share/doc/grubby-7.0.15/COPYING
/usr/share/man/man8/grubby.8.gz
/usr/share/man/man8/installkernel.8.gz
/usr/share/man/man8/new-kernel-pkg.8.gz
% rpm -qlp 8.28/8.el7/i686/grubby-8.28-8.el7.i686.rpm
/usr/sbin/grubby
/usr/sbin/installkernel
/usr/sbin/new-kernel-pkg
/usr/share/doc/grubby-8.28
/usr/share/doc/grubby-8.28/COPYING
/usr/share/man/man8/grubby.8.gz
/usr/share/man/man8/installkernel.8.gz
/usr/share/man/man8/new-kernel-pkg.8.gz
% rpm -qp --provides 8.28/8.el7/i686/grubby-8.28-8.el7.i686.rpm
grubby = 8.28-8.el7
grubby(x86-32) = 8.28-8.el7


> 
> Reassigning to yum.

Comment 11 Ray Strode [halfline] 2014-06-19 17:55:16 UTC
James, did you mean to close this as NOTABUG versus move it to grubby?

to be clear the bug (is the very serious iss) "RHEL6 to RHEL7 upgrade doesn't work".  Do you believe that problem to be gone?

Are you were you just looking at this report through yum goggles ?

Comment 12 Petr Hracek 2014-10-16 13:00:25 UTC
During the upgrade RHEL6.6->RHEL7.1 the grub.conf loses the initrd again.
Reopen the bug.

It causes kernel panic.

Comment 14 Petr Stodulka 2014-10-16 15:46:53 UTC
Created attachment 947668 [details]
audit.log

Comment 25 Petr Stodulka 2014-11-27 11:22:57 UTC
Yes, it seems that this could be source of problems. grubby is indirectly dependent on cyrus-sasl-lib, which contains libsasl2.so*
(see for rhel-7: repoquery -R --resolve --recursive grubby | grep -i cyrus).

Change component to cyrus-sasl-lib.

Comment 26 Marian Ganisin 2014-11-28 12:50:43 UTC
Based on my analysis for issue occuring in 7.1 seems to be a regression in grubby.

This line from postrans of kernel package:

/usr/sbin/new-kernel-pkg --package kernel --mkinitrd --dracut --depmod --update 3.10.0-201.el7.x86_64 || exit $?

initiates different grubby commands (those updating grub.cfg) with packages from 7.0 and 7.1

With grubby-8.28-11.el7.x86_64 (version from RHEL-7.1) new-kernel-pkg mentioned above uses this to update the grub.cfg:

/sbin/grubby --grub -c /boot/grub/grub.conf --update-kernel=/boot/vmlinuz-3.10.0-201.el7.x86_64 --initrd /boot/initramfs-3.10.0-201.el7.x86_64.img --args=" LANG=en_US.UTF-8" --title="Red Hat Enterprise Linux Server (3.10.0-201.el7.x86_64) 7.1 (Maipo)$debugtitle"

While with grubby-8.28-8.el7.x86_64 (version from RHEL-7.0) command is:

/sbin/grubby --grub -c /boot/grub/grub.conf --update-kernel=/boot/vmlinuz-3.10.0-201.el7.x86_64 --initrd /boot/initramfs-3.10.0-201.el7.x86_64.img --args=" LANG=en_US.UTF-8"

The only difference is in --title option. I manually verified on RHEL-7.1 got by Inplace upgrade that --title does the magic. When defined the grubby does not update grub.cfg, while without --title it does the thing.

It's good idea to repeat that described issue happens after RHEL-7 Inplace upgrade when RHEL-6.6 is updated to RHEL-7.1 which always keeps _grub_  in use also on RHEL-7 (not the grub2 as usual), thus this is all about configuring grub-0.97 on RHEL-7.

Finally as Juraj Marko mentioned, this is blocker and TestBlocker for RHEL7 Inplace Upgrades feature as the system can not boot after inplace upgrade unless grub configuration is manually updated.

Comment 32 Peter Jones 2015-03-12 19:32:17 UTC
Please open each of these issues as an individual bug.  It looks like the original problem here is not currently able to be reproduced, and it's impossible to tell which (if any) followup bug should be addressed, so I'm NAKing this bug.

Comment 35 Ondrej Vasik 2015-06-18 19:01:27 UTC
let's clean the needinfo, I guess this one probably should be either closed or reassigned, as grubby only part was already entered separately.

Comment 36 Ray Strode [halfline] 2015-06-18 19:14:02 UTC
yea let's close this out for clarity sake