1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-25 07:13:09 +00:00

Drop syslinux handling from do_bootloader

F36 is now EOL, and from F37 onwards, grub is the bootloader in
any situation where it actually matters to do_bootloader (which
is only when we're editing parameters). We do still use syslinux
in the PXE tests on x86_64 BIOS, but we don't edit the parameters
in that case.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2023-05-24 14:48:39 -07:00
parent 78c52cedc2
commit 077a31835a

View File

@ -319,7 +319,7 @@ sub console_loadkeys_us {
} }
sub do_bootloader { sub do_bootloader {
# Handle bootloader screen. 'bootloader' is syslinux or grub. # Handle bootloader screen.
# 'uefi' is whether this is a UEFI install, will get_var UEFI if # 'uefi' is whether this is a UEFI install, will get_var UEFI if
# not explicitly set. 'postinstall' is whether we're on an # not explicitly set. 'postinstall' is whether we're on an
# installed system or at the installer (this matters for how many # installed system or at the installer (this matters for how many
@ -339,9 +339,7 @@ sub do_bootloader {
ofw => get_var("OFW"), ofw => get_var("OFW"),
@_ @_
); );
# if not postinstall, not UEFI, not ofw, and not F37+, syslinux
my $relnum = get_release_number; my $relnum = get_release_number;
$args{bootloader} //= ($args{uefi} || $args{postinstall} || $args{ofw}) || $relnum > 36 ? "grub" : "syslinux";
# we use the firmware-type specific tags because we want to be # we use the firmware-type specific tags because we want to be
# sure we actually did a UEFI boot # sure we actually did a UEFI boot
my $boottag = "bootloader_bios"; my $boottag = "bootloader_bios";
@ -359,28 +357,23 @@ sub do_bootloader {
send_key "up"; send_key "up";
} }
if ($args{params}) { if ($args{params}) {
if ($args{bootloader} eq "syslinux") { send_key "e";
send_key "tab"; # we need to get to the 'linux' line here, and grub does
} # not have any easy way to do that. Depending on the arch
else { # and the Fedora release, we may have to press 'down' 2
send_key "e"; # times, or 13, or 12, or some other goddamn number. That
# we need to get to the 'linux' line here, and grub does # got painful to keep track of, so let's go bottom-up:
# not have any easy way to do that. Depending on the arch # press 'down' 50 times to make sure we're at the bottom,
# and the Fedora release, we may have to press 'down' 2 # then 'up' twice to reach the 'linux' line. This seems to
# times, or 13, or 12, or some other goddamn number. That # work in every permutation I can think of to test.
# got painful to keep track of, so let's go bottom-up: for (1 .. 50) {
# press 'down' 50 times to make sure we're at the bottom, send_key 'down';
# then 'up' twice to reach the 'linux' line. This seems to
# work in every permutation I can think of to test.
for (1 .. 50) {
send_key 'down';
}
sleep 1;
send_key 'up';
sleep 1;
send_key 'up';
send_key "end";
} }
sleep 1;
send_key 'up';
sleep 1;
send_key 'up';
send_key "end";
# Change type_string by type_safely because keyboard polling # Change type_string by type_safely because keyboard polling
# in SLOF usb-xhci driver failed sometimes in powerpc # in SLOF usb-xhci driver failed sometimes in powerpc
type_safely " $args{params}"; type_safely " $args{params}";