System bootet nicht vom Raid

Hallo Leute,

ich habe SuSE 12.1 neu installiert. Das Betriebssystem liegt auf einem RAID1. Es lässt sich nach der Installation aber nicht starten. Wenn ich die Installations-CD einlege und die Option “Von Festplatte booten” starte, wird das OS gestartet.

Also habe ich versucht GRUB auf beiden Platten zu installieren. Aber es gelingt mir nicht.

Erst mal das Plattenlayout:
Ich habe zwei Platten mit je drei primären Partitionen. Auf der ersten sollte der MBR liegen, die zweite ist Swap die dritten bilden das RAID (md0).

Ausgabe von fdisk -l:

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c0ad9

Device Boot Start End Blocks Id System
/dev/sda1 2048 321535 159744 83 Linux
/dev/sda2 321536 12916735 6297600 82 Linux swap / Solaris
/dev/sda3 * 12916736 234440703 110761984 fd Linux raid autodetect

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c0ad9

Device Boot Start End Blocks Id System
/dev/sdb1 2048 321535 159744 83 Linux
/dev/sdb2 321536 12916735 6297600 82 Linux swap / Solaris
/dev/sdb3 * 12916736 234440703 110761984 fd Linux raid autodetect

Und nun GRUB:

grub> find /boot/grub/stage1
(hd0,2)
(hd1,2)

grub> device (hd0) /dev/sda

grub> root (hd0,2)
Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 17 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,2)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.

grub> device (hd0) /dev/sdb

grub> root (hd1,2)
Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 17 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 d (hd0) (hd0)1+17 p (hd1,2)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.

grub>

Hier ist Grub.conf

setup --stage2=/boot/grub/stage2 --force-lba (hd0) (hd0,2)
setup --stage2=/boot/grub/stage2 --force-lba (hd1) (hd1,2)
setup --stage2=/boot/grub/stage2 --force-lba (hd1,0) (hd0,2)

Danach sieht menu.lst so aus:

default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,2)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 12.1
root (hd0,2)
kernel /boot/vmlinuz root=/dev/disk/by-id/md-uuid-0e18e1ed:8b00eed0:981e4c73:31d8d36d resume=/dev/disk/by-id/ata-OCZ-AGILITY3_OCZ-WC8Y4PZ7FBWOJC0Z-part2 splash=silent quiet showopts vga=0x346
initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 12.1
root (hd0,2)
kernel /boot/vmlinuz root=/dev/disk/by-id/md-uuid-0e18e1ed:8b00eed0:981e4c73:31d8d36d showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x346
initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: linux###
title Kernel-3.1.0-1.2-desktop
root (hd0,2)
kernel /boot/vmlinuz-3.1.0-1.2-desktop root=/dev/disk/by-id/md-uuid-0e18e1ed:8b00eed0:981e4c73:31d8d36d resume=/dev/disk/by-id/ata-OCZ-AGILITY3_OCZ-WC8Y4PZ7FBWOJC0Z-part2 splash=silent quiet showopts vga=0x346
initrd /boot/initrd-3.1.0-1.2-desktop


Es ist offensichtlich, dass dass Grub nicht auf sda1 (bzw. sdb1) sondern auf sda3 (bzw. sdb3) liegt.
Ich habe versucht mit Yast den Bootloader in den MBR zu schreiben. Ohne Erfolg.
Dort habe ich die Optionen

Aus Master-Boot-Record starten
Redundanz für MD-Array aktivieren
Benutzerdefinierte Bootpartition /dev/sda

gewählt.

Alles ohne Erfolg. Wie bekomme ich den Bootloader in MBR auf sda1 und sdb1?

Grüße

Karsten

Und was auf linuxforen.de alles schon gesagt wurde, unterschlägst Du hier?
System bootet nicht vom Raid - linuxforen.de – User helfen Usern

Das hat bis jetzt nicht zur Lösung geführt.
Von einem SuSE Forum hatte ich gehofft, Hinweise zu bekommen, die nicht die manuelle Bearbeitung im Proc Dateisystem erfordern oder Kommandos, die von SuSE selbst als “unsupported” bezeichnet werden.

Arbeitest Du mit md-tools zur Spiegelung?
Dann muss in der initrd auch die entsprechende Funktion enthalten sein, fahre mal Dein System mit der boot-CD Methode hoch und führe als root aus:

mkinitrd

und poste den output.

Wenn das System mal gestartet ist, dann zeigt mkinitrd

Scanning scripts ...
Resolve dependencies ...
Install symlinks in /lib/mkinitrd/setup ...
Install symlinks in /lib/mkinitrd/boot ...

Kernel image:   /boot/vmlinuz-3.1.0-1.2-desktop
Initrd image:   /boot/initrd-3.1.0-1.2-desktop
KMS drivers:     nouveau
Root device:    /dev/disk/by-id/md-uuid-0e18e1ed:8b00eed0:981e4c73:31d8d36d (/dev/md0) (mounted on / as ext4)
Resume device:  /dev/disk/by-id/ata-OCZ-AGILITY3_OCZ-WC8Y4PZ7FBWOJC0Z-part2 (/dev/sda2)
Kernel Modules: thermal_sys thermal processor fan pata_amd sata_nv ata_generic scsi_transport_spi sym53c8xx button video wmi mxm-wmi i2c-algo-bit drm drm_kms_helper ttm nouveau raid0 raid1 raid10 async_tx async_memcpy xor async_xor raid6_pq async_pq async_raid6_recov raid456 
Features:       acpi kms block usb md resume.userspace resume.kernel
Bootsplash:     openSUSE (1920x1200)

Dien initrd ist in Ordnung, da kommt alles mit.

Ich bin der Meinung, dass grub (unter openSuSE 12.1) in Version 0.97 keine software RAIDs als root-device unterstützt.

Du brauchst folglich zum booten ein separates md-device als /boot FS.
Darauf legst Du dann ein ext2 filesystem und kopierst den Inhalt von /boot rein, anschließend mountest Du dieses filesystem nach /boot und installierst grub wie gehabt über yast neu.

Viel Erfolg!

Am 2011-12-07 10:26, schrieb matchi:
>
> Dien initrd ist in Ordnung, da kommt alles mit.
>
> Ich bin der Meinung, dass grub (unter openSuSE 12.1) in Version 0.97
> keine software RAIDs als root-device unterstützt.

grub 1 (aka legacy) kann definitiv nicht von SW-RAID booten. grub
2 kann das, aber die Einrichtung ist nicht ohne.

Christoph


email:
nurfuerspam → gmx
de → net