95s390: add support to boot from s390 dasds
authorHarald Hoyer <harald@eeepc.(none)>
Wed, 22 Jul 2009 14:34:12 +0000 (16:34 +0200)
committerHarald Hoyer <harald@eeepc.(none)>
Wed, 22 Jul 2009 14:35:49 +0000 (16:35 +0200)
command line parameter:

DASD
       dasd=....
              same syntax as the kernel module parameter (s390 only)

dracut.8
modules.d/95s390/check [new file with mode: 0755]
modules.d/95s390/install [new file with mode: 0755]
modules.d/95s390/installkernel [new file with mode: 0755]
modules.d/95s390/parse-s390.sh [new file with mode: 0755]

index 55a4037..27497b8 100644 (file)
--- a/dracut.8
+++ b/dracut.8
@@ -151,6 +151,11 @@ disable DM RAID detection
 .B rd_DM_UUID=<dmraid uuid>
 only activate the raid sets with the given UUID
 
+.SH DASD
+.TP
+.B dasd=....
+same syntax as the kernel module parameter (s390 only)
+
 .SH DHCP
 .TP
 .B root=dhcp
diff --git a/modules.d/95s390/check b/modules.d/95s390/check
new file mode 100755 (executable)
index 0000000..bfc4052
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+arch=$(arch)
+[ "$arch" = "s390" -o "$arch" = "s390x" ] || exit 1 
+
+exit 0
diff --git a/modules.d/95s390/install b/modules.d/95s390/install
new file mode 100755 (executable)
index 0000000..85009dc
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+inst_hook cmdline 30 "$moddir/parse-s390.sh"
+
diff --git a/modules.d/95s390/installkernel b/modules.d/95s390/installkernel
new file mode 100755 (executable)
index 0000000..2e2277c
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+instmods dasd_mod dasd_eckd_mod dasd_fba_mod \
+       zfcp
+
diff --git a/modules.d/95s390/parse-s390.sh b/modules.d/95s390/parse-s390.sh
new file mode 100755 (executable)
index 0000000..786d7c5
--- /dev/null
@@ -0,0 +1,9 @@
+initrdargs="$initrdargs dasd" 
+
+[ -d /etc/modprobe.d ] || mkdir /etc/modprobe.d
+
+dasd_arg=$(getarg dasd=)
+if [ -n "$dasd_arg" ]; then
+       echo "option dasd_mod dasd=$dasd_arg" >> /etc/modprobe.d/dasd.conf
+fi
+unset dasd_arg