summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/any.pm1
-rw-r--r--perl-install/bootloader.pm8
-rw-r--r--perl-install/install/NEWS1
4 files changed, 8 insertions, 3 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 38c5773d8..18579d645 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,6 +1,7 @@
- diskdrake:
o fix preserving UUID when formating jfs/nilfs/xfs
- drakboot:
+ o add a "Do not touch ESP or MBR" option (mga#18770)
o do not offer to pick the disk where to install grub2 on UEFI
o filter GPT disks w/o a BIOS boot part (mga#18770)
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 8d804cade..d878766f5 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -637,6 +637,7 @@ sub setupBootloader__grub2 {
{ label => N("Append"), val => \$append },
{ label => N("Video mode"), val => \$vga, list => [ '', Xconfig::resolution_and_depth::bios_vga_modes() ],
format => \&Xconfig::resolution_and_depth::to_string, advanced => 1 },
+ { text => N("Do not touch ESP or MBR"), val => \$b->{no_esp_or_mbr}, type => 'bool', advanced => 1 },
{ text => N("Probe Foreign OS"), val => \$os_prober, type => 'bool' },
]);
if ($res) {
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index d0d8def1f..d6961f429 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -710,7 +710,9 @@ sub allowed_boot_parts {
if_($bootloader->{method} =~ /lilo/,
grep { $_->{level} eq '1' } @{$all_hds->{raids}}
),
- (grep { !isFat_or_NTFS($_) } fs::get::fstab($all_hds)), # filesystems except those who do not leave space for our bootloaders
+ (if_(main_method($bootloader->{method}) ne 'grub2',
+ grep { !isFat_or_NTFS($_) } fs::get::fstab($all_hds)), # filesystems except those who do not leave space for our bootloaders
+ ),
detect_devices::floppies(),
);
}
@@ -1918,9 +1920,9 @@ sub write_grub2_install_sh {
my $boot = $bootloader->{boot};
my @options;
if (is_uefi()) {
- push @options, qw(--bootloader-id=tmp --no-nvram) if $boot =~ /\d$/;
+ push @options, qw(--bootloader-id=tmp --no-nvram) if $bootloader->{no_esp_or_mbr};
} else {
- @options = $boot =~ /\d$/ ? ('--grub-setup=/bin/true', $boot) : $boot;
+ @options = $bootloader->{no_esp_or_mbr} ? ('--grub-setup=/bin/true', $boot) : $boot;
}
renamef($f, $f . ($o_backup_extension || '.old'));
output_with_perm($f, 0755, join(' ', 'grub2-install', @options));
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 09c665086..9356129c9 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,4 +1,5 @@
- bootloader configuration:
+ o add a "Do not touch ESP or MBR" option (mga#18770)
o do not offer to pick the disk where to install grub2 on UEFI
o filter GPT disks w/o a BIOS boot part (mga#18770)
- logs: