summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS3
-rw-r--r--perl-install/bootloader.pm12
-rw-r--r--perl-install/install/NEWS3
3 files changed, 16 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 4f81eea7d..6c5f76cc4 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -2,6 +2,9 @@
o forget the changed label when the user cancels
- localedrake:
o set scim-thai as default IM for Thai
+- drakboot:
+ o when installing to a removable device, put boot sector there, else
+ put it into first non removable drive (#47106)
Version 11.81 - 3 February 2009
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 32fe34898..095c581d2 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -977,8 +977,16 @@ sub suggest {
my $boot = fs::get::root($fstab, 'boot')->{device};
#- PPC xfs module requires enlarged initrd
my $xfsroot = $root_part->{fs_type} eq 'xfs';
+ my $mbr;
+
+ # If installing onto an USB drive, put the mbr there, else on the first non removable drive
+ if ($root_part->{is_removable}) {
+ $mbr = find { $_->{device} eq $root_part->{rootDevice} } $all_hds->{hds};
+ } else {
+ $mbr = find { !$_->{is_removable} } $all_hds->{hds};
+ }
- my ($onmbr, $unsafe) = $bootloader->{crushMbr} ? (1, 0) : suggest_onmbr($all_hds->{hds}[0]);
+ my ($onmbr, $unsafe) = $bootloader->{crushMbr} ? (1, 0) : suggest_onmbr($mbr);
add2hash_($bootloader, arch() =~ /ppc/ ?
{
defaultos => "linux",
@@ -999,7 +1007,7 @@ sub suggest {
timeout => $onmbr && 10,
nowarn => 1,
if_(arch() !~ /ia64/,
- boot => "/dev/" . ($onmbr ? $all_hds->{hds}[0]{device} : $boot),
+ boot => "/dev/" . ($onmbr ? $mbr->{device} : $boot),
map => "/boot/map",
compact => 1,
color => 'black/cyan yellow/cyan',
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 71b3e0d55..94db177a3 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,6 @@
+- when installing to a removable device, put boot sector there, else
+ put it into first non removable drive (#47106)
+
Version 11.83 - 6 February 2009
- update banner for Beta 1