Mailinglist Archive: yast-commit (595 mails)

< Previous Next >
[yast-commit] r53790 - in /trunk/bootloader: ./ package/ src/grub/ src/modules/ src/routines/
  • From: juhliarik@xxxxxxxxxxxxxxxx
  • Date: Mon, 01 Dec 2008 17:27:06 -0000
  • Message-id: <20081201172707.41807B175E@xxxxxxxxxxxxxxxx>
Author: juhliarik
Date: Mon Dec 1 18:27:06 2008
New Revision: 53790

URL: http://svn.opensuse.org/viewcvs/yast?rev=53790&view=rev
Log:
new version 2.17.44
- fixed problem with multipath
- fixed problem with Vista MBR (proposal)
- fixed problem with cloning section

Modified:
trunk/bootloader/VERSION
trunk/bootloader/package/yast2-bootloader.changes
trunk/bootloader/src/grub/misc.ycp
trunk/bootloader/src/modules/BootCommon.ycp
trunk/bootloader/src/modules/BootGRUB.ycp
trunk/bootloader/src/modules/BootSupportCheck.ycp
trunk/bootloader/src/modules/Bootloader_API.pm
trunk/bootloader/src/routines/lib_iface.ycp
trunk/bootloader/src/routines/lilolike.ycp
trunk/bootloader/src/routines/misc.ycp
trunk/bootloader/src/routines/section_widgets.ycp

Modified: trunk/bootloader/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/VERSION?rev=53790&r1=53789&r2=53790&view=diff
==============================================================================
--- trunk/bootloader/VERSION (original)
+++ trunk/bootloader/VERSION Mon Dec 1 18:27:06 2008
@@ -1 +1 @@
-2.17.43
+2.17.44

