SVN: PLDLiveInstaller/trunk/PLDLiveInstaller.cpp
shadzik
shadzik at pld-linux.org
Thu Jan 20 04:41:48 CET 2011
Author: shadzik
Date: Thu Jan 20 04:41:48 2011
New Revision: 12060
Modified:
PLDLiveInstaller/trunk/PLDLiveInstaller.cpp
Log:
- another try with autopartitioning
- call geninitrd from chroot
- umount /proc etc. even after fail
Modified: PLDLiveInstaller/trunk/PLDLiveInstaller.cpp
==============================================================================
--- PLDLiveInstaller/trunk/PLDLiveInstaller.cpp (original)
+++ PLDLiveInstaller/trunk/PLDLiveInstaller.cpp Thu Jan 20 04:41:48 2011
@@ -293,10 +293,10 @@
"</p></html>");
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
QStringList args, status;
- args.append("-qf");
- args.append("-uM");
+ args.append("--no-reread");
+ args.append("-I");
+ args.append("/usr/share/pldliveinstaller/default.dump");
args.append(device);
- args.append("< /usr/share/pldliveinstaller/default.table");
qDebug() << args;
QProcess * sfdisk = new QProcess(this);
sfdisk->start("sfdisk", args);
@@ -305,7 +305,7 @@
status = QString::fromLatin1(sfdisk->readAll()).split("\n");
qDebug() << status;
}
- sfdisk->waitForFinished();
+ sfdisk->waitForFinished(-1);
updateProgressBar();
sfdisk->deleteLater();
}
@@ -1623,8 +1623,10 @@
qDebug() << "Generating initrd";
QStringList args,unameargs;
QProcess * kernel = new QProcess(this);
+ unameargs.append(DESTINATION);
+ unameargs.append("uname");
unameargs.append("-r");
- kernel->start("uname", unameargs);
+ kernel->start("chroot", unameargs);
while(kernel->waitForReadyRead())
output=kernel->readAllStandardOutput();
QStringList status = QString::fromLatin1(output).split("\n");
@@ -1722,31 +1724,30 @@
if(entireDisk->isChecked())
{
- qDebug() << "starting partitioning";
+ qDebug() << "starting partitioning";
installBootLoader = false;
selFS="ext4";
doFormat=true;
- qDebug() << "initialiying solid";
-
Solid::Device partitions[2];
int i = 0;
QString tmpDev = selectedBlockDev.as<Solid::Block>()->device();
- qDebug() << "destrozing pt";
destroyPartitionTable(tmpDev);
- qDebug() << "creating pt";
createPartitionTable(tmpDev);
+ sleep(3);
foreach (Solid::Device partDev, Solid::Device::listFromType(Solid::DeviceInterface::Block, selectedBlockDev.udi() ))
{
partitions[i++]=partDev;
}
destPartition=partitions[0];
destSwap=partitions[1];
- //qDebug() << "rootpart" << destPartition << "swpapart" << destSwap;
}
- qDebug() << "IsMounted:" << isMounted(destPartition);
- if(isMounted(destPartition))
- umountDev(destPartition);
+ if(!(entireDisk->isChecked()))
+ {
+ qDebug() << "IsMounted:" << isMounted(destPartition);
+ if(isMounted(destPartition))
+ umountDev(destPartition);
+ }
if(doFormat) {
if(cont && !makeFS(destPartition)) {
@@ -1896,6 +1897,7 @@
if(cont && !geninitrd()) {
cont = false;
+ umountProcSysDev();
failText->setText("<html><p align=\"center\">"
"Failed to generate initrd.<br/><br/>"
"Click Close to close the installer.<br />"
@@ -1911,6 +1913,7 @@
if(cont && !makeGrubConfig()) {
cont = false;
+ umountProcSysDev();
failText->setText("<html><p align=\"center\">"
"Failed create grub configuration.<br/><br/>"
"Click Close to close the installer.<br />"
@@ -1923,6 +1926,7 @@
if(cont && !installGrub()) {
cont = false;
+ umountProcSysDev();
failText->setText("<html><p align=\"center\">"
"Failed to install grub on " + selectedDisk->text() + ".<br/><br/>"
"Click Close to close the installer.<br />"
More information about the pld-cvs-commit
mailing list