diff options
author | Thierry Vignaud <tv@mageia.org> | 2013-02-20 00:13:49 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2013-02-20 00:13:49 +0000 |
commit | abd611d40306ac300f97c57c9f5cc26fcb6cabef (patch) | |
tree | becc1a95f0c4bf803e9c87a0036ca29033cc0436 /perl-install/any.pm | |
parent | 2bfb1fffb1703cde5bc8205f3c3e352b33e72da5 (diff) | |
download | drakx-abd611d40306ac300f97c57c9f5cc26fcb6cabef.tar drakx-abd611d40306ac300f97c57c9f5cc26fcb6cabef.tar.gz drakx-abd611d40306ac300f97c57c9f5cc26fcb6cabef.tar.bz2 drakx-abd611d40306ac300f97c57c9f5cc26fcb6cabef.tar.xz drakx-abd611d40306ac300f97c57c9f5cc26fcb6cabef.zip |
prevent installing grub2 somewhere else than MBR
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r-- | perl-install/any.pm | 8 |
1 files changed, 8 insertions, 0 deletions
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 }, |