bootloader configuration
![](https://seccdn.libravatar.org/avatar/6ff95597f0ee446760a95cb13b9985b8.jpg?s=120&d=mm&r=g)
Hi, I try to configure the bootloader for SUSE 10.1 on a Sunfire X4100 with the following disk configuration: 2 SAS drives combined as a mirror via the SAS controller on SCSI id 0 2 other SAS drives on SCSI ids 2 and 3 In my autoyast profile I have the following section: <bootloader> <activate config:type="boolean">true</activate> <global config:type="list"> .... </global> <initrd_modules config:type="list"> <initrd_module> <module>mptsas</module> </initrd_module> <initrd_module> <module>scsi_mod</module> </initrd_module> .... </initrd_modules> <loader_device>/dev/sdc</loader_device> <loader_type>grub</loader_type> <location>mbr</location> <sections config:type="list"> <section config:type="list"> <section_entry> <key>title</key> <value>Linux</value> </section_entry> <section_entry> <key>kernel</key> <value>(hd2,4)/vmlinuz root=/dev/sdc7 vga=normal console=ttyS0,9600 console=tty0 noresume showopts</value> </section_entry> <section_entry> <key>initrd</key> <value>(hd2,4)/initrd</value> </section_entry> </section> <section config:type="list"> <section_entry> <key>title</key> <value>Failsafe</value> </section_entry> <section_entry> <key>kernel</key> <value>(hd2,4)/vmlinuz root=/dev/sdc7 vga=normal console=ttyS0,9600 console=tty0 noresume showopts ide=nodma apm=off acpi=off edd=off nosmp noapic maxcpus=0 3</value> </section_entry> <section_entry> <key>initrd</key> <value>(hd2,4)/initrd</value> </section_entry> </section> </sections> </bootloader> I want to install everything on the mirror which for whatever reason always appears as the last drive, even if it is SCSI id 0. But this seems to be a driver or controller issue and I can live with that. In my case the mirror is /dev/sdc resp. for grub it's (hd2). In the BIOS I explicitely set it to boot ONLY from the mirror and don't even look on the other drives. Now what happens is that Yast installs everything fine on the mirror but after the reboot the system doesn't come up anymore. The reason is that Yast never puts grub into the MBR on the mirror but instead puts it into the MBR of the first non-mirrored drive (which doesn't even have a valid partition table). This is the y2log_bootloader: GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ] grub> root (hd2,4) Filesystem type is ext2fs, partition type 0x83 grub> install --stage2=/boot/grub/stage2 /grub/stage1 d (hd2,4) /grub/stage2 0x8000 (hd2,4)/grub/menu.lst grub> install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0) /grub/stage2 0x8000 (hd2,4)/grub/menu.lst grub> quit Is that intentional behaviour and how can I get around it? Or is it just broken, in which case I can file a bug on bugzilla? Karsten. -- "The last time somebody said, `I find I can write much better with a word processor.', I replied, `They used to say the same thing about drugs.' -- Roy Blount, Jr.
![](https://seccdn.libravatar.org/avatar/6ff95597f0ee446760a95cb13b9985b8.jpg?s=120&d=mm&r=g)
On Friday 08 September 2006 15:21, Karsten Künne wrote:
Hi,
I try to configure the bootloader for SUSE 10.1 on a Sunfire X4100 with the following disk configuration:
2 SAS drives combined as a mirror via the SAS controller on SCSI id 0 2 other SAS drives on SCSI ids 2 and 3
[...]
Is that intentional behaviour and how can I get around it? Or is it just broken, in which case I can file a bug on bugzilla?
Answering my own mail. I believe I found a workaround. The problem seems to be that grub and the kernel don't agree on the device order. That means, grub booted from the disk and grub started from the system (the grub-shell) have different ideas which device the mirror should be. For grub booted from disk it's (hd0) but for the grub-shell it's (hd2). It's a mess and I don't know who's to blame for that. I tend to blame the mptsas driver by not numbering devices in the order of the SCSI-id. Anyway, the following small chroot-script fixed the autoyast blunder for me: <script> <chrooted config:type="boolean">true</chrooted> <filename>fixgrub</filename> <interpreter>shell</interpreter> <source><![CDATA[#!/bin/bash /usr/sbin/grub --batch <<EOT root (hd2,4) setup (hd2) quit EOT ]]></source> </script> And in addition I had to create a menu.lst file which looks kinda sick but it works: .... <section config:type="list"> <section_entry> <key>title</key> <value>Linux</value> </section_entry> <section_entry> <key>kernel</key> <value>(hd0,4)/vmlinuz root=/dev/sdc7 vga=normal console=ttyS0,9600 console=tty0 noresume showopts</value> </section_entry> <section_entry> <key>initrd</key> <value>(hd0,4)/initrd</value> </section_entry> </section> .... It specifies (hd0,*) for grub but /dev/sdc* for the kernel. Karsten. -- The geographical center of Boston is in Roxbury. Due north of the center we find the South End. This is not to be confused with South Boston which lies directly east from the South End. North of the South End is East Boston and southwest of East Boston is the North End.
participants (1)
-
Karsten Künne