diff options
author | Pascal Terjan <pterjan@mandriva.org> | 2009-02-09 18:09:29 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mandriva.org> | 2009-02-09 18:09:29 +0000 |
commit | f0c56a51a76547a8357c17f31ebee1edf74cc227 (patch) | |
tree | c613a88d11140b4e3432e91933a27cebc753953a /perl-install | |
parent | f6a6c074b5a9bd50c5437607c31d0b14a25982ef (diff) | |
download | drakx-backup-do-not-use-f0c56a51a76547a8357c17f31ebee1edf74cc227.tar drakx-backup-do-not-use-f0c56a51a76547a8357c17f31ebee1edf74cc227.tar.gz drakx-backup-do-not-use-f0c56a51a76547a8357c17f31ebee1edf74cc227.tar.bz2 drakx-backup-do-not-use-f0c56a51a76547a8357c17f31ebee1edf74cc227.tar.xz drakx-backup-do-not-use-f0c56a51a76547a8357c17f31ebee1edf74cc227.zip |
When installing to a removable device, put boot sector there, else put it into first non removable drive (#47106)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/NEWS | 3 | ||||
-rw-r--r-- | perl-install/bootloader.pm | 12 | ||||
-rw-r--r-- | perl-install/install/NEWS | 3 |
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 |