Bug 1450846
| Summary: | autorelabel should set UEFI BootNext same as BootCurrent before rebooting | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Pavel Holica <pholica> |
| Component: | initscripts | Assignee: | David Kaspar // Dee'Kej <deekej> |
| Status: | CLOSED ERRATA | QA Contact: | Daniel Rusek <drusek> |
| Severity: | medium | Docs Contact: | Sharon Moroney <smoroney> |
| Priority: | medium | ||
| Version: | 7.4 | CC: | drusek, jbastian, pholica |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | initscripts-9.49.42-1.el7 | Doc Type: | Release Note |
| Doc Text: |
The `rhel-autorelabel` service now acknowledges the `BootNext` setting of `efibootmgr`
Previously, when `BootNext` was set using `efibootmgr`, the boot process did not work as expected in case it was interrupted by the `rhel-autorelabel` service. This update resolves the problem.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-10-30 10:15:57 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: | 1392968, 1465901, 1549689 | ||
|
Description
Pavel Holica
2017-05-15 09:40:59 UTC
Something like this should work:
if efibootmgr &>/dev/null; then
CURRENT_BOOT=$(efibootmgr | awk -F": " '$1 == "BootCurrent" {print $2}')
efibootmgr -n $CURRENT_BOOT
fi
Thank you for the report, Pavel. This, however, will not make it into RHEL-7.4. I'm proposing this for RHEL-7.5. Pavel, could you please check this is OK? Thanks! https://github.com/fedora-sysv/initscripts/pull/195 (In reply to David Kaspar [Dee'Kej] from comment #5) > Pavel, could you please check this is OK? Thanks! > > https://github.com/fedora-sysv/initscripts/pull/195 Following expression is always true: [ -x /usr/sbin/efibootmgr ] Instead, you should run the efibootmgr which fails on non UEFI systems, but has RC 0 on UEFI systems. $ efibootmgr | grep -e 'BootCurrent' | sed -re 's/(^.+:[[:space:]]*)([[:xdigit:]]+)/\3/' sed: -e expression #1, char 39: invalid reference \3 on `s' command's RHS But \2 should work correctly :) $ efibootmgr | grep -e 'BootCurrent' | sed -re 's/(^.+:[[:space:]]*)([[:xdigit:]]+)/\2/' 0016 I have updated the commit in the pull-request based on our today's discussion, so the BootNext is updated unless it is already set. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:3131 |