Author: juhliarik
Date: Fri Apr 18 15:53:36 2008
New Revision: 46857
URL: http://svn.opensuse.org/viewcvs/yast?rev=46857&view=rev
Log:
added fix for "onetime boot" (bnc #381192)
added detecting of VirtualBox (skipping kexec)
M bootloader/src/clients/bootloader_finish.ycp
* fix for bug
M bootloader/src/modules/Bootloader.ycp
* added detecting to function CopyKernelInird()
Modified:
trunk/bootloader/src/clients/bootloader_finish.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=46857&r1=46856&r2=46857&view=diff
==============================================================================
--- trunk/bootloader/src/clients/bootloader_finish.ycp (original)
+++ trunk/bootloader/src/clients/bootloader_finish.ycp Fri Apr 18 15:53:36 2008
@@ -182,13 +182,17 @@
Bootloader::Read ();
// 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 ());
+ retcode = false;
+ if (Linuxrc::InstallInf ("kexec_reboot") == "1")
+ {
+ retcode = Bootloader::CopyKernelInird();
+ } else {
+ y2milestone("Installation started with kexec_reboot set 0");
+ }
+
+ // (bnc #381192) don't use it if kexec is used
+ if (!retcode)
+ return Bootloader::FlagOnetimeBoot(Bootloader::getDefaultSection ());
}
else
return retcode;
Modified: trunk/bootloader/src/modules/Bootloader.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/Bootloader.ycp?rev=46857&r1=46856&r2=46857&view=diff
==============================================================================
--- trunk/bootloader/src/modules/Bootloader.ycp (original)
+++ trunk/bootloader/src/modules/Bootloader.ycp Fri Apr 18 15:53:36 2008
@@ -1216,6 +1216,19 @@
y2milestone("Option kexec_reboot is false. kexec will not be used.");
return true;
}
+
+ // checking if installation run on VirtualBox
+ string cmd = sformat("hwinfo --bios |grep Product");
+ y2milestone("Checking if installation run on VirtualBox command: %1", cmd);
+
+ map out = (map)WFM::Execute(.local.bash_output, cmd);
+
+ if (find(out["stdout"]:"", "VirtualBox") != -1)
+ {
+ y2milestone ("Installation run on VirtualBox, skip kexec loading: %1", out);
+ return false;
+ }
+
// create defualt sections
map