Author: juhliarik
Date: Fri Apr 11 15:53:31 2008
New Revision: 46420
URL: http://svn.opensuse.org/viewcvs/yast?rev=46420&view=rev
Log:
added handling options for calling kexec instead of reboot
on the end of the 1st stage (fate #303395)
M bootloader/src/clients/bootloader_finish.ycp
* added calling function Bootloader::CopyKernelInird()
M bootloader/src/modules/Bootloader.ycp
* added function CopyKernelInird()
M bootloader/src/modules/BootCommon.ycp
* added installation kexec-tools
Modified:
trunk/bootloader/src/clients/bootloader_finish.ycp
trunk/bootloader/src/modules/BootCommon.ycp
trunk/bootloader/src/modules/Bootloader.ycp
Modified: trunk/bootloader/src/clients/bootloader_finish.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/clients/bootloader_finish.ycp?rev=46420&r1=46419&r2=46420&view=diff
==============================================================================
--- trunk/bootloader/src/clients/bootloader_finish.ycp (original)
+++ trunk/bootloader/src/clients/bootloader_finish.ycp Fri Apr 11 15:53:31 2008
@@ -26,6 +26,9 @@
import "BootCommon";
import "Update";
+// added for fate# 303395
+import "Linuxrc";
+
any ret = nil;
string func = "";
@@ -164,11 +167,10 @@
if (!Mode::update ())
{
- //retcode = Bootloader::Write ();
retcode = Bootloader::WriteInstallation();
}
else
- {
+ {
retcode = Bootloader::Update (
Installation::installedVersion,
Installation::updateVersion);
@@ -178,10 +180,19 @@
// re-read external changes, then boot through to second stage of
// installation or update
Bootloader::Read ();
- return Bootloader::FlagOnetimeBoot(Bootloader::getDefaultSection ());
+ // fate #303395: Use kexec to avoid booting between first and second stage
+ // copy vmlinuz, initrd and flush kernel option into /var/lib/YaST2
+ if (Linuxrc::InstallInf ("kexec_reboot") != "0")
+ Bootloader::CopyKernelInird();
+ else
+ y2milestone("Installation started with kexec_reboot set 0 or without kexec_reboot option");
+
+
+ return Bootloader::FlagOnetimeBoot(Bootloader::getDefaultSection ());
}
else
return retcode;
+
}
else
{
Modified: trunk/bootloader/src/modules/BootCommon.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootCommon.ycp?rev=46420&r1=46419&r2=46420&view=diff
==============================================================================
--- trunk/bootloader/src/modules/BootCommon.ycp (original)
+++ trunk/bootloader/src/modules/BootCommon.ycp Fri Apr 11 15:53:31 2008
@@ -33,6 +33,8 @@
import "String";
import "Pkg";
+import "Linuxrc";
+
// General bootloader settings
@@ -987,8 +989,19 @@
&& contains(bootloaders, bootloader)
&& ! Mode::test ())
{
- list<string> bootloader_packages =
- bootloader_attribs[bootloader, "required_packages"]:[];
+ // added kexec-tools fate# 303395
+ // if kexec option is equal 0 or running live installation
+ // doesn't install kexec-tools
+
+ list<string> bootloader_packages =[];
+ if ((! Mode::live_installation())
+ && (Linuxrc::InstallInf ("kexec_reboot") != "0"))
+ {
+ bootloader_packages = bootloader_attribs[bootloader, "kexec-tools", "required_packages"]:[];
+ } else {
+ bootloader_packages = bootloader_attribs[bootloader, "required_packages"]:[];
+ }
+
// don't configure package manager during autoinstallation preparing
if (Mode::normal () && (! (Mode::config () || Mode::repair ())))
{
Modified: trunk/bootloader/src/modules/Bootloader.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/Bootloader.ycp?rev=46420&r1=46419&r2=46420&view=diff
==============================================================================
--- trunk/bootloader/src/modules/Bootloader.ycp (original)
+++ trunk/bootloader/src/modules/Bootloader.ycp Fri Apr 11 15:53:31 2008
@@ -30,6 +30,7 @@
import "Progress";
import "Stage";
import "Storage";
+ import "Directory";
// import "BootABOOT";
import "BootELILO";
@@ -38,6 +39,8 @@
// import "BootS390";
import "BootGRUB";
import "BootPOWERLILO"; // The ppc-LILO File
+ //fate 303395
+ import "ProductFeatures";
// interface for clients
global define map Export ();
@@ -606,9 +609,11 @@
// read current settings...
ret = blRead (true, false);
- // delete duplicated sections
- DelDuplicatedSections();
-
+ if (! Mode::live_installation())
+ {
+ // delete duplicated sections
+ DelDuplicatedSections();
+ }
if (BootCommon::write_settings["save_all"]:false)
BootCommon::save_all = true;
if (BootCommon::save_all)
@@ -719,6 +724,7 @@
y2milestone("linux_default: %1", linux_default);
y2milestone("linux_failsafe: %1", linux_failsafe);
+
y2milestone("Boot sections BEFORE deleting: %1", BootCommon::sections);
BootCommon::sections=filter(map