[opensuse-autoinstall] Problems with MBR/bootloader & GRUB
From the above, the GRUB strings show that it doesn't occur in the first sector for the SLES installed disk, but does on my desktop system. So, i suspect that
Summary:
Getting GRUB into the MBR properly
Structure of bootloader general attributes?
Best layout for linux only filesystem?
(let autoinstall put all partitions into extended partition
or is there any benefit to Primary swap and/or boot these days?)
After my autoinstall completes, the system reboots and
reports "No operating system". I'm guessing this most likely
means that the MBR has no usable boot code or perhaps the MBR
can't get to a secondary loader.
My *intent* is to install GRUB to the MBR, but i don't think that's
happening. (i'm using plain disk device on PERC H/W RAID)
Here's what i see on my Debian Lenny desktop system:
# file -s /dev/sdd
/dev/sdd: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, stage2 address 0x2000, stage2 segment 0x200; partition 1: ID=0x83, active, starthead 1, startsector 63, 8401932 sectors; partition 2: ID=0x82, starthead 0, startsector 8401995, 16787925 sectors; partition 3: ID=0x5, starthead 254, startsector 25189920, 260269065 sectors
Okay, obviously, a GRUB MBR
Here's what i see on the SLES device:
# file -s dev-sda.64-secs
dev-sda.64-secs: x86 boot sector; partition 1: ID=0xf, active, starthead 1, startsector 63, 163830807 sectors
(i copied the first 64 sectors to my USB key with 'dd if=/dev/sda
bs=512 count=64', so i can deal with at my desktop, rather than the
noisy-cold machine room)
zia:sdowdy3# strings - dev-sda.64-secs | grep -i grub
/grub/stage2 /grub/menu.lst
GRUB loading, please wait...
GRUB
Hmm, so at least *some* grub bits are there. (i was surprised to see
no 'strings' binary in the SLES10 mini-root environment :-( )
zia:sdowdy3# grep -ab --only-matching GRUB dev-sda.64-secs
8388:GRUB
32641:GRUB
zia:sdowdy3# dd if=/dev/sdd bs=512 count=64 | strings | grep -i grub
GRUB
/boot/grub/stage2 /boot/grub/menu.lst
GRUB loading, please wait...
# dd if=/dev/sdd bs=512 count=64 2>/dev/null | grep -ab --only-matching GRUB
383:GRUB
9034:GRUB
the "generic_mbr" option is being applied?
If it matters, here's what gets laid down in /boot on the target install system:
-----------------------------------------------------------
[device.map]
(hd2) /dev/disk/by-id/usb-SanDisk_SanDisk_Cruzer_452601117552995B
(hd1) /dev/disk/by-id/scsi-360026b90491c7800129987450f5e5165
(hd0) /dev/disk/by-id/scsi-360026b90491c7800129987100c335daf
-----------------------------------------------------------
[menu.lst]
# Modified by YaST2. Last modification on Mon Jan 11 13:35:00 UTC 2010
default 0
timeout 10
##YaST - generic_mbr
gfxmenu (hd0,4)/message
##YaST - activate
###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE Linux Enterprise Server 10 SP3
root (hd0,4)
kernel /vmlinuz-2.6.16.60-0.54.5-smp root=/dev/disk/by-label/root ZORKsite=zork0 ZORKnode=in3 y2confirm resume=/dev/disk/by-id/scsi-360026b90491c7800129987100c335daf-part7 splash=silent showopts
initrd /initrd-2.6.16.60-0.54.5-smp
###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE Linux Enterprise Server 10 SP3
root (hd0,4)
kernel /vmlinuz-2.6.16.60-0.54.5-smp root=/dev/disk/by-label/root showopts ide=nodma apm=off acpi=off noresume edd=off 3
initrd /initrd-2.6.16.60-0.54.5-smp
-----------------------------------------------------------
The comment in there referencing "generic_mbr" seems to defy what's
listed in my bootloader section (below)
Stephen Dowdy wrote, On 01/11/2010 03:01 PM:
The /var/adm/cache/autoinstall/installedSystem.xml says:
<bootloader> <global config:type="list">
<key>timeout</key> <value config:type="integer">10</value> true true <!-- Hmm, this is interesting. This may match my: <activate config:type="boolean">true</activate> <boot_mbr config:type="boolean">true</boot_mbr> lines being rewritten improperly?? This goes to my "Aside" question below on the structure of the bootloader section. -->
Here's my bootloader section:
----------------------------------------------------------- <bootloader> <global config:type="list">
<key>timeout</key> <value config:type="integer">10</value> <activate config:type="boolean">true</activate>true </global><activate config:type="boolean">true</activate>
grub <location>mbr</location>true </bootloader> ----------------------------------------------------------- [Aside: while i see a few random examples showing a structure for the bootloader section like:<key>serial</key> <value>--unit=0 --speed=57600 --word=8 --parity=no --stop=1</value> The 'yast2 autoyast' GUI generates lines like: <serial>--unit=0 --speed=57600 --word=8 --parity=no --stop=1</serial>Which is correct, or are both? (and if so, which is preferred?) ]
http://www.suse.de/~ug/autoyast_doc/CreateProfile.Bootloader.html
Definitely uses both styles...
http://www.suse.de/~ug/autoyast_doc/CreateProfile.Bootloader.html#id324951
<bootloader>
<global config:type="list">
Stephen Dowdy wrote, On 01/11/2010 04:55 PM:
Stephen Dowdy wrote, On 01/11/2010 03:01 PM:
The /var/adm/cache/autoinstall/installedSystem.xml says:
<bootloader> <global config:type="list">
<key>timeout</key> <value config:type="integer">10</value> true true <!-- Hmm, this is interesting. This may match my: <activate config:type="boolean">true</activate> <boot_mbr config:type="boolean">true</boot_mbr> lines being rewritten improperly?? This goes to my "Aside" question below on the structure of the bootloader section. -->
I rewrote my bootloader global section as so:
<bootloader>
<global>
<timeout config:type="integer">10</timeout>
<activate config:type="boolean">true</activate>
participants (1)
-
Stephen Dowdy