[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) <loader_type>grub</loader_type> <location>mbr</location> (at least i *think* i'm telling autoyast to put a grub bootloader into the MBR with that) The /var/adm/cache/autoinstall/installedSystem.xml says: <bootloader> <activate config:type="boolean">true</activate> <global config:type="list"> <global_entry> <key>timeout</key> <value config:type="integer">10</value> </global_entry> <global_entry config:type="boolean">true</global_entry> <global_entry config:type="boolean">true</global_entry> <!-- 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. --> </global> <initrd_modules config:type="list"> ... </initrd_modules> <loader_type>grub</loader_type> <location>mbr</location> <repl_mbr config:type="boolean">true</repl_mbr> <!-- But these three still look good --> </bootloader> Here's my bootloader section: ----------------------------------------------------------- <bootloader> <global config:type="list"> <global_entry> <key>timeout</key> <value config:type="integer">10</value> </global_entry> <activate config:type="boolean">true</activate> <boot_mbr config:type="boolean">true</boot_mbr> </global> <activate config:type="boolean">true</activate> <loader_type>grub</loader_type> <location>mbr</location> <repl_mbr config:type="boolean">true</repl_mbr> <!-- just in case it's relevant... --> <initrd_modules config:type="list"> ... includes processor thermal fan jbd ext3 edd ... </initrd_modules> </bootloader> ----------------------------------------------------------- [Aside: while i see a few random examples showing a structure for the bootloader section like: <global_entry> <key>serial</key> <value>--unit=0 --speed=57600 --word=8 --parity=no --stop=1</value> </global_entry> 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?) ] And here's my partitioning info: ----------------------------------------------------------- <partitioning config:type="list"> <drive> <device>/dev/sda</device> <initialize config:type="boolean">true</initialize> <use>all</use> <type config:type="symbol">CT_DISK</type> <partitions config:type="list"> <partition> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <mount>/boot</mount> <label>boot</label> <mountby config:type="symbol">label</mountby> <partition_id config:type="integer">131</partition_id> <fstopt>acl,user_xattr</fstopt> <size>256mb</size> <create config:type="boolean">true</create> </partition> <partition> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <mount>/</mount> <label>root</label> <mountby config:type="symbol">label</mountby> <partition_id config:type="integer">131</partition_id> <fstopt>acl,user_xattr</fstopt> <size>3gb</size> <create config:type="boolean">true</create> </partition> <partition> <filesystem config:type="symbol">swap</filesystem> <format config:type="boolean">true</format> <mount>swap</mount> <partition_id config:type="integer">130</partition_id> <size>16gb</size> <create config:type="boolean">true</create> </partition> <partition> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <mount>/usr</mount> <label>usr</label> <mountby config:type="symbol">label</mountby> <partition_id config:type="integer">131</partition_id> <fstopt>acl,user_xattr</fstopt> <size>6gb</size> <create config:type="boolean">true</create> </partition> <partition> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <mount>/var</mount> <label>var</label> <mountby config:type="symbol">label</mountby> <partition_id config:type="integer">131</partition_id> <fstopt>nosuid,acl,user_xattr</fstopt> <size>8gb</size> <create config:type="boolean">true</create> </partition> <partition> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <mount>/opt</mount> <label>opt</label> <mountby config:type="symbol">label</mountby> <partition_id config:type="integer">131</partition_id> <fstopt>nosuid,acl,user_xattr</fstopt> <size>4gb</size> <create config:type="boolean">true</create> </partition> <partition> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <mount>/home</mount> <label>home</label> <mountby config:type="symbol">label</mountby> <partition_id config:type="integer">131</partition_id> <fstopt>nosuid,acl,user_xattr</fstopt> <size>8gb</size> <create config:type="boolean">true</create> </partition> <partition> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <mount>/tmp</mount> <label>tmp</label> <mountby config:type="symbol">label</mountby> <partition_id config:type="integer">131</partition_id> <fstopt>noexec,nosuid,acl,user_xattr</fstopt> <size>4gb</size> <create config:type="boolean">true</create> </partition> <partition> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <mount>/d2</mount> <label>d2</label> <mountby config:type="symbol">label</mountby> <partition_id config:type="integer">131</partition_id> <fstopt>noexec,nosuid,acl,user_xattr</fstopt> <size>max</size> <create config:type="boolean">true</create> </partition> </partitions> </drive> </partitioning> Thanks for any pointers, --stephen -- Stephen Dowdy - Systems Administrator - NCAR/RAL 303.497.2869 - sdowdy@ucar.edu - http://www.ral.ucar.edu/~sdowdy/ -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Stephen Dowdy wrote, On 01/11/2010 03:01 PM:
The /var/adm/cache/autoinstall/installedSystem.xml says:
<bootloader> <global config:type="list"> <global_entry> <key>timeout</key> <value config:type="integer">10</value> </global_entry> <global_entry config:type="boolean">true</global_entry> <global_entry config:type="boolean">true</global_entry> <!-- 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"> <global_entry> <key>timeout</key> <value config:type="integer">10</value> </global_entry> <activate config:type="boolean">true</activate> <boot_mbr config:type="boolean">true</boot_mbr> </global>
<activate config:type="boolean">true</activate> <loader_type>grub</loader_type> <location>mbr</location> <repl_mbr config:type="boolean">true</repl_mbr> </bootloader> ----------------------------------------------------------- [Aside: while i see a few random examples showing a structure for the bootloader section like: <global_entry> <key>serial</key> <value>--unit=0 --speed=57600 --word=8 --parity=no --stop=1</value> </global_entry> 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"> <global_entry> <key>serial</key> <value>--unit=1 --speed=115200</value> </global_entry> and the very last example: <bootloader> .... <global> <activate>true</activate> <generic_mbr>false</generic_mbr> <boot_mbr>false</boot_mbr> </global> .... </bootloader> are they both correct, or is the latter example old-style? thanks, --stephen -- Stephen Dowdy - Systems Administrator - NCAR/RAL 303.497.2869 - sdowdy@ucar.edu - http://www.ral.ucar.edu/~sdowdy/ -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
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"> <global_entry> <key>timeout</key> <value config:type="integer">10</value> </global_entry> <global_entry config:type="boolean">true</global_entry> <global_entry config:type="boolean">true</global_entry> <!-- 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> <boot_mbr config:type="boolean">true</boot_mbr> </global> <activate config:type="boolean">true</activate> <loader_type>grub</loader_type> <location>mbr</location> <repl_mbr config:type="boolean">true</repl_mbr> ... </bootloader> And the "boot_mbr" and "grub"->"mbr" items all got into the resultant merged profile correctly, and it now appears that indeed GRUB got installed to the MBR in3:~ # dd if=/dev/sda bs=512 count=64 | grep -ab --only-matching GRUB 304:GRUB 8388:GRUB and the installed system miraculously reboots on its own ;) So, again, i would ask what the proper syntax of the global section is given that even the latest autoyast documentation uses both forms in different examples? This is for SLES10sp3, again. thanks, --stephen -- Stephen Dowdy - Systems Administrator - NCAR/RAL 303.497.2869 - sdowdy@ucar.edu - http://www.ral.ucar.edu/~sdowdy/ -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
participants (1)
-
Stephen Dowdy