mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2025-12-08 18:05:59 +00:00
Add fix for Server
This commit is contained in:
parent
562c7eda9c
commit
06f31f5d97
11
lib/utils.pm
11
lib/utils.pm
@ -1922,13 +1922,20 @@ sub reboot_system {
|
|||||||
# Grub to manually the installed system (Fedora does not provide
|
# Grub to manually the installed system (Fedora does not provide
|
||||||
# any pre-configured Grub entries on its Live media.
|
# any pre-configured Grub entries on its Live media.
|
||||||
sub manual_boot {
|
sub manual_boot {
|
||||||
|
# The commands are linux and initrd on BIOS, but they differ
|
||||||
|
# on UEFI, so we will choose the correct set.
|
||||||
my $linux = "linux";
|
my $linux = "linux";
|
||||||
my $initrd = "initrd";
|
my $initrd = "initrd";
|
||||||
# On UEFI, the commands are different
|
|
||||||
if (get_var("UEFI")) {
|
if (get_var("UEFI")) {
|
||||||
$linux = "linuxefi";
|
$linux = "linuxefi";
|
||||||
$initrd = "initrdefi";
|
$initrd = "initrdefi";
|
||||||
}
|
}
|
||||||
|
# There is no solid way how we could identify the kernel version
|
||||||
|
# from the Grub screen, but with new installations we know
|
||||||
|
# that there will only be one kernel present, which we can tabcomplete
|
||||||
|
# if we know at least the first number. We are aware that the test
|
||||||
|
# will fail is kernel upgrades to newer major number, but this is
|
||||||
|
# not as frequent so the cost of this operation is reasonable.
|
||||||
my $kernel = get_var("KERNEL_VERSION", "6");
|
my $kernel = get_var("KERNEL_VERSION", "6");
|
||||||
# Wait until Grub menu appears
|
# Wait until Grub menu appears
|
||||||
assert_screen("bootloader", 1800);
|
assert_screen("bootloader", 1800);
|
||||||
@ -1943,7 +1950,7 @@ sub manual_boot {
|
|||||||
type_string("$linux /vmlinuz-$kernel\t root=/dev/vda3 ro rootflags=subvol=root\n");
|
type_string("$linux /vmlinuz-$kernel\t root=/dev/vda3 ro rootflags=subvol=root\n");
|
||||||
sleep(1);
|
sleep(1);
|
||||||
# Load initrd
|
# Load initrd
|
||||||
type_string("$initrd /initrd-$kernel\t");
|
type_string("$initrd /initramfs-$kernel\t");
|
||||||
sleep(1);
|
sleep(1);
|
||||||
send_key("ret");
|
send_key("ret");
|
||||||
# Boot
|
# Boot
|
||||||
|
|||||||
@ -176,6 +176,12 @@ sub run {
|
|||||||
unless (@actions) {
|
unless (@actions) {
|
||||||
unless (get_var("MEMCHECK")) {
|
unless (get_var("MEMCHECK")) {
|
||||||
assert_and_click "anaconda_install_done";
|
assert_and_click "anaconda_install_done";
|
||||||
|
# If we have the USBBOOT variable set up, the boot process will
|
||||||
|
# always end up in booting the USB iso and never the hard drive,
|
||||||
|
# therefore we need to boot manually.
|
||||||
|
if (get_var("USBBOOT")) {
|
||||||
|
manual_boot();
|
||||||
|
}
|
||||||
if (get_var("TEST") eq 'install_default_update_netinst') {
|
if (get_var("TEST") eq 'install_default_update_netinst') {
|
||||||
wait_still_screen 10;
|
wait_still_screen 10;
|
||||||
if (check_screen "anaconda_grey_stuck") {
|
if (check_screen "anaconda_grey_stuck") {
|
||||||
@ -251,6 +257,8 @@ sub run {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
type_string "reboot\n" if (grep { $_ eq 'reboot' } @actions);
|
type_string "reboot\n" if (grep { $_ eq 'reboot' } @actions);
|
||||||
|
# If we are here to restart the system, we need to boot the system manually,
|
||||||
|
# because the USBBOOT variable prevents the system from booting from the hard drive.
|
||||||
if (get_var("USBBOOT")) {
|
if (get_var("USBBOOT")) {
|
||||||
manual_boot();
|
manual_boot();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user