Hi,

We use GRML as rescue system on our machines. The /boot partition (which sits 
on a software raid1) of the main system includes the GRML-Kernel, initrd and 
squashfs so in case someone unintentionally removes libc6 or does some other 
bad things it's possible to recover the machine via the grml boot option in 
grub.

the good thing is that this works if the /boot partition is on ide devices 
because the ide drivers are compiled into the kernel and the raid code in the 
kernel autostarts the raid.

the bad thing: it doesn't work with our new dell boxes with mpt fusion 
controllers. the second problem here is that these boxes don't have ps/2 
keyboard connectors and grml doesn't recognise the usb keyboard when it puts 
me into the rescue shell ... argh.

here is what i did to fix these problems:

- when grml loads the usb kernel modules it also tries to insmod usbhid.ko but 
this one has unknown symbols because ff-memless.ko has to be loaded first. so 
i copied ff-memless.ko to the initrd and added it to the list of usb.modules. 
cool. now i have a keyboard.

- the next thing was that the sysfs-scsi-detection code did not find my fusion 
mpt controller. after reading /modules/scsi/scsi-modules.txt i knew why: 
because it was missing from there. after adding the entries for it i ended 
with a correctly detected controller but without a raid. how is the 
scsi-modules.txt file created? by hand? maybe it would be better to generate 
it from /lib/modules/$(uname -r)/modules.{dep,pcimap} because in these files 
the mpt drivers where referenced ...

- ok so after having the devices i needed to start the raid1 to access the 
filesystem. unfortunately there is no mdadm in the initrd image of grml so i 
had to compile a static version of mdadm and put it in /static. after this i 
added some code to assemble all arrays in case there exists a boot option 
fromhd=/dev/md*

ok so now everything works. great!

btw: grml is a really cool tool

cheers,
-- 
: Philipp Richter                                 Tel +43-1-8178292-51 :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Vivenotgasse 48, A-1120 Vienna/Europe          http://www.linbit.com :
--- m1/linuxrc	2007-05-12 12:54:30.000000000 +0200
+++ m2/linuxrc	2007-08-21 16:45:06.000000000 +0200
@@ -597,6 +597,13 @@
     test -n "$FOUND_SCSI" -a -z "$NOSCSI" && DEVICES="$DEVICES /dev/sd?[1-9] /dev/sd?[1-9][0-9] /dev/sd?"
     DEVICES="$DEVICES /dev/hd?[1-9] /dev/hd?[1-9][0-9]"
     case "$CMDLINE" in *fromhd=/dev/*) DEVICES="$fromhd"; ;; esac
+    # start raid arrays if we depend on it
+    case "$DEVICES" in */dev/md*)
+            echo "DEVICE partitions" > /etc/mdadm.conf
+            /static/mdadm -Ebs >> /etc/mdadm.conf
+            /static/mdadm -Asayes
+            ;;
+    esac
     # make sure we dont' search for the booting device if cdrom=... is present
     case "$CMDLINE" in *cdrom=/dev/*)
             CDROMDEV="$(echo $CMDLINE | tr ' ' '\n' | sed -n '/cdrom=/s/.*=//p' | tail -1)"
--- m1/modules/scsi/scsi-modules.txt	2007-05-04 08:57:34.000000000 +0200
+++ m2/modules/scsi/scsi-modules.txt	2007-08-21 11:08:51.000000000 +0200
@@ -566,3 +566,33 @@
 v00009005d0000809Esv*sd*bc01sc04i* aic79xx
 v00009005d0000809Fsv*sd*bc01sc00i* aic79xx
 v00009005d0000809Fsv*sd*bc01sc04i* aic79xx
+v00001000d00000050sv*sd*bc01sc00i* mptbase mptscsih mptsas
+v00001000d00000050sv*sd*bc01sc04i* mptbase mptscsih mptsas
+v00001000d00000054sv*sd*bc01sc00i* mptbase mptscsih mptsas
+v00001000d00000054sv*sd*bc01sc04i* mptbase mptscsih mptsas
+v00001000d00000056sv*sd*bc01sc00i* mptbase mptscsih mptsas
+v00001000d00000056sv*sd*bc01sc04i* mptbase mptscsih mptsas
+v00001000d00000058sv*sd*bc01sc00i* mptbase mptscsih mptsas
+v00001000d00000058sv*sd*bc01sc04i* mptbase mptscsih mptsas
+v00001000d00000062sv*sd*bc01sc00i* mptbase mptscsih mptsas
+v00001000d00000062sv*sd*bc01sc04i* mptbase mptscsih mptsas
+v00001000d00000030sv*sd*bc01sc00i* mptbase mptscsih mptspi
+v00001000d00000030sv*sd*bc01sc04i* mptbase mptscsih mptspi
+v00001000d00000040sv*sd*bc01sc00i* mptbase mptscsih mptspi
+v00001000d00000040sv*sd*bc01sc04i* mptbase mptscsih mptspi
+v00001000d00000621sv*sd*bc01sc00i* mptbase mptscsih mptfc
+v00001000d00000621sv*sd*bc01sc04i* mptbase mptscsih mptfc
+v00001000d00000622sv*sd*bc01sc00i* mptbase mptscsih mptfc
+v00001000d00000622sv*sd*bc01sc04i* mptbase mptscsih mptfc
+v00001000d00000624sv*sd*bc01sc00i* mptbase mptscsih mptfc
+v00001000d00000624sv*sd*bc01sc04i* mptbase mptscsih mptfc
+v00001000d00000626sv*sd*bc01sc00i* mptbase mptscsih mptfc
+v00001000d00000626sv*sd*bc01sc04i* mptbase mptscsih mptfc
+v00001000d00000628sv*sd*bc01sc00i* mptbase mptscsih mptfc
+v00001000d00000628sv*sd*bc01sc04i* mptbase mptscsih mptfc
+v00001000d00000642sv*sd*bc01sc00i* mptbase mptscsih mptfc
+v00001000d00000642sv*sd*bc01sc04i* mptbase mptscsih mptfc
+v00001000d00000640sv*sd*bc01sc00i* mptbase mptscsih mptfc
+v00001000d00000640sv*sd*bc01sc04i* mptbase mptscsih mptfc
+v00001000d00000646sv*sd*bc01sc00i* mptbase mptscsih mptfc
+v00001000d00000646sv*sd*bc01sc04i* mptbase mptscsih mptfc
--- m1/linuxrc	2007-05-12 12:54:30.000000000 +0200
+++ m2/linuxrc	2007-08-21 16:45:06.000000000 +0200
@@ -410,7 +410,7 @@
   if test -f /modules/div/usbcore.ko; then
     $INSMOD /modules/div/usbcore.ko >/dev/null 2>&1
     FOUNDUSB=""
-    for i in $USB2 uhci-hcd.ko ohci-hcd.ko usbhid.ko ; do
+    for i in $USB2 uhci-hcd.ko ohci-hcd.ko ff-memless.ko usbhid.ko ; do
       test -f /modules/div/$i && $INSMOD /modules/div/$i >/dev/null 2>&1 && FOUNDUSB="yes"
     done
     if test -n "$FOUNDUSB"; then
_______________________________________________
Grml mailing list - [email protected]
http://lists.mur.at/mailman/listinfo/grml
join #grml on irc.freenode.org
grml-devel-blog: http://grml.supersized.org/

Reply via email to