Permalink
Browse files

Update installer GUI to provide option to use old FreeBSD boot-loader

this will work for users who don't care about BE's or want to test
the FreeBSD loader when it begins to get these features.

Update pc-sysinstall backend to work with BSD/bsd GRUB/grub as the
bootManager= string
  • Loading branch information...
1 parent 73ddd0e commit 07eb74c9b0f3ce66c29c9b4c2f7c3e55896b22c2 @kmoore134 kmoore134 committed Oct 23, 2013
@@ -34,8 +34,8 @@ Installer::Installer(QWidget *parent) : QMainWindow(parent)
backButton->setText(tr("&Back"));
nextButton->setText(tr("&Next"));
- // Init the MBR to yes
- loadMBR = true;
+ // Init the boot-loader
+ bootLoader = QString("GRUB");
// Init the GPT to no
loadGPT = false;
@@ -505,7 +505,7 @@ void Installer::slotDiskCustomizeClicked()
wDisk->setWindowModality(Qt::ApplicationModal);
if ( radioRestore->isChecked() )
wDisk->setRestoreMode();
- connect(wDisk, SIGNAL(saved(QList<QStringList>, bool, bool, QString, bool)), this, SLOT(slotSaveDiskChanges(QList<QStringList>, bool, bool, QString, bool)));
+ connect(wDisk, SIGNAL(saved(QList<QStringList>, QString, bool, QString, bool)), this, SLOT(slotSaveDiskChanges(QList<QStringList>, QString, bool, QString, bool)));
wDisk->show();
wDisk->raise();
}
@@ -536,14 +536,14 @@ void Installer::slotSaveMetaChanges(QStringList sPkgs)
textDeskSummary->setText(tr("The following meta-pkgs will be installed:") + "<br>" + selectedPkgs.join("<br>"));
}
-void Installer::slotSaveDiskChanges(QList<QStringList> newSysDisks, bool MBR, bool GPT, QString zName, bool zForce )
+void Installer::slotSaveDiskChanges(QList<QStringList> newSysDisks, QString BL, bool GPT, QString zName, bool zForce )
{
+ bootLoader=BL;
zpoolName = zName;
force4K = zForce;
// Save the new disk layout
- loadMBR = MBR;
loadGPT = GPT;
sysFinalDiskLayout = newSysDisks;
textEditDiskSummary->clear();
@@ -1090,17 +1090,8 @@ QStringList Installer::getDiskCfgSettings()
tmpList << "disk" + tmp.setNum(disk) + "=" + workingDisk;
tmpList << "partition=" + tmpSlice;
- // Are we loading a boot-loader?
- if ( loadMBR )
- tmpList << "bootManager=GRUB";
- 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";
- }
+ // Which boot-loader are we stamping?
+ tmpList << "bootManager=" + bootLoader;
// Set the GPT/MBR options
if ( loadGPT )
@@ -47,7 +47,7 @@ private slots:
// Disk slots
void slotDiskCustomizeClicked();
- void slotSaveDiskChanges(QList<QStringList>, bool, bool, QString, bool);
+ void slotSaveDiskChanges(QList<QStringList>, QString, bool, QString, bool);
// Slots for the installation
void slotInstallProcFinished( int exitCode, QProcess::ExitStatus status);
@@ -125,7 +125,7 @@ private slots:
QList<QStringList> sysDisks; // Our lists which contains disk info
QList<QStringList> sysPartitions; // Our lists which contains partition info
QList<QStringList> sysFinalDiskLayout; // Our lists which contains the final disk layout
- bool loadMBR;
+ QString bootLoader;
bool loadGPT;
int systemMemory; // Ammount of system RAM we have in MB
QList<QStringList> listComponents; // QStringList for our available components
@@ -97,19 +97,21 @@ void wizardDisk::slotClose()
void wizardDisk::accept()
{
- bool useGRUB = true;
+ QString bootLoader;
bool useGPT = false;
bool force4K = false;
QString zpoolName;
if (comboPartition->currentIndex() == 0 )
useGPT = checkGPT->isChecked();
- // Are we installing GRUB?
- useGRUB = checkGRUB->isChecked();
+ // Get the boot-loader
+ bootLoader = comboBootLoader->currentText();
+ if ( radioBasic->isChecked() )
+ bootLoader="GRUB";
- if ( comboPartition->currentIndex() != 0 && ! useGRUB ) {
+ if ( comboPartition->currentIndex() != 0 && bootLoader == "NONE" ) {
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."),
+ tr("You have chosen not to install a boot-loader. You will need to manually setup your own loader."),
QMessageBox::Ok,
QMessageBox::Ok);
}
@@ -126,9 +128,9 @@ void wizardDisk::accept()
zpoolName = lineZpoolName->text();
if ( radioExpert->isChecked() )
- emit saved(sysFinalDiskLayout, false, false, zpoolName, force4K);
+ emit saved(sysFinalDiskLayout, QString("NONE"), false, zpoolName, force4K);
else
- emit saved(sysFinalDiskLayout, useGRUB, useGPT, zpoolName, force4K);
+ emit saved(sysFinalDiskLayout, bootLoader, useGPT, zpoolName, force4K);
close();
}
@@ -140,13 +142,15 @@ int wizardDisk::nextId() const
return Page_Expert;
if (radioBasic->isChecked()) {
checkGPT->setVisible(false);
- checkGRUB->setVisible(false);
+ comboBootLoader->setVisible(false);
+ textBootLoader->setVisible(false);
checkForce4K->setVisible(false);
groupZFSPool->setVisible(false);
}
if (radioAdvanced->isChecked()) {
checkGPT->setVisible(true);
- checkGRUB->setVisible(true);
+ comboBootLoader->setVisible(true);
+ textBootLoader->setVisible(true);
checkForce4K->setVisible(true);
groupZFSPool->setVisible(true);
}
@@ -237,10 +241,6 @@ bool wizardDisk::validatePage()
} 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
@@ -92,7 +92,7 @@ private slots:
enum { Page_Intro, Page_BasicDisk, Page_ZFS, Page_Mounts, Page_Expert, Page_Confirmation };
signals:
- void saved(QList<QStringList>, bool, bool, QString, bool);
+ void saved(QList<QStringList>, QString, bool, QString, bool);
} ;
#endif // WIZDISK_H
Oops, something went wrong.

0 comments on commit 07eb74c

Please sign in to comment.