Author: juhliarik
Date: Mon Jun 8 16:17:39 2009
New Revision: 57502
URL: http://svn.opensuse.org/viewcvs/yast?rev=57502&view=rev
Log:
- added fix for installation on HVM guest
- added fix for installation where /boot directory is on logical
partition
Modified:
branches/SuSE-SLE-10-SP3-Branch/bootloader/VERSION
branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/misc.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootGRUB.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/lilolike.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/misc.ycp
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/VERSION?rev=57502&r1=57501&r2=57502&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/VERSION (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/VERSION Mon Jun 8 16:17:39 2009
@@ -1 +1 @@
-2.13.158
+2.13.159
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes?rev=57502&r1=57501&r2=57502&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes Mon Jun 8 16:17:39 2009
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Mon Jun 8 16:12:37 CEST 2009 - juhliarik@suse.cz
+
+- added fix for HVM guest installation and update (bnc#501987)
+- added fix for troubles with installing on logical partition
+ (bnc#509828)
+- 2.13.159
+
+-------------------------------------------------------------------
Fri May 15 12:35:35 CEST 2009 - juhliarik@suse.cz
- added support for reipl (FATE#305938)
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/misc.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/misc.ycp?rev=57502&r1=57501&r2=57502&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/misc.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/misc.ycp Mon Jun 8 16:17:39 2009
@@ -368,7 +368,7 @@
foreach (string d, disks_to_rewrite, {
y2milestone ("Copying generic MBR code to %1", d);
string command = sformat (
- "/bin/dd bs=446 count=1 if=%1 of=%2",
+ "/bin/dd bs=440 count=1 if=%1 of=%2",
"/usr/lib/boot/master-boot-code",
d);
y2milestone ("Running command %1", command);
@@ -622,7 +622,7 @@
// contain boot code
// - 0 for a "Generic MBR" (DOS MBR)
// - 1 for a GRUB or lilo "stage 1"
- // - 0 for an unknown MBR
+ // - 1 for an unknown MBR
// check if there is raid and if it soft-raid select correct device for analyse MBR
// bnc #398356
@@ -684,7 +684,12 @@
{
// if not installing to MBR, always activate (so the generic MBR will
// boot Linux)
+ // kokso: fix the problem with proposing installation generic boot code to "/" or "/boot"
+ // kokso: if boot device is on logical partition
+ if (is_logical && (extended != nil) && (BootCommon::globals["generic_mbr"]:"" == "true"))
+ selected_location = `extended;
BootCommon::globals["activate"] = "true";
+ SetBootloaderDevice(selected_location);
}
return selected_location;
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootGRUB.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootGRUB.ycp?rev=57502&r1=57501&r2=57502&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootGRUB.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootGRUB.ycp Mon Jun 8 16:17:39 2009
@@ -84,6 +84,11 @@
section = remove(section, "vga");
}
+ //bnc #501987 kernel panic HVM guest -> noprobe problem
+ if ((title == "linux") || (title == "failsafe"))
+ {
+ section["append"] = BootCommon::HVMGuestUpdateAppend(section["append"]:"");
+ }
return section;
}
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/lilolike.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/lilolike.ycp?rev=57502&r1=57501&r2=57502&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/lilolike.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/lilolike.ycp Mon Jun 8 16:17:39 2009
@@ -31,6 +31,7 @@
global void DetectDisks ();
global void ProposeDeviceMap ();
global boolean DisksChanged ();
+global string HVMGuestUpdateAppend(string append);
include "bootloader/routines/i386.ycp";
@@ -821,6 +822,13 @@
}
s["append"] = option;
}
+ //bnc #501987 kernel panic HVM guest -> noprobe problem
+ if (getLoaderType (false) == "grub")
+ {
+ if ((s["type"]:"" == "image")
+ && (haskey(s, "append")))
+ s["append"] = HVMGuestUpdateAppend(s["append"]:"");
+ }
return s;
});
sections = out;
@@ -1396,6 +1404,72 @@
return ret;
}
+/** bnc#501987 kernel panic HVM guest -> noprobe problem
+ * Function prepare additional args for append
+ * for all disk from device map should added to kernel
+ * append noprobe e.g. hda=noprobe
+ *
+ * return string additional arg for append
+ */
+string HVMGuestAppend()
+{
+ string ret = "";
+ list <string> disks = [];
+ if ((BootCommon::device_mapping != nil)
+ &&(size (BootCommon::device_mapping) != 0))
+ {
+ list <string> devices = (list <string>) Map::Keys(BootCommon::device_mapping);
+ foreach( string device, devices,
+ {
+ if (search(device, "/dev/fd0") == nil)
+ {
+ string kernel_device = BootCommon::MountByDev2Dev(device);
+ integer last=findlastof(kernel_device,"/");
+ disks = add(disks, substring (kernel_device, last+1));
+ }
+ });
+
+ foreach(string disk, disks,
+ {
+ string tmp_arg = " " + disk + "=noprobe";
+ ret = ret + tmp_arg;
+ });
+ }
+ y2milestone("additional append args for kernel on HVM guest: %1", ret);
+ return ret;
+}
+
+/** bnc#501987 kernel panic HVM guest -> noprobe problem
+ * It checks if system run on HVM guest and update append
+ * If yes add additioanl args to kernel append HVMGuestAppend()
+ *
+ * @param string original append from section
+ * @return string updated append from section
+ */
+global string HVMGuestUpdateAppend(string append)
+{
+ string ret = append;
+ // check if it is HVM guest only
+ if (BootCommon::isHVMGuest())
+ {
+ string hvm_guest_append = HVMGuestAppend();
+ list <string> list_hvm_guest_append = splitstring(hvm_guest_append, " ");
+ list_hvm_guest_append = filter (string arg, list_hvm_guest_append,
+ {
+ return (arg != "");
+ });
+
+ foreach(string hd_noprobe, list_hvm_guest_append,
+ {
+ if (search(append, hd_noprobe) == nil)
+ ret = ret + " " + hd_noprobe;
+ });
+ }
+ y2milestone("updated append: %1", ret);
+ return ret;
+}
+
+
} // EOF
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/misc.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/misc.ycp?rev=57502&r1=57501&r2=57502&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/misc.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/misc.ycp Mon Jun 8 16:17:39 2009
@@ -48,6 +48,7 @@
global void ProposeDeviceMap ();
global boolean DisksChanged ();
global define list<string> getPartitionList(symbol type);
+ global boolean isHVMGuest();
include "bootloader/routines/i386.ycp";
@@ -234,6 +235,13 @@
*/
global define string Dev2MountByDev(string dev) ``{
y2milestone ("Dev2MountByDev: %1", dev);
+
+ // ugly hack for bnc#501987 kernel panic
+ if (isHVMGuest())
+ {
+ y2milestone("skip converting device: %1 to persistent device name", dev);
+ return dev;
+ }
map