summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-03-01 17:09:24 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-03-01 17:09:24 +0000
commit125d944aa8e904893e5e80afde17fbdf0281cc53 (patch)
tree2e8fcf5c78991e5414a7a51aa497e4cf59ccb9ef /perl-install/any.pm
parentd2250e844a04efba559497c404e3b3ddbc9684f2 (diff)
downloaddrakx-backup-do-not-use-125d944aa8e904893e5e80afde17fbdf0281cc53.tar
drakx-backup-do-not-use-125d944aa8e904893e5e80afde17fbdf0281cc53.tar.gz
drakx-backup-do-not-use-125d944aa8e904893e5e80afde17fbdf0281cc53.tar.bz2
drakx-backup-do-not-use-125d944aa8e904893e5e80afde17fbdf0281cc53.tar.xz
drakx-backup-do-not-use-125d944aa8e904893e5e80afde17fbdf0281cc53.zip
ask which hard drive is the booting one when there is mixed kind of drives
(scsi+ide, ide2+ide) and the bootloader is not installed on MBR
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm26
1 files changed, 22 insertions, 4 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index f1323bbe4..ce7e93feb 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -98,14 +98,17 @@ sub setupBootloader {
my $automatic = !$::expert && $more < 1;
my $semi_auto = !$::expert && arch() !~ /ia64/;
my $ask_per_entries = $::expert || $more > 1;
- $automatic = 0 if arch() =~ /ppc/; #- no auto for PPC yet
- if ((grep { $_->{device} =~ /^sd/ } @$hds) && (grep { $_->{device} =~ /^hd/ } @$hds) ||
- (grep { $_->{device} =~ /^hd[fghi]/ } @$hds) && (grep { $_->{device} =~ /^hd[abcd]/ } @$hds)
- ) {
+ my $prev_boot = $b->{boot};
+ my $mixed_kind_of_disks =
+ (grep { $_->{device} =~ /^sd/ } @$hds) && (grep { $_->{device} =~ /^hd/ } @$hds) ||
+ (grep { $_->{device} =~ /^hd[fghi]/ } @$hds) && (grep { $_->{device} =~ /^hd[abcd]/ } @$hds);
+
+ if ($mixed_kind_of_disks) {
$automatic = $semi_auto = 0;
#- full expert questions when there is 2 kind of disks
#- it would need a semi_auto asking on which drive the bios boots...
}
+ $automatic = 0 if arch() =~ /ppc/; #- no auto for PPC yet
if ($automatic) {
#- automatic
@@ -226,6 +229,21 @@ sub setupBootloader {
}
}
+ #- remove bios mapping if the user changed the boot device
+ delete $b->{bios} if $b->{boot} ne $prev_boot;
+
+ if ($mixed_kind_of_disks &&
+# $b->{boot} !~ /$hds->[0]{device}/ && #- not the first disk
+ $b->{boot} =~ /\d$/ && #- on a partition
+ is_empty_hash_ref($b->{bios}) #- some bios mapping already there
+ ) {
+ my $hd = $in->ask_from_listf('', _("You decided to install the bootloader on a partition.
+This implies you already have a bootloader on the hard drive you boot (eg: System Commander).
+
+On which drive are you booting?"), \&partition_table::description, $hds) or goto &setupBootloader;
+ $b->{first_hd_device} = "/dev/$hd->{device}";
+ }
+
$ask_per_entries or return 1;
while (1) {