Author: juhliarik
Date: Tue Jun 17 13:14:02 2008
New Revision: 48350
URL: http://svn.opensuse.org/viewcvs/yast?rev=48350&view=rev
Log:
Merged revisions 48043,48048,48060,48067,48073,48119,48160-48162 via svnmerge from
http://svn.opensuse.org/svn/yast/branches/SuSE-Linux-11_0-Branch/bootloader
........
r48043 | juhliarik | 2008-06-04 10:04:51 +0200 (Wed, 04 Jun 2008) | 5 lines
added solving simlinks for initrd and kernel in live CD (bnc# 393030)
M bootloader/src/modules/Bootloader.ycp
* added solving simlinks for initrd and kernel
........
r48048 | juhliarik | 2008-06-04 10:31:22 +0200 (Wed, 04 Jun 2008) | 2 lines
added new version 2.16.18
........
r48060 | juhliarik | 2008-06-04 13:21:17 +0200 (Wed, 04 Jun 2008) | 6 lines
added fix for problem with deleting boot sections bnc# 396810
M bootloader/src/modules/Bootloader.ycp
* added function for checking number of similar boot sections
* added checking number of boot section for xen
........
r48067 | juhliarik | 2008-06-04 13:39:41 +0200 (Wed, 04 Jun 2008) | 2 lines
added better logging
........
r48073 | juhliarik | 2008-06-04 15:04:23 +0200 (Wed, 04 Jun 2008) | 2 lines
added new version 2.16.19
........
r48119 | juhliarik | 2008-06-06 17:08:15 +0200 (Fri, 06 Jun 2008) | 9 lines
added "fix" for problem with broken Vista... bnc #396444
M bootloader/src/grub/misc.ycp
* added propose install GRUB to MBR if Vista was found
M bootloader/src/routines/lilolike.ycp
* added propose insall LILO to MBR if Vista was found
M bootloader/scripts/examine_mbr.pl
* added detection for Vista's MBR
........
r48160 | juhliarik | 2008-06-09 13:33:21 +0200 (Mon, 09 Jun 2008) | 12 lines
added fix for problem with Vista booting bnc #396444
M bootloader/src/grub/misc.ycp
* added saved MBR to /var/log/YaST2
* replace only 440B in MBR for generic code
M bootloader/src/routines/misc.ycp
* replace only 440B in MBR for generic code
M bootloader/src/routines/lilolike.ycp
* added saved MBR to /var/log/YaST2
M bootloader/scripts/examine_mbr.pl
* detect Vista in MBR
........
r48161 | juhliarik | 2008-06-09 13:38:35 +0200 (Mon, 09 Jun 2008) | 2 lines
added fix for condition
........
r48162 | juhliarik | 2008-06-09 14:26:59 +0200 (Mon, 09 Jun 2008) | 2 lines
new version 2.16.20
........
Modified:
trunk/bootloader/ (props changed)
trunk/bootloader/VERSION
trunk/bootloader/package/yast2-bootloader.changes
trunk/bootloader/scripts/examine_mbr.pl
trunk/bootloader/src/grub/misc.ycp
trunk/bootloader/src/modules/Bootloader.ycp
trunk/bootloader/src/routines/lilolike.ycp
trunk/bootloader/src/routines/misc.ycp
Modified: trunk/bootloader/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/VERSION?rev=48350&r1=48349&r2=48350&view=diff
==============================================================================
--- trunk/bootloader/VERSION (original)
+++ trunk/bootloader/VERSION Tue Jun 17 13:14:02 2008
@@ -1 +1 @@
-2.16.17
+2.16.20
Modified: trunk/bootloader/package/yast2-bootloader.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/package/yast2-bootloader.changes?rev=48350&r1=48349&r2=48350&view=diff
==============================================================================
--- trunk/bootloader/package/yast2-bootloader.changes (original)
+++ trunk/bootloader/package/yast2-bootloader.changes Tue Jun 17 13:14:02 2008
@@ -1,4 +1,22 @@
-------------------------------------------------------------------
+Mon Jun 9 13:35:26 CEST 2008 - juhliarik@suse.cz
+- added fix for problem with booting Vista bnc #396444
+- 2.16.20
+
+-------------------------------------------------------------------
+Wed Jun 4 13:39:59 CEST 2008 - juhliarik@suse.cz
+
+- added fix for problem with deleting boot sections bnc #396810
+- 2.16.19
+
+-------------------------------------------------------------------
+Wed Jun 4 10:06:01 CEST 2008 - juhliarik@suse.cz
+
+- added fix for problem with liveCD and simlinks for initrd and
+ kernel (bnc# 393030)
+- 2.16.18
+
+-------------------------------------------------------------------
Mon May 26 18:34:43 CEST 2008 - juhliarik@suse.cz
- added fix for problem with editing boot section for LILO
Modified: trunk/bootloader/scripts/examine_mbr.pl
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/scripts/examine_mbr.pl?rev=48350&r1=48349&r2=48350&view=diff
==============================================================================
--- trunk/bootloader/scripts/examine_mbr.pl (original)
+++ trunk/bootloader/scripts/examine_mbr.pl Tue Jun 17 13:14:02 2008
@@ -63,6 +63,13 @@
exit 0;
}
+if (substr($MBR, 320, 126) =~
+ m,invalid partition table.*Error loading operating system,i) {
+ print "Vista MBR\n";
+ exit 0;
+}
+
+
print "unknown\n";
exit 0;
Modified: trunk/bootloader/src/grub/misc.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/grub/misc.ycp?rev=48350&r1=48349&r2=48350&view=diff
==============================================================================
--- trunk/bootloader/src/grub/misc.ycp (original)
+++ trunk/bootloader/src/grub/misc.ycp Tue Jun 17 13:14:02 2008
@@ -274,6 +274,8 @@
string device_file = mergestring (splitstring (device, "/"), "_");
string device_file_path = "/var/lib/YaST2/backup_boot_sectors/"
+ device_file;
+ string device_file_path_to_logs = "/var/log/YaST2/"
+ + device_file;
SCR::Execute (.target.bash,
"test -d /var/lib/YaST2/backup_boot_sectors || mkdir /var/lib/YaST2/backup_boot_sectors");
if (SCR::Read (.target.size, device_file_path) > 0)
@@ -298,6 +300,10 @@
SCR::Execute (.target.bash, sformat (
"/bin/dd if=%1 of=%2 bs=512 count=1 2>&1",
device, device_file_path));
+ // save MBR to yast2 log directory
+ SCR::Execute (.target.bash, sformat (
+ "/bin/dd if=%1 of=%2 bs=512 count=1 2>&1",
+ device, device_file_path_to_logs));
if (device == BootCommon::mbrDisk)
{
SCR::Execute (.target.bash, sformat (
@@ -352,8 +358,9 @@
list<string> disks_to_rewrite = grub_getMbrsToRewrite ();
foreach (string d, disks_to_rewrite, {
y2milestone ("Copying generic MBR code to %1", d);
+ // added fix 446 -> 440 for Vista booting problem bnc #396444
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);
@@ -559,6 +566,8 @@
boolean keep_mbr = BootCommon::KeepMBR (BootCommon::mbrDisk);
// if is primary, store bootloader there
+
+ integer exit = 0;
if (boot_partition_is_on_mbr_disk && ! is_logical)
{
selected_location = `boot;
@@ -572,11 +581,14 @@
// - 0 for a "Generic MBR" (DOS MBR)
// - 254 for a GRUB or lilo "stage 1"
// - 0 for an unknown MBR
+ // - 0 for Vista MBR
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);
- integer exit = out["exit"]:0;
+ exit = out["exit"]:0;
BootCommon::globals["generic_mbr"] = ((exit == 254) && (! keep_mbr)) ? "true" : "false";
+
+
}
else if (size (underlying_boot_partition_devices) > 1)
{
@@ -620,7 +632,8 @@
// other installed OSes like Windows (older versions assign the C:
// drive letter to the activated partition).
BootCommon::globals["activate"] =
- (size (Storage::GetBootPartition (BootCommon::mbrDisk)) == 0) ? "true" : "false";
+ (size (Storage::GetBootPartition (BootCommon::mbrDisk)) == 0) ? "true" : "false";
+
}
else
{
Modified: trunk/bootloader/src/modules/Bootloader.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/Bootloader.ycp?rev=48350&r1=48349&r2=48350&view=diff
==============================================================================
--- trunk/bootloader/src/modules/Bootloader.ycp (original)
+++ trunk/bootloader/src/modules/Bootloader.ycp Tue Jun 17 13:14:02 2008
@@ -62,6 +62,7 @@
global define string getProposedDefaultSection ();
global define boolean UpdateGfxMenu ();
global define void DelDuplicatedSections();
+ global define void ResolveSymlinksInSections();
/**
* Write is repeating again
@@ -619,6 +620,10 @@
{
// delete duplicated sections
DelDuplicatedSections();
+ } else {
+ // resolve sim links for image and initrd
+ // bnc #393030 - live-CD kernel install/remove leaves broken system
+ ResolveSymlinksInSections();
}
if (BootCommon::write_settings["save_all"]:false)
BootCommon::save_all = true;
@@ -725,24 +730,68 @@
}
+ /**
+ * Find "same" boot sections and return numbers of sections
+ * from BootCommon::sections
+ * @param map