summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-02-20 00:13:49 +0000
committerThierry Vignaud <tv@mageia.org>2013-02-20 00:13:49 +0000
commit735a306e92df9571dac6e250e1a967d3ea1c3382 (patch)
treebecc1a95f0c4bf803e9c87a0036ca29033cc0436
parentbed659f1d6797254540b665728050782e9367f50 (diff)
downloaddrakx-backup-do-not-use-735a306e92df9571dac6e250e1a967d3ea1c3382.tar
drakx-backup-do-not-use-735a306e92df9571dac6e250e1a967d3ea1c3382.tar.gz
drakx-backup-do-not-use-735a306e92df9571dac6e250e1a967d3ea1c3382.tar.bz2
drakx-backup-do-not-use-735a306e92df9571dac6e250e1a967d3ea1c3382.tar.xz
drakx-backup-do-not-use-735a306e92df9571dac6e250e1a967d3ea1c3382.zip
prevent installing grub2 somewhere else than MBR
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/any.pm8
-rw-r--r--perl-install/install/NEWS2
3 files changed, 12 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index e74b11d29..f75c75a69 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,5 @@
+- drakboot:
+ o prevent installing grub2 somewhere else than MBR
- always bypass blkid cache (the cache only includes a subset of the data we need)
Version 15.19 - 16 January 2013
diff --git a/perl-install/any.pm b/perl-install/any.pm
index b12546115..6c6857cab 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -426,6 +426,14 @@ sub setupBootloader__general {
$in->ask_from_({ #messages => N("Bootloader main options"),
title => N("Bootloader main options"),
interactive_help_id => 'setupBootloader',
+ validate => sub {
+ if ($b->{method} eq 'grub2' && $b->{boot} =~ /\d$/) {
+ log::l("Impossible to install Grub2 on something else than a MBR.\nWe should chain load grub2 when not on MBR");
+ $in->ask_warn(N("Error"), N("Grub2 cannot be installed on a partition, only on the MBR (whole disk)"));
+ return 0;
+ }
+ return 1;
+ },
}, [
#title => N("Bootloader main options"),
{ label => N("Bootloader"), title => 1 },
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 7d1f07f20..eda7aba32 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,5 @@
+- summary:
+ o prevent installing grub2 somewhere else than MBR
- always bypass blkid cache (the cache only includes a subset of the data we need)
Version 15.20 - 21 January 2013