Navigation Menu

Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
When user is installing to a MBR slice, and declines to install GRUB …
Browse files Browse the repository at this point in the history
…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
Kris Moore committed Sep 2, 2013
1 parent dfee0c1 commit 1bfa1e0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
10 changes: 8 additions & 2 deletions src-qt4/pc-installgui/installer.cpp
Expand Up @@ -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 )
Expand Down
23 changes: 18 additions & 5 deletions src-qt4/pc-installgui/wizardDisk.cpp
Expand Up @@ -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() )
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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() )
Expand Down
6 changes: 3 additions & 3 deletions src-qt4/pc-installgui/wizardDisk.ui
Expand Up @@ -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">
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 1bfa1e0

Please sign in to comment.