Skip to content

Commit

Permalink
spvm: Format all disks before the test starts
Browse files Browse the repository at this point in the history
  • Loading branch information
Soulofdestiny committed Jan 28, 2020
1 parent 2f52b65 commit 6458a17
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/bootloader_pvm.pm
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,15 @@ sub prepare_pvm_installation {

# Delete partition table before starting installation
select_console('install-shell');
foreach my $disk (split(',', get_var('DISK_DEVICES', 'sda'))) {
script_run("wipefs -a /dev/$disk");

# first disk is always sda
my $dev_id = 'a';
foreach my $n (1 .. get_var('NUMDISKS', 1)) {
script_run("wipefs -a /dev/sd$dev_id");
# For cryptlvm+activate existing scenario, create empty enrypted partition
create_encrypted_part("$disk") if get_var('ENCRYPT_ACTIVATE_EXISTING');
create_encrypted_part("sd$dev_id") if get_var('ENCRYPT_ACTIVATE_EXISTING');
# apply next letter as dev_id as we assume that they are just incremented
$dev_id = chr((ord $dev_id) + 1);
}
# Switch to installation console (ssh or vnc)
select_console('installation');
Expand Down

0 comments on commit 6458a17

Please sign in to comment.