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... ============================================================================== --- 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... ============================================================================== --- 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<string,any> linux_default = BootCommon::CreateLinuxSection ("linux"); @@ -1240,13 +1253,13 @@ WFM::Execute(.local.mkdir, "/var/lib/YaST2"); // build command for copy kernel and initrd to /var/lib/YaST during instalation - string cmd = nil; + cmd = nil; cmd = sformat("/bin/cp %1%2 %1%3 %4", Installation::destdir, tostring(default_section["image"]:""), tostring(default_section["initrd"]:""), Directory::vardir); y2milestone("Command for copy: %1", cmd); - map out = (map) WFM::Execute (.local.bash_output, cmd); + out = (map) WFM::Execute (.local.bash_output, cmd); if (out["exit"]:nil != 0) { y2error ("Copy kernel and initrd failed, output: %1", out); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org