Permalink
Browse files

When user is installing to a MBR slice, and declines to install GRUB …

…on MBR, we

will instead stamp it on the particular slice being used. Then the user
can manage their own MBR boot-loader to chain-load GRUB from the slice
  • Loading branch information...
1 parent dfee0c1 commit 1bfa1e03e745ff2437205cc63bd3a249d2f3d3e2 @kmoore134 kmoore134 committed Sep 2, 2013
Showing with 29 additions and 10 deletions.
  1. +8 −2 src-qt4/pc-installgui/installer.cpp
  2. +18 −5 src-qt4/pc-installgui/wizardDisk.cpp
  3. +3 −3 src-qt4/pc-installgui/wizardDisk.ui
@@ -1081,8 +1081,14 @@ QStringList Installer::getDiskCfgSettings()
// Are we loading a boot-loader?
if ( loadMBR )
tmpList << "bootManager=GRUB";
- else
- tmpList << "bootManager=none";
+ else {
+ // If the user declined the GRUB MBR, but we are still using a slice, install it to the slice
+ // for chain-loading later
+ if ( tmpSlice != "ALL" && ! loadGPT )
+ tmpList << "bootManager=GRUB-slice";
+ else
+ tmpList << "bootManager=none";
+ }
// Set the GPT/MBR options
if ( loadGPT )
@@ -105,6 +105,13 @@ void wizardDisk::accept()
// Are we installing GRUB?
useGRUB = checkGRUB->isChecked();
+
+ if ( comboPartition->currentIndex() != 0 && ! useGRUB ) {
+ QMessageBox::warning(this, tr("No boot-loader!"),
+ tr("You have chosen not to install GRUB on your MBR. You will need to manually setup your own MBR loader."),
+ QMessageBox::Ok,
+ QMessageBox::Ok);
+ }
// When doing advanced ZFS setups, make sure to use GPT
if ( radioAdvanced->isChecked() && groupZFSOpts->isChecked() )
@@ -172,6 +179,7 @@ int wizardDisk::nextId() const
// Logic checks to see if we are ready to move onto next page
bool wizardDisk::validatePage()
{
+
// Generate suggested disk layout and show disk tree
if ( prevID == Page_BasicDisk && currentId() == Page_Mounts) {
generateDiskLayout();
@@ -214,15 +222,20 @@ bool wizardDisk::validatePage()
button(QWizard::NextButton)->setEnabled(true);
return true;
case Page_BasicDisk:
- if ( comboPartition->currentIndex() == 0 && radioAdvanced->isChecked()) {
- checkGPT->setVisible(true);
- checkForce4K->setVisible(true);
- } else {
+
+ if ( ! radioAdvanced->isChecked() ) {
checkGPT->setChecked(false);
checkGPT->setVisible(false);
checkForce4K->setVisible(false);
checkForce4K->setChecked(false);
- }
+ } else {
+ checkGPT->setVisible(true);
+ checkForce4K->setVisible(true);
+ if ( comboPartition->currentIndex() == 0)
+ checkGRUB->setText(tr("Install GRUB (Required for Boot-Environment support)"));
+ else
+ checkGRUB->setText(tr("Stamp GRUB on MBR"));
+ }
// Doing a Advanced install
if ( radioAdvanced->isChecked() && groupZFSPool->isChecked() )
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>628</width>
- <height>385</height>
+ <width>641</width>
+ <height>386</height>
</rect>
</property>
<property name="windowTitle">
@@ -426,7 +426,7 @@
<item row="7" column="1">
<widget class="QCheckBox" name="checkGRUB">
<property name="text">
- <string>Install GRUB boot-loader (Required for Boot-Environment support)</string>
+ <string>Install GRUB (Required for Boot-Environment support)</string>
</property>
<property name="checked">
<bool>true</bool>

0 comments on commit 1bfa1e0

Please sign in to comment.