[yast-commit] r67835 - in /trunk/bootloader: package/yast2-bootloader.changes src/modules/BootGRUB2.ycp src/modules/BootGRUB2EFI.ycp
Author: snwint Date: Fri Mar 30 13:05:55 2012 New Revision: 67835 URL: http://svn.opensuse.org/viewcvs/yast?rev=67835&view=rev Log: - add kernel parameters (detected necessary and user specfied one during installation) to grub2's config file (bnc#752939) Modified: trunk/bootloader/package/yast2-bootloader.changes trunk/bootloader/src/modules/BootGRUB2.ycp trunk/bootloader/src/modules/BootGRUB2EFI.ycp Modified: trunk/bootloader/package/yast2-bootloader.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/package/yast2-bootloader.changes?rev=67835&r1=67834&r2=67835&view=diff ============================================================================== --- trunk/bootloader/package/yast2-bootloader.changes (original) +++ trunk/bootloader/package/yast2-bootloader.changes Fri Mar 30 13:05:55 2012 @@ -1,6 +1,12 @@ ------------------------------------------------------------------- Thu Mar 22 10:56:28 UTC 2012 - mchang@suse.com +- add kernel parameters (detected necessary and user specfied one during + installation) to grub2's config file (bnc#752939) + +------------------------------------------------------------------- +Thu Mar 22 10:56:28 UTC 2012 - mchang@suse.com + - add new grub2-efi module to support booting on UEFI firmware. ------------------------------------------------------------------- Modified: trunk/bootloader/src/modules/BootGRUB2.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootGRUB2.ycp?rev=67835&r1=67834&r2=67835&view=diff ============================================================================== --- trunk/bootloader/src/modules/BootGRUB2.ycp (original) +++ trunk/bootloader/src/modules/BootGRUB2.ycp Fri Mar 30 13:05:55 2012 @@ -24,7 +24,7 @@ textdomain "bootloader"; -import "Arch"; +import "BootArch"; import "BootCommon"; import "BootStorage"; import "Kernel"; @@ -122,6 +122,30 @@ global define void Propose () { y2milestone ("Proposed globals: %1", BootCommon::globals); grub_LocationProposal (); + + map<string, integer> swap_sizes = BootCommon::getSwapPartitions (); + list<string> swap_parts = (list<string>) + maplist (string name, integer size, swap_sizes, ``(name)); + swap_parts = sort (string a, string b, swap_parts, + ``(swap_sizes[a]:0 > swap_sizes[b]:0) + ); + + string largest_swap_part = swap_parts[0]:""; + + string resume = BootArch::ResumeAvailable () + ? largest_swap_part + : ""; + // try to use label or udev id for device name... FATE #302219 + if ((resume != "") && (resume != nil)) + resume = BootStorage::Dev2MountByDev(resume); + BootCommon::globals["append"] = BootArch::DefaultKernelParams (resume); + + // Let grub2 scripts detects correct root= for us. :) + // BootCommon::globals["root"] = BootStorage::Dev2MountByDev(BootStorage::RootPartitionDevice); + if (BootArch::VgaAvailable () && Kernel::GetVgaType () != "") + { + BootCommon::globals["vgamode"] = Kernel::GetVgaType (); + } } Modified: trunk/bootloader/src/modules/BootGRUB2EFI.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootGRUB2EFI.ycp?rev=67835&r1=67834&r2=67835&view=diff ============================================================================== --- trunk/bootloader/src/modules/BootGRUB2EFI.ycp (original) +++ trunk/bootloader/src/modules/BootGRUB2EFI.ycp Fri Mar 30 13:05:55 2012 @@ -24,7 +24,7 @@ textdomain "bootloader"; -import "Arch"; +import "BootArch"; import "BootCommon"; import "BootStorage"; import "Kernel"; @@ -116,6 +116,30 @@ global define void Propose () { y2milestone ("Proposed globals: %1", BootCommon::globals); + + map<string, integer> swap_sizes = BootCommon::getSwapPartitions (); + list<string> swap_parts = (list<string>) + maplist (string name, integer size, swap_sizes, ``(name)); + swap_parts = sort (string a, string b, swap_parts, + ``(swap_sizes[a]:0 > swap_sizes[b]:0) + ); + + string largest_swap_part = swap_parts[0]:""; + + string resume = BootArch::ResumeAvailable () + ? largest_swap_part + : ""; + // try to use label or udev id for device name... FATE #302219 + if ((resume != "") && (resume != nil)) + resume = BootStorage::Dev2MountByDev(resume); + BootCommon::globals["append"] = BootArch::DefaultKernelParams (resume); + + // Let grub2 scripts detects correct root= for us. :) + // BootCommon::globals["root"] = BootStorage::Dev2MountByDev(BootStorage::RootPartitionDevice); + if (BootArch::VgaAvailable () && Kernel::GetVgaType () != "") + { + BootCommon::globals["vgamode"] = Kernel::GetVgaType (); + } } /** -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
snwint@svn2.opensuse.org