summaryrefslogtreecommitdiffstats
path: root/perl-install/install/install2.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install/install2.pm')
-rw-r--r--perl-install/install/install2.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm
index e410de60c..3fea4f0ce 100644
--- a/perl-install/install/install2.pm
+++ b/perl-install/install/install2.pm
@@ -194,6 +194,15 @@ sub selectInstallClass {
sub doPartitionDisks {
my ($auto) = @_;
$o->{steps}{formatPartitions}{done} = 0;
+ if ($o->{method} eq 'cdrom') {
+ #- Exclude the installer medium from the devices we can install onto.
+ #- This is needed when the installer medium is a USB Flash drive, to
+ #- prevent the user inadvertently overwriting the installer and to
+ #- prevent the installer ESP being used as the installed system ESP
+ # (mga#26714).
+ my $installer_device = $o->{stage2_phys_medium}{device};
+ @{$o->{all_hds}{hds}} = grep { $_->{device} ne $installer_device } @{$o->{all_hds}{hds}};
+ }
installStepsCall($o, $auto, 'doPartitionDisksBefore');
installStepsCall($o, $auto, 'doPartitionDisks');
installStepsCall($o, $auto, 'doPartitionDisksAfter');