Modified: trunk/bootloader/package/yast2-bootloader.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/package/yast2-bootloader.changes?rev=53790&r1=53789&r2=53790&view=diff
==============================================================================
--- trunk/bootloader/package/yast2-bootloader.changes (original)
+++ trunk/bootloader/package/yast2-bootloader.changes Mon Dec 1 18:27:06 2008
@@ -1,4 +1,18 @@
-------------------------------------------------------------------
+Mon Dec 1 16:07:54 CET 2008 - juhliarik@xxxxxxx
+
+- added fix for proposal if MBR include Vista code and "/" is on
+ logical partition (bnc #450137)
+- added update of handling serial console (bnc #449726)
+- 2.17.44
+
+-------------------------------------------------------------------
+Mon Dec 1 14:32:09 CET 2008 - juhliarik@xxxxxxx
+
+- added fix for problem with multipath (bnc #448110)
+- added fix for problem with cloning boot sections (bnc #450190)
+
+-------------------------------------------------------------------
Thu Nov 27 18:55:11 CET 2008 - juhliarik@xxxxxxx

- added fix for problem with missing "console" (bnc #449726)

Modified: trunk/bootloader/src/grub/misc.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/grub/misc.ycp?rev=53790&r1=53789&r2=53790&view=diff
==============================================================================
--- trunk/bootloader/src/grub/misc.ycp (original)
+++ trunk/bootloader/src/grub/misc.ycp Mon Dec 1 18:27:06 2008
@@ -534,6 +534,7 @@
// variable is not used for grub anymore
symbol selected_location = `mbr; // default to mbr

+ boolean vista_mbr = false;
// check whether the /boot partition
// - is primary: is_logical -> false
// - is on the first disk (with the MBR): boot_partition_is_on_mbr_disk
-> true
@@ -622,8 +623,13 @@
map out = (map)SCR::Execute (.target.bash_output, sformat (
"/usr/lib/YaST2/bin/examine_mbr.pl %1", boot_partition_disk));
y2milestone ("MBR examining script returned %1", out);
- exit = out["exit"]:0;
+ exit = out["exit"]:0;
BootCommon::globals["generic_mbr"] = ((exit == 254) && (! keep_mbr)) ?
"true" : "false";
+ if (exit == 0)
+ {
+ y2milestone("Vista MBR...");
+ vista_mbr = true;
+ }


}
@@ -679,7 +685,8 @@

// 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")
+ if (is_logical && extended != nil &&
(BootCommon::globals["generic_mbr"]:"" == "true" ||
+ vista_mbr))
selected_location = `extended;
BootCommon::globals["activate"] = "true";
SetBootloaderDevice(selected_location);

Modified: trunk/bootloader/src/modules/BootCommon.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootCommon.ycp?rev=53790&r1=53789&r2=53790&view=diff
==============================================================================
--- trunk/bootloader/src/modules/BootCommon.ycp (original)
+++ trunk/bootloader/src/modules/BootCommon.ycp Mon Dec 1 18:27:06 2008
@@ -78,6 +78,18 @@
global map<string,string> device_mapping = $[];

/**
+ * device mapping between real devices and multipath
+ */
+global map<string,string> multipath_mapping = $[];
+
+/**
+ * Flag indicates that bios_id_missing in disk
+ * true if missing false if at least one disk has bios_id
+ */
+
+global boolean bois_id_missing = true;
+
+/**
* device to save loader stage 1 to
* NOTE: this variable is being phased out. The boot_* keys in the globals map
* are now used to remember the selected boot location. Thus, we now have a
@@ -356,7 +368,7 @@
global define list<string> Summary ();
global define boolean UsingXenPae();
global map<string,any> CreateLinuxSection (string title);
-
+global string UpdateSerialConsole (string append, string console);
//
// FIXME: the select and selectdevice seem to be broken: the default value of
// the widget description string needs to be patched with the current value of
@@ -861,12 +873,14 @@

// convert device names in device map to the device names indicated by
// "mountby"
+
+ y2milestone ("device map before mapping %1", device_mapping);
map<string,string> my_device_mapping =
mapmap (string k , string v, device_mapping, {
//return $[BootCommon::Dev2MountByDev(k) : v];
return $[BootCommon::Dev2MountByDev(k) : v];
});
-
+ y2milestone ("device map after mapping %1", my_device_mapping);
if ((globals["trusted_grub"]:"" == "true") && (haskey(globals, "gfxmenu")))
globals = remove(globals, "gfxmenu");

@@ -874,6 +888,7 @@
// bnc #436899
ConvertXENinDomU ();

+ ret = ret && DefineMultipath(multipath_mapping);
ret = ret && SetDeviceMap (my_device_mapping);
ret = ret && SetSections (sections);
ret = ret && SetGlobal (my_globals);

Modified: trunk/bootloader/src/modules/BootGRUB.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootGRUB.ycp?rev=53790&r1=53789&r2=53790&view=diff
==============================================================================
--- trunk/bootloader/src/modules/BootGRUB.ycp (original)
+++ trunk/bootloader/src/modules/BootGRUB.ycp Mon Dec 1 18:27:06 2008
@@ -471,6 +471,7 @@
s["image"] = additional["image"]:"";
if (haskey (additional, "initrd"))
s["initrd"] = additional["initrd"]:"";
+ s["original_name"] = "linux";
out = add (out, s);
});
}

Modified: trunk/bootloader/src/modules/BootSupportCheck.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootSupportCheck.ycp?rev=53790&r1=53789&r2=53790&view=diff
==============================================================================
--- trunk/bootloader/src/modules/BootSupportCheck.ycp (original)
+++ trunk/bootloader/src/modules/BootSupportCheck.ycp Mon Dec 1 18:27:06 2008
@@ -92,7 +92,7 @@
*/
boolean checkElilo()
{
- string cmd = "modprobe efivars";
+ string cmd = "modprobe efivars 2>/dev/null";
map ret = (map)SCR::Execute (.target.bash_output, cmd);
if (ret["exit"]:1 == 0)
return true;
@@ -223,7 +223,23 @@
return result;
}

+/**
+ * Check if there is bios_id
+ * if not show warning
+ *
+ * @return boolean true on success
+ */

+boolean CheckBios_ID()
+{
+ boolean ret = true;
+ if (BootCommon::bois_id_missing)
+ {
+ AddNewProblem (_("It was not possible to determine the exact
order of disks for device map. The order of disks can be changed in \"Boot
Loader Installation Details\""));
+ ret = false;
+ }
+ return ret;
+}


/**
@@ -240,6 +256,8 @@
boolean ret = GptPartitionTable ();
if (ret)
ret = check_BootDevice();
+ if (ret)
+ ret = CheckBios_ID();
return ret;
}


Modified: trunk/bootloader/src/modules/Bootloader_API.pm
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/Bootloader_API.pm?rev=53790&r1=53789&r2=53790&view=diff
==============================================================================
--- trunk/bootloader/src/modules/Bootloader_API.pm (original)
+++ trunk/bootloader/src/modules/Bootloader_API.pm Mon Dec 1 18:27:06 2008
@@ -156,6 +156,15 @@
return $ret;
}

+BEGIN { $TYPEINFO{defineMultipath} = ["function", "boolean", ["map", "string",
"string"]]; }
+sub defineMultipath($) {
+ my ($dm) = @_;
+
+ my $ret = $lib_ref->DefineMultipath ($dm);
+ DumpLog();
+ return $ret;
+}
+
BEGIN { $TYPEINFO{getGlobalSettings} = ["function", ["map", "string",
"string"]]; }
sub getGlobalSettings() {
my %globalsettings = %{$lib_ref->GetGlobalSettings () || {}};

Modified: trunk/bootloader/src/routines/lib_iface.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/lib_iface.ycp?rev=53790&r1=53789&r2=53790&view=diff
==============================================================================
--- trunk/bootloader/src/routines/lib_iface.ycp (original)
+++ trunk/bootloader/src/routines/lib_iface.ycp Mon Dec 1 18:27:06 2008
@@ -34,6 +34,11 @@
string library_initialized = nil;

/**
+ * Declarations...
+ */
+global boolean DefineMultipath(map<string,string> multipath_map);
+
+/**
* Retrieve the data for perl-Bootloader library from Storage module
* and pass it along
* @return nothing
@@ -41,8 +46,11 @@
// FIXME: this should be done directly in perl-Bootloader through LibStorage.pm
global void SetDiskInfo () {
map<string,list<string> > md_info = $[];
+
map<string,map> tm = (map<string,map>)Storage::GetTargetMap ();

+ multipath_mapping = $[];
+ multipath_mapping = BootCommon::mapRealDevicesToMultipath();
map<string,any> mountpoints = mapmap (string k, list v,
(map<string,list>)Storage::GetMountPoints (),
{
@@ -123,10 +131,12 @@

y2milestone ("Information about partitioning: %1", partinfo);
y2milestone ("Information about MD arrays: %1", md_info);
+ y2milestone ("Mapping real disk to multipath: %1", multipath_mapping);

System::Bootloader_API::setMountPoints ((map<string,string>) mountpoints);
System::Bootloader_API::setPartitions ((list<list<string> >) partinfo);
System::Bootloader_API::setMDArrays ((map<string,list<string> >) md_info);
+ DefineMultipath(multipath_mapping);
}

/**
@@ -255,6 +265,25 @@
}

/**
+ * Set the mapping (real device <-> multipath)
+ * @param map<string,string> map from real device to multipath device
+ * @return boolean true on success
+ */
+global boolean DefineMultipath(map<string,string> multipath_map) {
+ y2milestone ("Storing multipath map: %1", multipath_map);
+ if (size(multipath_map) == 0)
+ {
+ y2milestone("Multipath was not detected");
+ return true;
+ }
+ boolean ret = System::Bootloader_API::defineMultipath (multipath_map);
+ if (! ret)
+ y2error ("Storing multipath map failed");
+ return ret;
+}
+
+
+/**
* Get the device mapping (Linux <-> Firmware)
* @return a map from Linux device to Firmware device identification
*/

Modified: trunk/bootloader/src/routines/lilolike.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/lilolike.ycp?rev=53790&r1=53789&r2=53790&view=diff
==============================================================================
--- trunk/bootloader/src/routines/lilolike.ycp (original)
+++ trunk/bootloader/src/routines/lilolike.ycp Mon Dec 1 18:27:06 2008
@@ -1330,7 +1330,7 @@
list<string> usb_disks = []; // contains those usb removable disks

device_mapping = $[];
-
+ multipath_mapping = $[];
map<string,map> targetMap = $[];
if (Mode::config ())
y2milestone ("Skipping device map proposing in Config mode");
@@ -1405,10 +1405,16 @@
changeOrderInDeviceMapping(usb_disks);
}

+ if (size(device_mapping) == 1)
+ bois_id_missing = false;
if (StorageDevices::FloppyPresent())
device_mapping[StorageDevices::FloppyDevice()] = "fd0";

y2milestone ("Detected device mapping: %1", device_mapping);
+
+ multipath_mapping = BootCommon::mapRealDevicesToMultipath();
+
+ y2milestone ("Detected multipath mapping: %1", multipath_mapping);
}

/**

Modified: trunk/bootloader/src/routines/misc.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/misc.ycp?rev=53790&r1=53789&r2=53790&view=diff
==============================================================================
--- trunk/bootloader/src/routines/misc.ycp (original)
+++ trunk/bootloader/src/routines/misc.ycp Mon Dec 1 18:27:06 2008
@@ -2486,7 +2486,6 @@
return ret;
}

-
/** FATE #110038: Serial console
* Add console arg for kernel if there is defined serial console
* - add key console with value to section type image and xen
@@ -2516,6 +2515,16 @@
{
sections[idx, "console"] = console_value;
sections[idx, "__changed"] = true;
+ if (sections[idx, "append"]:"" != "")
+ {
+ string updated_append =
+
BootCommon::UpdateSerialConsole(sections[idx,"append"]:"",
+
sections[idx,"console"]:"");
+ if (updated_append != nil)
+ {
+
sections[idx,"append"]=updated_append;
+ }
+ }
y2debug("Added console for section: %1",
sections[idx]:$[]);
});
}
@@ -2523,5 +2532,42 @@
}
}

+/** bnc #447591, 438243, 448110 multipath wrong device map
+ * Function maps real devices to multipath e.g.
+ * "/dev/sda/" : "/dev/mapper/SATA_ST3120813AS_3LS0CD7M"
+ *
+ * @return map <string, string> mapping real disk to multipath
+ */
+
+map <string, string> mapRealDevicesToMultipath()
+{
+ map <string, string> ret = $[];
+ map<string, map> tm = (map<string,map>)Storage::GetTargetMap ();
+ integer num_of_real_disk = 0;
+ foreach (string disk, map disk_info, tm,
+ {
+ if (disk_info["type"]:nil == `CT_DMMULTIPATH)
+ {
+ list <string> devices = (list <string>)
disk_info["devices"]:[];
+ if (size(devices) > 0)
+ {
+ foreach(string d, devices,
+ {
+ ret[d]=disk;
+ });
+
+ }
+ }
+
+ if (disk_info["type"]:nil == `CT_DISK)
+ num_of_real_disk = num_of_real_disk +1;
+ if (disk_info["bios_id"]:nil != nil)
+ bois_id_missing = false;
+ });
+ if (num_of_real_disk == 1)
+ bois_id_missing = false;
+ return ret;
+}
+

} //end of include

Modified: trunk/bootloader/src/routines/section_widgets.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/section_widgets.ycp?rev=53790&r1=53789&r2=53790&view=diff
==============================================================================
--- trunk/bootloader/src/routines/section_widgets.ycp (original)
+++ trunk/bootloader/src/routines/section_widgets.ycp Mon Dec 1 18:27:06 2008
@@ -322,7 +322,9 @@
// it seems be correct if original_name stay same...
// BootCommon::current_section["original_name"] = "";
BootCommon::current_section["__auto"] = false;
- BootCommon::current_section["lines_cache_id"] = "";
+ // fix for problem with cloning section
+ if (haskey(BootCommon::current_section,"lines_cache_id"))
+ BootCommon::current_section =
remove(BootCommon::current_section, "lines_cache_id");
}
y2milestone ("Added section template: %1", BootCommon::current_section);
return nil;

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

< Previous Next >
This Thread
  • No further messages