mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-25 23:33:07 +00:00
Create biosboot partitions in blivet tests
From anaconda-37.12.1, anaconda defaults to GPT for all BIOS installs. So we need to create a BIOS boot partition when doing a BIOS install. I think all other potential configs (x86_64 UEFI, aarch64 (UEFI), ppc64le (OFW)) are covered under the other two paths, so just making this `else` should be OK. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
2bfe0f53cd
commit
cd266f13ef
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"area": [
|
||||||
|
{
|
||||||
|
"xpos": 398,
|
||||||
|
"ypos": 139,
|
||||||
|
"width": 62,
|
||||||
|
"height": 15,
|
||||||
|
"type": "match"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"properties": [],
|
||||||
|
"tags": [
|
||||||
|
"anaconda_blivet_part_fs_biosboot"
|
||||||
|
]
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 69 KiB |
@ -14,10 +14,14 @@ sub run {
|
|||||||
# if we're running on UEFI, we need esp
|
# if we're running on UEFI, we need esp
|
||||||
custom_blivet_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');
|
custom_blivet_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');
|
||||||
}
|
}
|
||||||
if (get_var("OFW")) {
|
elsif (get_var("OFW")) {
|
||||||
custom_blivet_add_partition(size => 4, filesystem => 'ppc_prep_boot');
|
custom_blivet_add_partition(size => 4, filesystem => 'ppc_prep_boot');
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
# from anaconda-37.12.1 onwards, GPT is default for BIOS
|
||||||
|
# installs, so we need a biosboot partition
|
||||||
|
custom_blivet_add_partition(size => 1, filesystem => 'biosboot');
|
||||||
|
}
|
||||||
custom_blivet_add_partition(size => 512, mountpoint => '/boot');
|
custom_blivet_add_partition(size => 512, mountpoint => '/boot');
|
||||||
|
|
||||||
# selecting "btrfs" as filesystem creates new BTRFS drive in blivet-gui
|
# selecting "btrfs" as filesystem creates new BTRFS drive in blivet-gui
|
||||||
|
@ -14,10 +14,14 @@ sub run {
|
|||||||
# if we're running on UEFI, we need esp
|
# if we're running on UEFI, we need esp
|
||||||
custom_blivet_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');
|
custom_blivet_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');
|
||||||
}
|
}
|
||||||
if (get_var("OFW")) {
|
elsif (get_var("OFW")) {
|
||||||
custom_blivet_add_partition(size => 4, filesystem => 'ppc_prep_boot');
|
custom_blivet_add_partition(size => 4, filesystem => 'ppc_prep_boot');
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
# from anaconda-37.12.1 onwards, GPT is default for BIOS
|
||||||
|
# installs, so we need a biosboot partition
|
||||||
|
custom_blivet_add_partition(size => 1, filesystem => 'biosboot');
|
||||||
|
}
|
||||||
custom_blivet_add_partition(size => 512, mountpoint => '/boot', filesystem => 'ext4');
|
custom_blivet_add_partition(size => 512, mountpoint => '/boot', filesystem => 'ext4');
|
||||||
# add new LVM VG
|
# add new LVM VG
|
||||||
custom_blivet_add_partition(devicetype => 'lvmvg');
|
custom_blivet_add_partition(devicetype => 'lvmvg');
|
||||||
|
@ -14,10 +14,14 @@ sub run {
|
|||||||
# if we're running on UEFI, we need esp
|
# if we're running on UEFI, we need esp
|
||||||
custom_blivet_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');
|
custom_blivet_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');
|
||||||
}
|
}
|
||||||
if (get_var("OFW")) {
|
elsif (get_var("OFW")) {
|
||||||
custom_blivet_add_partition(size => 4, filesystem => 'ppc_prep_boot');
|
custom_blivet_add_partition(size => 4, filesystem => 'ppc_prep_boot');
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
# from anaconda-37.12.1 onwards, GPT is default for BIOS
|
||||||
|
# installs, so we need a biosboot partition
|
||||||
|
custom_blivet_add_partition(size => 1, filesystem => 'biosboot');
|
||||||
|
}
|
||||||
custom_blivet_add_partition(size => 512, mountpoint => '/boot');
|
custom_blivet_add_partition(size => 512, mountpoint => '/boot');
|
||||||
# add new LVM VG
|
# add new LVM VG
|
||||||
custom_blivet_add_partition(devicetype => 'lvmvg');
|
custom_blivet_add_partition(devicetype => 'lvmvg');
|
||||||
|
@ -14,10 +14,14 @@ sub run {
|
|||||||
# if we're running on UEFI, we need esp
|
# if we're running on UEFI, we need esp
|
||||||
custom_blivet_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');
|
custom_blivet_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');
|
||||||
}
|
}
|
||||||
if (get_var("OFW")) {
|
elsif (get_var("OFW")) {
|
||||||
custom_blivet_add_partition(size => 4, filesystem => 'ppc_prep_boot');
|
custom_blivet_add_partition(size => 4, filesystem => 'ppc_prep_boot');
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
# from anaconda-37.12.1 onwards, GPT is default for BIOS
|
||||||
|
# installs, so we need a biosboot partition
|
||||||
|
custom_blivet_add_partition(size => 1, filesystem => 'biosboot');
|
||||||
|
}
|
||||||
custom_blivet_add_partition(size => 512, mountpoint => '/boot');
|
custom_blivet_add_partition(size => 512, mountpoint => '/boot');
|
||||||
custom_blivet_add_partition(raid1 => 1, mountpoint => '/');
|
custom_blivet_add_partition(raid1 => 1, mountpoint => '/');
|
||||||
|
|
||||||
|
@ -14,10 +14,14 @@ sub run {
|
|||||||
# if we're running on UEFI, we need esp
|
# if we're running on UEFI, we need esp
|
||||||
custom_blivet_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');
|
custom_blivet_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');
|
||||||
}
|
}
|
||||||
if (get_var("OFW")) {
|
elsif (get_var("OFW")) {
|
||||||
custom_blivet_add_partition(size => 4, filesystem => 'ppc_prep_boot');
|
custom_blivet_add_partition(size => 4, filesystem => 'ppc_prep_boot');
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
# from anaconda-37.12.1 onwards, GPT is default for BIOS
|
||||||
|
# installs, so we need a biosboot partition
|
||||||
|
custom_blivet_add_partition(size => 1, filesystem => 'biosboot');
|
||||||
|
}
|
||||||
#custom_blivet_add_partition(filesystem => 'ext4', mountpoint => '/');
|
#custom_blivet_add_partition(filesystem => 'ext4', mountpoint => '/');
|
||||||
custom_blivet_add_partition(filesystem => 'ext4', size => 512, mountpoint => '/boot');
|
custom_blivet_add_partition(filesystem => 'ext4', size => 512, mountpoint => '/boot');
|
||||||
custom_blivet_add_partition(filesystem => 'ext4', mountpoint => '/');
|
custom_blivet_add_partition(filesystem => 'ext4', mountpoint => '/');
|
||||||
|
@ -4,21 +4,13 @@ use testapi;
|
|||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
assert_screen "root_console";
|
assert_screen "root_console";
|
||||||
my $count = 3;
|
|
||||||
my $devroot = 'vda2';
|
|
||||||
my $devboot = 'vda1';
|
|
||||||
if (get_var('OFW') || get_var('UEFI')) {
|
|
||||||
$count = 4; # extra boot partition (PreP or ESP)
|
|
||||||
$devroot = 'vda3';
|
|
||||||
$devboot = 'vda2';
|
|
||||||
}
|
|
||||||
# check number of partitions
|
# check number of partitions
|
||||||
script_run 'fdisk -l | grep /dev/vda'; # debug
|
script_run 'fdisk -l | grep /dev/vda'; # debug
|
||||||
validate_script_output 'fdisk -l | grep /dev/vda | wc -l', sub { $_ =~ m/$count/ };
|
validate_script_output 'fdisk -l | grep /dev/vda | wc -l', sub { $_ =~ m/4/ };
|
||||||
# check mounted partitions are ext4 fs
|
# check mounted partitions are ext4 fs
|
||||||
script_run 'mount | grep /dev/vda'; # debug
|
script_run 'mount | grep /dev/vda'; # debug
|
||||||
validate_script_output "mount | grep /dev/$devboot", sub { $_ =~ m/on \/boot type ext4/ };
|
validate_script_output "mount | grep /dev/vda2", sub { $_ =~ m/on \/boot type ext4/ };
|
||||||
validate_script_output "mount | grep /dev/$devroot", sub { $_ =~ m/on \/ type ext4/ };
|
validate_script_output "mount | grep /dev/vda3", sub { $_ =~ m/on \/ type ext4/ };
|
||||||
}
|
}
|
||||||
|
|
||||||
sub test_flags {
|
sub test_flags {
|
||||||
|
@ -14,10 +14,14 @@ sub run {
|
|||||||
# if we're running on UEFI, we need esp
|
# if we're running on UEFI, we need esp
|
||||||
custom_blivet_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');
|
custom_blivet_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');
|
||||||
}
|
}
|
||||||
if (get_var("OFW")) {
|
elsif (get_var("OFW")) {
|
||||||
custom_blivet_add_partition(size => 4, filesystem => 'ppc_prep_boot');
|
custom_blivet_add_partition(size => 4, filesystem => 'ppc_prep_boot');
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
# from anaconda-37.12.1 onwards, GPT is default for BIOS
|
||||||
|
# installs, so we need a biosboot partition
|
||||||
|
custom_blivet_add_partition(size => 1, filesystem => 'biosboot');
|
||||||
|
}
|
||||||
custom_blivet_add_partition(size => 512, mountpoint => '/boot');
|
custom_blivet_add_partition(size => 512, mountpoint => '/boot');
|
||||||
custom_blivet_add_partition(size => 2048, filesystem => 'swap');
|
custom_blivet_add_partition(size => 2048, filesystem => 'swap');
|
||||||
custom_blivet_add_partition(mountpoint => '/');
|
custom_blivet_add_partition(mountpoint => '/');
|
||||||
|
@ -14,10 +14,14 @@ sub run {
|
|||||||
# if we're running on UEFI, we need esp
|
# if we're running on UEFI, we need esp
|
||||||
custom_blivet_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');
|
custom_blivet_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem');
|
||||||
}
|
}
|
||||||
if (get_var("OFW")) {
|
elsif (get_var("OFW")) {
|
||||||
custom_blivet_add_partition(size => 4, filesystem => 'ppc_prep_boot');
|
custom_blivet_add_partition(size => 4, filesystem => 'ppc_prep_boot');
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
# from anaconda-37.12.1 onwards, GPT is default for BIOS
|
||||||
|
# installs, so we need a biosboot partition
|
||||||
|
custom_blivet_add_partition(size => 1, filesystem => 'biosboot');
|
||||||
|
}
|
||||||
custom_blivet_add_partition(size => 512, mountpoint => '/boot');
|
custom_blivet_add_partition(size => 512, mountpoint => '/boot');
|
||||||
custom_blivet_add_partition(filesystem => 'xfs', mountpoint => '/');
|
custom_blivet_add_partition(filesystem => 'xfs', mountpoint => '/');
|
||||||
|
|
||||||
|
@ -4,11 +4,7 @@ use testapi;
|
|||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
assert_screen "root_console";
|
assert_screen "root_console";
|
||||||
my $devboot = 'vda1';
|
|
||||||
|
|
||||||
if (get_var('OFW') || get_var('UEFI')) {
|
|
||||||
$devboot = 'vda2';
|
|
||||||
}
|
|
||||||
# check that lvm is present:
|
# check that lvm is present:
|
||||||
validate_script_output "lvdisplay | grep 'LV Status'", sub { $_ =~ m/available/ };
|
validate_script_output "lvdisplay | grep 'LV Status'", sub { $_ =~ m/available/ };
|
||||||
|
|
||||||
@ -16,7 +12,7 @@ sub run {
|
|||||||
validate_script_output "lvs -o lv_attr", sub { $_ =~ m/wi-ao/ };
|
validate_script_output "lvs -o lv_attr", sub { $_ =~ m/wi-ao/ };
|
||||||
|
|
||||||
# Check that the partitions are ext4.
|
# Check that the partitions are ext4.
|
||||||
validate_script_output "mount | grep /dev/$devboot", sub { $_ =~ m/on \/boot type ext4/ };
|
validate_script_output "mount | grep /dev/vda2", sub { $_ =~ m/on \/boot type ext4/ };
|
||||||
|
|
||||||
# There should be one partition in the LVM.
|
# There should be one partition in the LVM.
|
||||||
validate_script_output "mount | grep /dev/mapper", sub { $_ =~ m/on \/ type ext4/ };
|
validate_script_output "mount | grep /dev/mapper", sub { $_ =~ m/on \/ type ext4/ };
|
||||||
|
@ -4,21 +4,13 @@ use testapi;
|
|||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
assert_screen "root_console";
|
assert_screen "root_console";
|
||||||
my $count = 3;
|
|
||||||
my $devroot = 'vda1';
|
|
||||||
my $devboot = 'vda2';
|
|
||||||
if (get_var('OFW') || get_var('UEFI')) {
|
|
||||||
$count = 4; # extra boot partition (PreP or ESP)
|
|
||||||
$devroot = 'vda2';
|
|
||||||
$devboot = 'vda3';
|
|
||||||
}
|
|
||||||
# check number of partitions
|
# check number of partitions
|
||||||
script_run 'fdisk -l | grep /dev/vda'; # debug
|
script_run 'fdisk -l | grep /dev/vda'; # debug
|
||||||
validate_script_output 'fdisk -l | grep /dev/vda | wc -l', sub { $_ =~ m/$count/ };
|
validate_script_output 'fdisk -l | grep /dev/vda | wc -l', sub { $_ =~ m/4/ };
|
||||||
# check mounted partitions are ext4 fs
|
# check mounted partitions are ext4 fs
|
||||||
script_run 'mount | grep /dev/vda'; # debug
|
script_run 'mount | grep /dev/vda'; # debug
|
||||||
validate_script_output "mount | grep /dev/$devboot", sub { $_ =~ m/on \/boot type ext4/ };
|
validate_script_output "mount | grep /dev/vda3", sub { $_ =~ m/on \/boot type ext4/ };
|
||||||
validate_script_output "mount | grep /dev/$devroot", sub { $_ =~ m/on \/ type ext4/ };
|
validate_script_output "mount | grep /dev/vda2", sub { $_ =~ m/on \/ type ext4/ };
|
||||||
}
|
}
|
||||||
|
|
||||||
sub test_flags {
|
sub test_flags {
|
||||||
|
Loading…
Reference in New Issue
Block a user