summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2010-05-24 14:13:57 +0000
committerPascal Terjan <pterjan@mandriva.org>2010-05-24 14:13:57 +0000
commiteae662565f84338e8e2823200c61d45a68ece758 (patch)
tree4523eb210b9b95b5078a954cc8d39e1c4712c919 /perl-install
parent5aeee52087bef62b1257c82a72ef0c930899a2fb (diff)
downloaddrakx-eae662565f84338e8e2823200c61d45a68ece758.tar
drakx-eae662565f84338e8e2823200c61d45a68ece758.tar.gz
drakx-eae662565f84338e8e2823200c61d45a68ece758.tar.bz2
drakx-eae662565f84338e8e2823200c61d45a68ece758.tar.xz
drakx-eae662565f84338e8e2823200c61d45a68ece758.zip
force raid metadata to be 0.90 if /boot is on raid 1
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS4
-rw-r--r--perl-install/fsedit.pm20
-rw-r--r--perl-install/install/NEWS1
3 files changed, 21 insertions, 4 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 5fb297038..adca4eb48 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,8 +1,8 @@
- display_release_notes.pl: don't use ::isInstall to position the release not
window on top of everything (doesn't work on the Ones), use
any::set_wm_hints_if_needed instead (#59155)
-- allow forcing raid metadata version
-- load raid metadata version
+- handle raid metadata version
+- force raid metadata to be 0.90 if /boot is on raid 1
- fix detection of /var partition
Version 13.28 - 19 May 2010
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 6b71d372d..787d105b8 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -427,10 +427,26 @@ sub check_mntpoint {
fs::get::mntpoint2part($mntpoint, [ grep { $_ ne $part } fs::get::really_all_fstab($all_hds) ]) and die N("There is already a partition with mount point %s\n", $mntpoint);
if ($mntpoint eq "/" && isRAID($part) && !fs::get::has_mntpoint("/boot", $all_hds)) {
- my $md_part = fs::get::device2part($part->{raid}, $all_hds->{raids});
cdie N("You've selected a software RAID partition as root (/).
No bootloader is able to handle this without a /boot partition.
-Please be sure to add a /boot partition") if $md_part->{level} ne '1'; # lilo handles / on RAID1
+Please be sure to add a /boot partition") if $part->{level} ne '1'; # lilo handles / on RAID1
+ # LILO only handles 0.90 metadata
+ if ($part->{isFormatted} && $part->{metadata} && $part->{metadata} ne '0.90') {
+ cdie N("Metadata version unsupported for a boot partition. Please be sure to add a /boot partition.");
+ } else {
+ $part->{metadata} = '0.90';
+ }
+ }
+
+ if ($mntpoint eq "/boot" && isRAID($part)) {
+ die N("You've selected a software RAID partition as /boot.
+No bootloader is able to handle this.") if $part->{level} ne '1'; # lilo handles /boot on RAID1
+ # LILO only handles 0.90 metadata
+ if ($part->{isFormatted} && $part->{metadata} && $part->{metadata} ne '0.90') {
+ die N("Metadata version unsupported for a boot partition.");
+ } else {
+ $part->{metadata} = '0.90';
+ }
}
if ($mntpoint eq "/" && (isLUKS($part) || isRawLUKS($part)) && !fs::get::has_mntpoint("/boot", $all_hds)) {
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index b28c2a43e..b2f55a013 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,4 +1,5 @@
- fix detection of /var partition
+- force raid metadata to be 0.90 if /boot is on raid 1
Version 13.27 - 18 May 2010