diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-06-24 01:38:52 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-06-24 01:41:31 +0200 |
commit | 5299be0d043982d2e8180d7b56c26331ae57b8e9 (patch) | |
tree | f217fda04cf88818a3de3db9206517506cc32526 /perl-install/bootloader.pm | |
parent | 2b1bc03858825e25c142be6bdd8010a05e420507 (diff) | |
download | drakx-5299be0d043982d2e8180d7b56c26331ae57b8e9.tar drakx-5299be0d043982d2e8180d7b56c26331ae57b8e9.tar.gz drakx-5299be0d043982d2e8180d7b56c26331ae57b8e9.tar.bz2 drakx-5299be0d043982d2e8180d7b56c26331ae57b8e9.tar.xz drakx-5299be0d043982d2e8180d7b56c26331ae57b8e9.zip |
add a "Do not touch ESP or MBR" option (mga#18770)
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r-- | perl-install/bootloader.pm | 8 |
1 files changed, 5 insertions, 3 deletions
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)); |