grub / lilo mit RAID1, Hilfe !

FreeBSD, Gentoo, openSUSE, CentOS, Ubuntu, Debian
lordy
Posts: 83
Joined: 2006-06-22 12:45
 

grub / lilo mit RAID1, Hilfe !

Post by lordy »

Ok, ich gebe auf, die Boot-Loader haben mich bezwungen, ich brauche also Eure Hilfe.

Ich bin gerade dabei, ein Debian 4.0 auf meinem neuen Root-Server bei der Firma H aus N zu installieren.

Soweit hat alles bestens geklappt, aber ich kriege keinen Boot-Loader installiert, weder grub (den ich eigentlich einsetzen möchte), noch lilo, mit dem ich mich auch begnügen würde.

Mein Disk-Layout ist auf beiden Platten (sda + sdb) wie folgt:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 125 1004031 fd Linux raid autodetect
/dev/sda2 126 250 1004062+ fd Linux raid autodetect
/dev/sda3 251 500 2008125 fd Linux raid autodetect
/dev/sda4 501 48641 386692582+ 5 Extended
/dev/sda5 501 1497 8008371 fd Linux raid autodetect
/dev/sda6 1498 1747 2008093+ fd Linux raid autodetect
/dev/sda7 1748 48641 376676023+ fd Linux raid autodetect
Ich habe also insgesamt 6 RAID-Devices (md0 bis md5). md0 ist dabei mein /.

Zunächst habe ich über "update-grub" eine grub-Konfiguraton erstellen lassen und versucht, diese mit grub-install auf die Platten zu bringen.

Das scheitert allerdings mit "Could not find device for /boot ...". grub-install kann ich aber nur mit sda und sdb aufrufen, da es im chroot kein /dev/md0 gibt.

Anschließend habe ich also probiert, das Dilemma mit lilo zu lösen. Da bekomme ich als Fehler "Fatal: Trying to map files from unnamed device 0x000f (NFS/RAID mirror down ?)".

Ich hoffe, Ihr könnt mir helfen die Kiste ans fliegen zu bringen.
gierig
Posts: 297
Joined: 2002-10-15 16:59
Location: WHV
 

Re: grub / lilo mit RAID1, Hilfe !

Post by gierig »

lordy wrote:
Das scheitert allerdings mit "Could not find device for /boot ...". grub-install kann ich aber nur mit sda und sdb aufrufen, da es im chroot kein /dev/md0 gibt.
Group-Install ist nen bash script das versucht deine Config auseinander zu nehmen und dan zu verwurschten.
hau ihn direkt per grup auf den MBR deiner Bootfestplatte, dann sollte es gehen.
Wobei du aber auch im Root zugriff auf die MD devices haben solltest.
fehlen nur die devices, wil im chroot udev nicht läuft ?? die kannst sonst von Hand anlegen (MKDEV md)
oxygen
Posts: 2138
Joined: 2002-12-15 00:10
Location: Bergheim
 

Re: grub / lilo mit RAID1, Hilfe !

Post by oxygen »

Wieso gibt es im chroot kein /dev/mdN? Mach doch einfach ein mount -t bind /dev /mnt/debian/dev vorher.
lordy
Posts: 83
Joined: 2006-06-22 12:45
 

Re: grub / lilo mit RAID1, Hilfe !

Post by lordy »

Folgendes habe ich nun getan (innerhalb des chroot):

Code: Select all

aptitude install mdadm
Jetzt habe ich auch md-devices im Chroot und meine Initrd ist aktualisiert worden.

grub-install will aber nach wie vor nicht:

Code: Select all

root@rescue ~ # LANG=C chroot /debian
rescue:/# grub-install /dev/md0
Could not find device for /boot: Not found or not a block device.
Wie kann ich GRUB direkt installieren ohne das blöde grub-install vielleicht ?
User avatar
Joe User
Project Manager
Project Manager
Posts: 11186
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: grub / lilo mit RAID1, Hilfe !

Post by Joe User »

man grub

Wie sehen die menu.lst und die device.map aus? Existiert eine seperate Partition für /boot und welche ist es?
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
lordy
Posts: 83
Joined: 2006-06-22 12:45
 

Re: grub / lilo mit RAID1, Hilfe !

Post by lordy »

Code: Select all

rescue:/boot/grub# cat device.map 
(fd0)   /dev/fd0
(hd0)   /dev/sda
(hd1)   /dev/sdb
rescue:/boot/grub# grep -v ^# menu.lst | grep -v ^$
default         0
timeout         5
color cyan/blue white/blue
title           Debian GNU/Linux, kernel 2.6.18-6-amd64
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.18-6-amd64 root=/dev/md0 ro 
initrd          /boot/initrd.img-2.6.18-6-amd64
savedefault
title           Debian GNU/Linux, kernel 2.6.18-6-amd64 (single-user mode)
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.18-6-amd64 root=/dev/md0 ro single
initrd          /boot/initrd.img-2.6.18-6-amd64
savedefault
Aus der Manpage zu grub werde ich irgendwie nicht schlau. Damit lande ich zwar in der ominösen Grub-Shell,
ich habe aber keinen Ansatz, wie ich der nun beibringe, was ich möchte.

Ich könnte den Stage1 wohl auch über dd installieren (dd if=/usr/lib/grub/x86_64-pc/stage1 of=/dev/sda ?), aber das kann ja nicht Sinn der Sache sein...
User avatar
Joe User
Project Manager
Project Manager
Posts: 11186
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: grub / lilo mit RAID1, Hilfe !

Post by Joe User »

Code: Select all

grub --no-floppy
root (hd0,0)
setup (hd0)
quit
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
lordy
Posts: 83
Joined: 2006-06-22 12:45
 

Re: grub / lilo mit RAID1, Hilfe !

Post by lordy »

Danke für den Tipp. Zuerst konnte er stage1 und stage2 nicht finden, die habe ich dann aus /usr/lib/grub/ nach /boot/grub kopiert

Code: Select all

grub> root (hd0,0)
root (hd0,0)
 Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... no
 Running "install /boot/grub/stage1 (hd0) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
Done.
grub> quit
Sollte ich das selbe noch mit der zweiten Platte machen ? Kommt das System damit hoch ? Brauche ich stage1.5 ?
oxygen
Posts: 2138
Joined: 2002-12-15 00:10
Location: Bergheim
 

Re: grub / lilo mit RAID1, Hilfe !

Post by oxygen »

Ja das solltest du auch mit der 2. Festplatte machen. Die Wahrscheinlichkeit, dass es dir etwas nutzt, ist zwar gering, aber es schadet nicht. Zur Erklärung: Nehmen wir an die erste Festplatte hat einen Hardwaredefekt, aber wird noch vom Bios erkannt, dann versucht der Server natürlich trotzdem vor dort zu booten. Erst wenn die kaputte Platte ausgebaut wird, kannst du von der 2. booten.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11186
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: grub / lilo mit RAID1, Hilfe !

Post by Joe User »

Die 1_5er brauchst Du nicht.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
lordy
Posts: 83
Joined: 2006-06-22 12:45
 

Re: grub / lilo mit RAID1, Hilfe !

Post by lordy »

Ok, das System scheint nun zu booten. Für mein nächstes Problem mache ich gleich einen neuen Thread auf ... :oops: