Mailinglist Archive: yast-commit (711 mails)

< Previous Next >
[yast-commit] r48233 - in /branches/SuSE-SLE-10-SP2-Branch/bootloader: VERSION package/yast2-bootloader.changes src/modules/Bootloader.ycp
  • From: juhliarik@xxxxxxxxxxxxxxxx
  • Date: Wed, 11 Jun 2008 14:25:47 -0000
  • Message-id: <20080611142548.2814628635@xxxxxxxxxxxxxxxx>
Author: juhliarik
Date: Wed Jun 11 16:25:47 2008
New Revision: 48233

URL: http://svn.opensuse.org/viewcvs/yast?rev=48233&view=rev
Log:
added patch for activating partition for XEN bnc #380982
new version 2.13.155.1

M bootloader/VERSION
M bootloader/src/modules/Bootloader.ycp
* added activating partition for XEN
M bootloader/package/yast2-bootloader.changes

Modified:
branches/SuSE-SLE-10-SP2-Branch/bootloader/VERSION
branches/SuSE-SLE-10-SP2-Branch/bootloader/package/yast2-bootloader.changes
branches/SuSE-SLE-10-SP2-Branch/bootloader/src/modules/Bootloader.ycp

Modified: branches/SuSE-SLE-10-SP2-Branch/bootloader/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/bootloader/VERSION?rev=48233&r1=48232&r2=48233&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP2-Branch/bootloader/VERSION (original)
+++ branches/SuSE-SLE-10-SP2-Branch/bootloader/VERSION Wed Jun 11 16:25:47 2008
@@ -1 +1 @@
-2.13.155
+2.13.155.1

Modified:
branches/SuSE-SLE-10-SP2-Branch/bootloader/package/yast2-bootloader.changes
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/bootloader/package/yast2-bootloader.changes?rev=48233&r1=48232&r2=48233&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP2-Branch/bootloader/package/yast2-bootloader.changes
(original)
+++ branches/SuSE-SLE-10-SP2-Branch/bootloader/package/yast2-bootloader.changes
Wed Jun 11 16:25:47 2008
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Wed Jun 11 16:23:19 CEST 2008 - juhliarik@xxxxxxx
+- added fix for activating partition for XEN (bnc #380982)
+- 2.13.155.1
+
+-------------------------------------------------------------------
Wed Apr 30 16:34:19 CEST 2008 - juhliarik@xxxxxxx

- added fix for deleting old boot sections (bnc# 367356)

Modified: branches/SuSE-SLE-10-SP2-Branch/bootloader/src/modules/Bootloader.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/bootloader/src/modules/Bootloader.ycp?rev=48233&r1=48232&r2=48233&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP2-Branch/bootloader/src/modules/Bootloader.ycp
(original)
+++ branches/SuSE-SLE-10-SP2-Branch/bootloader/src/modules/Bootloader.ycp Wed
Jun 11 16:25:47 2008
@@ -372,6 +372,41 @@
y2milestone ("Running bootloader pre-update stuff");
}

+/**
+ * Function find partition for activating
+ * it is special for activating partition for XEN
+ * @return map disk and number of partition for activating
+ */
+
+define map<string, string> getXenPartitionForActivating()
+{
+ map mp = Storage::GetMountPoints();
+
+ map<string, string> ret = $[];
+
+ list mountdata_boot = mp["/boot"]:(mp["/"]:[]);
+ list mountdata_root = mp["/"]:[];
+
+ // prepare return value
+ ret["disk"] = mountdata_boot[2]:"";
+ ret["number_partition"] = deletechars(mountdata_boot[0]:"",
mountdata_boot[2]:"");
+
+ y2milestone( "mountPoints %1", mp );
+ y2milestone( "mountdata_boot %1", mountdata_boot );
+
+ string root_device = mp["/", 0]:"";
+
+ if (root_device == "")
+ {
+ y2error ("No mountpoint for / !");
+ ret["disk"] = "";
+ }
+ y2milestone("XEN disk and number of partition for activating %1", ret);
+ return ret;
+
+}
+
+
/**
* Write bootloader settings to disk
* @return boolean true on success
@@ -517,14 +552,36 @@

if (getLoaderType () == "none")
{
+ // bnc #380982 - pygrub cannot boot kernel
+ // added activation for boot partition in XEN or root if boot
partition doesn't exist
+ // it handles only the 1.- 4. partition other should be ignored
+ if (Arch::is_uml () || Arch::is_xenU())
+ {
+ y2milestone("Activating partition for XEN");
+ map<string, string> active_disk =
getXenPartitionForActivating();
+ if ((active_disk["disk"]:"" != "") &&
(active_disk["number_partition"]:"" != "")
+ && (tointeger(active_disk["number_partition"]:"") < 5))
+ {
+ string command = sformat
+ ("/usr/sbin/parted -s %1 set %2 boot
on",active_disk["disk"]:"" , active_disk["number_partition"]:"");
+ y2milestone ("Running command %1", command);
+ map out = (map)SCR::Execute (.target.bash_output, command);
+ y2milestone ("Command output: %1", out);
+
+ } else {
+
+ y2error("Finding partition for activating fault: %1",
active_disk);
+ }
+
+ }
return ret;
}


-//F#300779 - Install diskless client (NFS-root)
-//kokso: additional warning that root partition is nfs type -> bootloader will
not be installed
+ // F#300779 - Install diskless client (NFS-root)
+ // kokso: additional warning that root partition is nfs type ->
bootloader will not be installed

-//B#355332 - Bootloader doesn't work if root partitions is like nfs
+ // B#355332 - Bootloader doesn't work if root partitions is like nfs

map dev = Storage::GetDiskPartition(BootCommon::BootPartitionDevice);

@@ -535,7 +592,7 @@

}

-//F#300779 -end
+ // F#300779 -end
// update graphics menu where possible
UpdateGfxMenu ();


--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages