summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-08-05 03:07:20 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-08-05 03:07:20 +0000
commit8ffe7cf47a95d4c27074bae33574ee8b8a1e6e94 (patch)
tree6be2b45ee104f3be0e7ee5b6b5e1d0165814ff51
parent84fa95efd0a2ea10e89837aa7ef6ca575f08f727 (diff)
downloaddrakx-8ffe7cf47a95d4c27074bae33574ee8b8a1e6e94.tar
drakx-8ffe7cf47a95d4c27074bae33574ee8b8a1e6e94.tar.gz
drakx-8ffe7cf47a95d4c27074bae33574ee8b8a1e6e94.tar.bz2
drakx-8ffe7cf47a95d4c27074bae33574ee8b8a1e6e94.tar.xz
drakx-8ffe7cf47a95d4c27074bae33574ee8b8a1e6e94.zip
create bootloader::allowed_boot_parts() and use it,
it allows installing on md0 if using lilo and md0 is raid1
-rw-r--r--perl-install/any.pm2
-rw-r--r--perl-install/bootloader.pm12
2 files changed, 13 insertions, 1 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 5017ac753..823f0fdec 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -209,7 +209,7 @@ sub setupBootloader__general {
}, [
{ label => N("Bootloader to use"), val => \$b->{method}, list => \@method_choices, format => \&bootloader::method2text },
if_(arch() !~ /ia64/,
- { label => N("Boot device"), val => \$b->{boot}, list => [ map { "/dev/$_" } (map { $_->{device} } (@{$all_hds->{hds}}, grep { !isFat_or_NTFS($_) } @$fstab)), detect_devices::floppies_dev() ], not_edit => !$::expert },
+ { label => N("Boot device"), val => \$b->{boot}, list => [ map { "/dev/$_->{device}" } bootloader::allowed_boot_parts($b, $all_hds) ], not_edit => !$::expert },
),
{ label => N("Delay before booting default image"), val => \$b->{timeout} },
{ text => N("Enable ACPI"), val => \$force_acpi, type => 'bool' },
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index e31249d9a..12b918474 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -310,6 +310,18 @@ sub suggest_onmbr {
($onmbr, $unsafe);
}
+sub allowed_boot_parts {
+ my ($bootloader, $all_hds) = @_;
+ (
+ @{$all_hds->{hds}},
+ if_($bootloader->{method} =~ /lilo/,
+ grep { $_ && $_->{level} eq '1' } @{$all_hds->{raids}}
+ ),
+ (grep { !isFat_or_NTFS($_) } fs::get::hds_fstab(@{$all_hds->{hds}})),
+ detect_devices::floppies(),
+ );
+}
+
sub same_entries {
my ($a, $b) = @_;