mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-12-22 02:13:08 +00:00
Add a workaround for RHBZ #2268505
My anaconda patch for ensuring we get an EFI boot manager entry on installs using bootupd (currently only 'canned', i.e. Atomic, installs - IoT and Atomic Desktops - are affected) was rejected and dropped in the latest Rawhide build. It'll probably also be lost in the next F40 build. So install tests of affected images have started failing. This is a kinda awkward workaround: on UEFI canned installs, we check whether it looks like there is no "Fedora" efibootmgr entry, and if so, we delete the entry for the optical drive, so hopefully we'll boot via fallback path from the hard disk on reboot. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
66aa587755
commit
1739f38061
@ -130,6 +130,12 @@ sub run {
|
||||
# just like non-lives). And if we're already doing something
|
||||
# else at a console, we may as well reboot from there too
|
||||
push(@actions, 'reboot') if (!get_var("MEMCHECK") && ((get_var("LIVE") && !$webui) || @actions));
|
||||
# check whether install is affected by
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2268505 ,
|
||||
# soft fail and work around it if so
|
||||
if (get_var("CANNED") && get_var("UEFI")) {
|
||||
push(@actions, 'checkefibootmgr') if (get_var("UEFI"));
|
||||
}
|
||||
# our approach for taking all these actions doesn't work on VNC
|
||||
# installs, fortunately we don't need any of them in that case
|
||||
# yet, so for now let's just flush the list here if we're VNC
|
||||
@ -191,6 +197,16 @@ sub run {
|
||||
if (grep { $_ eq 'noplymouth' } @actions) {
|
||||
assert_script_run "chroot $mount dnf -y remove plymouth";
|
||||
}
|
||||
if (grep { $_ eq 'checkefibootmgr' } @actions) {
|
||||
if (script_run 'efibootmgr | grep fedora') {
|
||||
record_soft_failure "No EFI boot manager entry created - likely RHBZ #2268505";
|
||||
# delete the optical drive entry, if there is one, so hopefully
|
||||
# we'll boot via fallback path
|
||||
unless (script_run 'efibootmgr | grep CD-ROM') {
|
||||
assert_script_run('efibootmgr -b $(efibootmgr | grep CD-ROM | head -1 | cut -f1 | sed -e "s,[^0-9],,g") -B');
|
||||
}
|
||||
}
|
||||
}
|
||||
type_string "reboot\n" if (grep { $_ eq 'reboot' } @actions);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user