Skip to contentSkip to conversation

Changes 2009-06-19

PATCH In review Harald Hoyer 2 participants 17 messages Jun 19, 2009 4 messages not in the archive Kbuild

lore
Share & tools
lore
#0 lore raw

cover Changes 2009-06-19

Harald Hoyer (13):
moved test-init to TEST-10-RAID
uncomment hard-off for TEST-30-ISCSI
do not poweroff in TEST-30-ISCSI, if rdinitdebug is set do not poweroff in TEST-10-RAID if rdinitdebug is set prepare udev rules for udev >= 143
install rules to ignore some devices
make iSCSI boot with root=dhcp and mount partitions labeled with

    "ROOT" or "/"

manpage iSCSI update
add rdblacklist command line parameter updated switch_root.c
dracut.spec without switch_root
renamed dracut-lib to dracut-lib.sh removed shebang from .sh and changed mode to 0644

 Makefile                                   |    2 +-
 dracut.8                                   |   10 +-
 dracut.spec                                |   10 ++
 modules.d/40network/dhclient-script        |    2 +-
 modules.d/40network/ifup                   |    2 +-
 modules.d/40network/netroot                |    2 +-
 modules.d/50plymouth/plymouth-emergency.sh |    1 -
 modules.d/90crypt/63-luks.rules            |   12 --
 modules.d/90crypt/70-luks.rules            |   12 ++
 modules.d/90crypt/install                  |    2 +-
 modules.d/90dmraid/dmraid.sh               |    1 -
 modules.d/90lvm/64-lvm-vol_id.rules        |   20 +++
 modules.d/90lvm/64-lvm.rules               |    9 +-
 modules.d/90lvm/install                    |    6 +-
 modules.d/90mdraid/65-md-incremental.rules |    8 +
 modules.d/90mdraid/install                 |    9 +-
 modules.d/95iscsi/iscsiroot                |   10 +-
 modules.d/95nbd/61-nbd-vol_id.rules        |    7 +
 modules.d/95nbd/61-nbd.rules               |    4 +-
 modules.d/95nbd/install                    |    8 +-
 modules.d/95nbd/nbdroot                    |    2 +-
 modules.d/95nfs/nfsroot                    |    2 +-
 modules.d/95udev-rules/01-ignore.rules     |    1 +
 modules.d/95udev-rules/install             |   10 +-
 modules.d/99base/dracut-lib                |   62 --------
 modules.d/99base/dracut-lib.sh             |   55 +++++++
 modules.d/99base/init                      |    2 +-
 modules.d/99base/install                   |    8 +-
 modules.d/99base/parse-blacklist.sh        |   10 ++
 switch_root.c                              |  232 ++++++++++++++--------------
 test/TEST-10-RAID/hard-off.sh              |    2 +-
 test/TEST-10-RAID/test-init                |   10 ++
 test/TEST-10-RAID/test.sh                  |    2 +-
 test/TEST-30-ISCSI/dhcpd.conf              |    2 +-
 test/TEST-30-ISCSI/hard-off.sh             |    2 +-
 test/TEST-30-ISCSI/test.sh                 |    6 +-
 test/test-init                             |   10 --
 37 files changed, 323 insertions(+), 232 deletions(-)
 delete mode 100644 modules.d/90crypt/63-luks.rules
 create mode 100644 modules.d/90crypt/70-luks.rules
 create mode 100644 modules.d/90lvm/64-lvm-vol_id.rules
 create mode 100644 modules.d/90mdraid/65-md-incremental.rules
 create mode 100644 modules.d/95nbd/61-nbd-vol_id.rules
 mode change 100755 => 100644 modules.d/95resume/resume-genrules.sh
 mode change 100755 => 100644 modules.d/95rootfs-block/block-genrules.sh
 mode change 100755 => 100644 modules.d/95rootfs-block/parse-block.sh
 create mode 100644 modules.d/95udev-rules/01-ignore.rules
 delete mode 100644 modules.d/99base/dracut-lib
 create mode 100644 modules.d/99base/dracut-lib.sh
 create mode 100755 modules.d/99base/parse-blacklist.sh
 mode change 100755 => 100644 modules.d/99base/parse-root-opts.sh
 create mode 100755 test/TEST-10-RAID/test-init
 delete mode 100755 test/test-init

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

PATCH 1/13 moved test-init to TEST-10-RAID

In reply to a message not in the archive
---
 test/TEST-10-RAID/test-init |   10 ++++++++++
 test/TEST-10-RAID/test.sh   |    2 +-
 test/test-init              |   10 ----------
 3 files changed, 11 insertions(+), 11 deletions(-)
 create mode 100755 test/TEST-10-RAID/test-init
 delete mode 100755 test/test-init
test/TEST-10-RAID/test-init new file +10 -0
new file mode 100755
index 0000000..ccdc9a4
@@ -0,0 +1,10 @@
+#!/bin/sh
+exec >/dev/console 2>&1
+echo "dracut-root-block-success" >/dev/sda1
+export TERM=linux
+export PS1='initramfs-test:\w\$ '
+[ -f /etc/fstab ] || ln -s /proc/mounts /etc/fstab
+stty sane
+echo "made it to the rootfs! Powering down."
+mount -n -o remount,ro /
+poweroff -f
test/TEST-10-RAID/test.sh +1 -1
index 59ae01e..501b03e 100755
@@ -28,7 +28,7 @@ test_setup() {
 	inst "$basedir/modules.d/40network/dhclient-script" "/sbin/dhclient-script"
 	inst "$basedir/modules.d/40network/ifup" "/sbin/ifup"
 	dracut_install grep
-	inst $testdir/test-init /sbin/init
+	inst ./test-init /sbin/init
 	find_binary plymouth >/dev/null && dracut_install plymouth
 	(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
     )
test/test-init deleted +0 -10
deleted file mode 100755
index ccdc9a4..0000000
@@ -1,10 +0,0 @@
-#!/bin/sh
-exec >/dev/console 2>&1
-echo "dracut-root-block-success" >/dev/sda1
-export TERM=linux
-export PS1='initramfs-test:\w\$ '
-[ -f /etc/fstab ] || ln -s /proc/mounts /etc/fstab
-stty sane
-echo "made it to the rootfs! Powering down."
-mount -n -o remount,ro /
-poweroff -f
Signature · 6 lines
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

PATCH 2/13 uncomment hard-off for TEST-30-ISCSI

In reply to a message not in the archive
---
 test/TEST-30-ISCSI/test.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
test/TEST-30-ISCSI/test.sh +2 -2
index 3fd6bd3..134ee73 100755
@@ -3,7 +3,7 @@ TEST_DESCRIPTION="root filesystem over iSCSI"
 
 KVERSION=${KVERSION-$(uname -r)}
 
-#DEBUGFAIL="rdinitdebug rdnetdebug udevinfo"
+#DEBUGFAIL="rdinitdebug rdnetdebug rdudevinfo"
 
 run_server() {
     # Start server first
@@ -110,7 +110,7 @@ test_setup() {
 	initdir=overlay
 	. $basedir/dracut-functions
 	dracut_install poweroff shutdown
-#	inst_simple ./hard-off.sh /emergency/01hard-off.sh
+	inst_simple ./hard-off.sh /emergency/01hard-off.sh
 #	inst ./cryptroot-ask /sbin/cryptroot-ask
     )
 #	-m "debug dash crypt lvm mdraid udev-rules base rootfs-block iscsi" \
Signature · 6 lines
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw

PATCH 3/13 do not poweroff in TEST-30-ISCSI, if rdinitdebug is set

In reply to a message not in the archive
---
 test/TEST-30-ISCSI/hard-off.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
test/TEST-30-ISCSI/hard-off.sh +1 -1
index 92dd304..85fd849 100755
@@ -1,2 +1,2 @@
 #!/bin/sh
-poweroff -f
\ No newline at end of file
+getarg rdinitdebug || poweroff -f
Signature · 6 lines
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw

PATCH 4/13 do not poweroff in TEST-10-RAID if rdinitdebug is set

In reply to a message not in the archive
---
 test/TEST-10-RAID/hard-off.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
test/TEST-10-RAID/hard-off.sh +1 -1
index 92dd304..85fd849 100755
@@ -1,2 +1,2 @@
 #!/bin/sh
-poweroff -f
\ No newline at end of file
+getarg rdinitdebug || poweroff -f
Signature · 6 lines
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#6 lore raw

PATCH 5/13 prepare udev rules for udev >= 143

In reply to a message not in the archive
---
 modules.d/90crypt/63-luks.rules            |   12 ------------
 modules.d/90crypt/70-luks.rules            |   12 ++++++++++++
 modules.d/90crypt/install                  |    2 +-
 modules.d/90lvm/64-lvm-vol_id.rules        |   20 ++++++++++++++++++++
 modules.d/90lvm/64-lvm.rules               |    9 ++++++++-
 modules.d/90lvm/install                    |    6 +++++-
 modules.d/90mdraid/65-md-incremental.rules |    8 ++++++++
 modules.d/90mdraid/install                 |    9 ++++++++-
 modules.d/95nbd/61-nbd-vol_id.rules        |    7 +++++++
 modules.d/95nbd/61-nbd.rules               |    4 ++--
 modules.d/95nbd/install                    |    8 +++++++-
 modules.d/95udev-rules/install             |    6 +++++-
 12 files changed, 83 insertions(+), 20 deletions(-)
 delete mode 100644 modules.d/90crypt/63-luks.rules
 create mode 100644 modules.d/90crypt/70-luks.rules
 create mode 100644 modules.d/90lvm/64-lvm-vol_id.rules
 create mode 100644 modules.d/90mdraid/65-md-incremental.rules
 create mode 100644 modules.d/95nbd/61-nbd-vol_id.rules
modules.d/90crypt/63-luks.rules deleted +0 -12
deleted file mode 100644
index cfa619b..0000000
@@ -1,12 +0,0 @@
-# hacky rules to try to try unlocking dm-crypt devs
-#
-# Copyright 2008, Red Hat, Inc.
-# Jeremy Katz <[email protected]>
-
-
-SUBSYSTEM!="block", GOTO="luks_end"
-ACTION!="add|change", GOTO="luks_end"
-
-ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="/sbin/cryptroot-ask $env{DEVNAME} luks-$env{ID_FS_UUID}"
-
-LABEL="luks_end"
modules.d/90crypt/70-luks.rules new file +12 -0
new file mode 100644
index 0000000..cfa619b
@@ -0,0 +1,12 @@
+# hacky rules to try to try unlocking dm-crypt devs
+#
+# Copyright 2008, Red Hat, Inc.
+# Jeremy Katz <[email protected]>
+
+
+SUBSYSTEM!="block", GOTO="luks_end"
+ACTION!="add|change", GOTO="luks_end"
+
+ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="/sbin/cryptroot-ask $env{DEVNAME} luks-$env{ID_FS_UUID}"
+
+LABEL="luks_end"
modules.d/90crypt/install +1 -1
index fcaaa60..a3a856d 100755
@@ -1,5 +1,5 @@
 #!/bin/bash
 inst cryptsetup
 instmods dm_crypt cbc aes sha256 xts
-inst_rules "$moddir/63-luks.rules"
+inst_rules "$moddir/70-luks.rules"
 inst "$moddir"/cryptroot-ask.sh /sbin/cryptroot-ask
modules.d/90lvm/64-lvm-vol_id.rules new file +20 -0
new file mode 100644
index 0000000..d4b5269
@@ -0,0 +1,20 @@
+# hacky rules to try to activate lvm when we get new block devs...
+#
+# Copyright 2008, Red Hat, Inc.
+# Jeremy Katz <[email protected]>
+
+
+SUBSYSTEM!="block", GOTO="lvm_end"
+ACTION!="add|change", GOTO="lvm_end"
+KERNEL!="dm-*", GOTO="lvm_end"
+
+IMPORT{program}="vol_id --export $tempnode"
+
+ENV{ID_FS_TYPE}=="LVM2_member", RUN+="/bin/sh -c '/sbin/lvm vgscan; /sbin/lvm vgchange -ay'"
+
+OPTIONS="link_priority=-100"
+ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
+
+
+LABEL="lvm_end"
modules.d/90lvm/64-lvm.rules +8 -1
index 8a2fcc4..3eddd07 100644
@@ -6,8 +6,15 @@
 
 SUBSYSTEM!="block", GOTO="lvm_end"
 ACTION!="add|change", GOTO="lvm_end"
+KERNEL!="dm-*", GOTO="lvm_end"
+
+IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
 
-KERNEL=="dm-[0-9]*", IMPORT{program}="vol_id --export $tempnode"
 ENV{ID_FS_TYPE}=="LVM2_member", RUN+="/bin/sh -c '/sbin/lvm vgscan; /sbin/lvm vgchange -ay'"
 
+OPTIONS="link_priority=-100"
+ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
+
+
 LABEL="lvm_end"
modules.d/90lvm/install +5 -1
index d32748b..48f6ec7 100755
@@ -1,3 +1,7 @@
 #!/bin/bash
 inst lvm
-inst_rules "$moddir/64-lvm.rules" 64-device-mapper.rules
\ No newline at end of file
+if [ -x /lib/udev/vol_id ]; then
+    inst_rules "$moddir/64-lvm-vol_id.rules" 64-device-mapper.rules
+else
+    inst_rules "$moddir/64-lvm.rules" 64-device-mapper.rules
+fi
modules.d/90mdraid/65-md-incremental.rules new file +8 -0
new file mode 100644
index 0000000..3dec8df
@@ -0,0 +1,8 @@
+# This file causes block devices with Linux RAID (mdadm) signatures to
+# automatically cause mdadm to be run.
+# See udev(8) for syntax
+
+SUBSYSTEM=="block", ACTION=="add", ENV{ID_FS_TYPE}=="linux_raid_member", \
+	IMPORT{program}="/sbin/mdadm --examine --export $tempnode", \
+	RUN+="/bin/bash -c '[ ! -f /dev/.in_sysinit ] && /sbin/mdadm -I $env{DEVNAME}'"
+
modules.d/90mdraid/install +8 -1
index a6fad0d..9b69941 100755
@@ -3,7 +3,14 @@ dracut_install mdadm
 inst /etc/passwd
 inst /etc/group
 instmods =drivers/md
-inst_rules "$moddir/61-mdadm.rules"
+
+if [ -x /lib/udev/vol_id ]; then
+    inst_rules "$moddir/61-mdadm.rules"
+else
+    inst_rules "$moddir/65-md-incremental.rules"
+    inst_rules 64-md-raid.rules
+fi
+
 [ -f /etc/mdadm/mdadm.conf ] && inst /etc/mdadm/mdadm.conf /etc/mdadm.conf
 [ -f /etc/mdadm.conf ] && inst /etc/mdadm.conf
 if [ -x  /sbin/mdmon ] ; then
modules.d/95nbd/61-nbd-vol_id.rules new file +7 -0
new file mode 100644
index 0000000..67c2fb2
@@ -0,0 +1,7 @@
+SUBSYSTEM!="block", GOTO="nbd_end"
+ACTION!="change", GOTO="nbd_end"
+
+KERNEL=="nbd[0-9]*", IMPORT{program}="vol_id --export $tempnode"
+KERNEL=="nbd[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
+
+LABEL="nbd_end"
modules.d/95nbd/61-nbd.rules +2 -2
index 5892cf3..f8c9509 100644
@@ -1,6 +1,6 @@
 SUBSYSTEM!="block", GOTO="nbd_end"
-ACTION!="add|change", GOTO="nbd_end"
+ACTION!="change", GOTO="nbd_end"
 
-KERNEL=="nbd*", IMPORT{program}="vol_id --export $tempnode"
+KERNEL=="nbd[0-9]*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
 
 LABEL="nbd_end"
modules.d/95nbd/install +7 -1
index dace08f..76091a1 100755
@@ -2,6 +2,12 @@
 
 inst nbd-client
 inst_hook cmdline 90 "$moddir/parse-nbdroot.sh"
-inst_rules "$moddir/61-nbd.rules"
+
+if [ -x /lib/udev/vol_id ]; then
+    inst_rules "$moddir/61-nbd-vol_id.rules"
+else
+    inst_rules "$moddir/61-nbd.rules"
+fi
+
 inst "$moddir/nbdroot" "/sbin/nbdroot"
 instmods nbd
modules.d/95udev-rules/install +5 -1
index c5d73a6..d55c61a 100755
@@ -8,7 +8,11 @@ inst_rules 50-udev-default.rules 60-persistent-storage.rules \
     61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules 
 #Some debian udev rules are named differently
 inst_rules 50-udev.rules 95-late.rules
- 
+
+if [ ! -x /lib/udev/vol_id ]; then
+    dracut_install blkid
+fi
+
 if ldd $(find_binary udevd) |grep -q /lib64/libc; then
     dracut_install /lib64/libnss_files*
 else
Signature · 6 lines
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#11 lore raw

PATCH 6/13 install rules to ignore some devices

In reply to a message not in the archive
---
 modules.d/95udev-rules/01-ignore.rules |    1 +
 modules.d/95udev-rules/install         |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)
 create mode 100644 modules.d/95udev-rules/01-ignore.rules
modules.d/95udev-rules/01-ignore.rules new file +1 -0
new file mode 100644
index 0000000..b32f22e
@@ -0,0 +1 @@
+KERNEL=="ram[0-9]*", OPTIONS+="ignore_device", OPTIONS+="last_rule"
modules.d/95udev-rules/install +4 -0
index d55c61a..8a3d8e9 100755
@@ -9,10 +9,14 @@ inst_rules 50-udev-default.rules 60-persistent-storage.rules \
 #Some debian udev rules are named differently
 inst_rules 50-udev.rules 95-late.rules
 
+# ignore some devices in the initrd
+inst_rules "$moddir/01-ignore.rules"
+
 if [ ! -x /lib/udev/vol_id ]; then
     dracut_install blkid
 fi
 
+
 if ldd $(find_binary udevd) |grep -q /lib64/libc; then
     dracut_install /lib64/libnss_files*
 else
Signature · 6 lines
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#12 lore raw

PATCH 7/13 make iSCSI boot with root=dhcp and mount partitions labeled with "ROOT" or "/"

In reply to a message not in the archive
---
 modules.d/95iscsi/iscsiroot   |    8 ++++++++
 modules.d/99base/install      |    5 ++---
 test/TEST-30-ISCSI/dhcpd.conf |    2 +-
 test/TEST-30-ISCSI/test.sh    |    2 +-
 4 files changed, 12 insertions(+), 5 deletions(-)
modules.d/95iscsi/iscsiroot +8 -0
index e273fc5..783306b 100755
@@ -118,6 +118,14 @@ echo "InitiatorName='$iscsi_initiator'" > /dev/.initiatorname.iscsi
 
 # FIXME $iscsi_lun?? $iscsi_protocol??
 
+# if root does not specify a block device
+# we set a fallback to recognize any filesystems labeled 
+# LABEL=/ or LABEL=ROOT
+if [ "${root#block:*}" = "$root" ]; then
+    ( root="block:/dev/disk/by-label/\x2f" . /pre-udev/30-block-genrules.sh )
+    ( root="block:/dev/disk/by-label/ROOT" . /pre-udev/30-block-genrules.sh )
+fi
+
 iscsistart -i $iscsi_initiator -t $iscsi_target_name	\
     -g $iscsi_target_group -a $iscsi_target_ip	\
     -p $iscsi_target_port \
modules.d/99base/install +2 -3
index 68d40fb..06cf6db 100755
@@ -7,9 +7,8 @@ fi
 # install our scripts and hooks
 inst "$moddir/init" "/init"
 # Bail out if switch_root does not exist
-if [ ! -x "$moddir/switch_root" ]; then
-    # assume it is installed in the standard path
-    dracut_install switch_root
+if which switch_root >/dev/null 2>&1; then
+    dracut_install switch_root 
 else
     inst "$moddir/switch_root" "/sbin/switch_root"
 fi
test/TEST-30-ISCSI/dhcpd.conf +1 -1
index 515922a..6eb035b 100644
@@ -15,7 +15,7 @@ subnet 192.168.50.0 netmask 255.255.255.0 {
 	# NFSv3: last octect starts at 0x00 and works up
 
 	group {
-		option root-path "iscsiroot=192.168.50.1::::test";
+		option root-path "iscsi:192.168.50.1::::iqn.2009-06.dracut:target0";
 
 		host iscsi-1 {
 			hardware ethernet 52:54:00:12:34:00;
test/TEST-30-ISCSI/test.sh +1 -1
index 134ee73..a6833bf 100755
@@ -37,7 +37,7 @@ run_client() {
   	-net nic,macaddr=52:54:00:12:34:00,model=e1000 \
   	-net socket,mcast=230.0.0.1:1234 \
   	-kernel /boot/vmlinuz-$KVERSION \
-	-append "root=LABEL=ROOT netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0 rw quiet console=ttyS0,115200n81 $DEBUGFAIL" \
+	-append "root=dhcp rw quiet console=ttyS0,115200n81 $DEBUGFAIL" \
   	-initrd initramfs.testing
     grep -m 1 -q iscsi-OK client.img || return 1
 }
Signature · 6 lines
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#15 lore raw

PATCH 8/13 manpage iSCSI update

In reply to a message not in the archive
---
 dracut.8 |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
dracut.8 +9 -1
index 5258925..0ceccff 100644
@@ -110,12 +110,20 @@ associated fields.
 
 http://tools.ietf.org/html/rfc4173
 
+If the root partition is not specified using \fBroot=\fR, one of the partitions found 
+with label \fBROOT\fR or \fB/\fR will be used to boot from.
+
 .TP
-.B root=??? iscsiroot=...
+.B root=??? netroot=iscsi:[<servername>]:[<protocol>]:[<port>]:[<LUN>]:<targetname>
+e.g. root=LABEL=ROOT netroot=root=LABEL=ROOT netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0
+
 .TP
 .B root=??? iscsi_initiator= iscsi_target_name= iscsi_target_ip= iscsi_target_port= iscsi_target_group= iscsi_username=  iscsi_password= iscsi_in_username= iscsi_in_password=
+these variables can also be put in a file in /conf/conf.d/, which will be sourced
+
 .TP
 .B root=??? iscsi_firmware
+will read the iscsi parameter from the BIOS firmware
 
 .SH NBD
 .TP
Signature · 6 lines
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#16 lore raw

PATCH 9/13 add rdblacklist command line parameter

In reply to a message not in the archive
---
 modules.d/99base/install            |    1 +
 modules.d/99base/parse-blacklist.sh |   10 ++++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
 create mode 100755 modules.d/99base/parse-blacklist.sh
modules.d/99base/install +1 -0
index 06cf6db..4bf5301 100755
@@ -14,4 +14,5 @@ else
 fi
 inst "$moddir/dracut-lib" "/lib/dracut-lib"
 inst_hook cmdline 10 "$moddir/parse-root-opts.sh"
+inst_hook cmdline 20 "$moddir/parse-blacklist.sh"
 inst_hook pre-pivot 50 "$moddir/selinux-loadpolicy.sh"
modules.d/99base/parse-blacklist.sh new file +10 -0
new file mode 100755
index 0000000..9c0a9e0
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if getarg rdblacklist= >/dev/null ; then
+    [ "$CMDLINE" ] || read CMDLINE < /proc/cmdline
+    for p in $CMDLINE; do
+        [ -n "${p%rdblacklist=*}" ] && continue
+
+        echo "blacklist ${p#rdblacklist=}" >> /etc/modprobe.d/initramfsblacklist.conf
+    done
+fi
Signature · 6 lines
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#17 lore raw

PATCH 10/13 updated switch_root.c

In reply to a message not in the archive

matches the version, which will go to util-linux-ng

---
 Makefile      |    2 +-
 switch_root.c |  232 ++++++++++++++++++++++++++++-----------------------------
 2 files changed, 115 insertions(+), 119 deletions(-)
Makefile +1 -1
index 3ec288a..f693ace 100644
@@ -9,7 +9,7 @@ sbindir = ${prefix}/sbin
 mandir = ${prefix}/share/man
 
 modules.d/99base/switch_root: switch_root.c
-	gcc -o modules.d/99base/switch_root switch_root.c	
+	gcc -D _GNU_SOURCE -D 'PACKAGE_STRING="dracut"' -std=gnu99 -fsigned-char -g -O2 -o modules.d/99base/switch_root switch_root.c	
 
 all: modules.d/99base/switch_root
 
switch_root.c +114 -118

297 lines not on this page · raw message

Signature · 6 lines
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#18 lore raw

PATCH 11/13 dracut.spec without switch_root

In reply to a message not in the archive
---
 dracut.spec |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
dracut.spec +10 -0
index fe3e2a4..83a2f54 100644
@@ -1,5 +1,6 @@
 # define gittag 2c02c831
 %define replace_mkinitrd 0
+%define with_switch_root 0
 Name: dracut
 Version: 0.1
 %if %{defined gittag}
@@ -30,6 +31,9 @@ Requires: bash
 Obsoletes: mkinitrd < 7.0
 Provides: mkinitrd = 7.0
 %endif
+%if ! 0%{?with_switch_root}
+BuildArch: noarch
+%endif
 
 %description
 dracut is a new, event-driven initramfs infrastructure based around udev.
@@ -50,6 +54,10 @@ ln -s dracut $RPM_BUILD_ROOT/sbin/mkinitrd
 ln -s dracut/dracut-functions $RPM_BUILD_ROOT/usr/libexec/initrd-functions
 %endif
 
+%if ! 0%{?with_switch_root}
+rm -f $RPM_BUILD_ROOT/sbin/switch_root
+%endif
+
 #mkdir -p $RPM_BUILD_ROOT/sbin
 #mv $RPM_BUILD_ROOT/%{_prefix}/lib/dracut/modules.d/99base/switch_root $RPM_BUILD_ROOT/sbin
 
@@ -60,7 +68,9 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(-,root,root,-)
 %doc README HACKING TODO COPYING
 /sbin/dracut
+%if 0%{?with_switch_root}
 /sbin/switch_root
+%endif
 %if 0%{?replace_mkinitrd}
 /sbin/mkinitrd
 /usr/libexec/initrd-functions
Signature · 6 lines
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#19 lore raw

PATCH 12/13 renamed dracut-lib to dracut-lib.sh

In reply to a message not in the archive
---
 modules.d/40network/dhclient-script |    2 +-
 modules.d/40network/ifup            |    2 +-
 modules.d/40network/netroot         |    2 +-
 modules.d/95iscsi/iscsiroot         |    2 +-
 modules.d/95nbd/nbdroot             |    2 +-
 modules.d/95nfs/nfsroot             |    2 +-
 modules.d/99base/dracut-lib         |   62 -----------------------------------
 modules.d/99base/dracut-lib.sh      |   55 +++++++++++++++++++++++++++++++
 modules.d/99base/init               |    2 +-
 modules.d/99base/install            |    2 +-
 10 files changed, 63 insertions(+), 70 deletions(-)
 delete mode 100644 modules.d/99base/dracut-lib
 create mode 100644 modules.d/99base/dracut-lib.sh
modules.d/40network/dhclient-script +1 -1
index f662828..5b36a40 100755
@@ -35,7 +35,7 @@ setup_interface() {
 
 PATH=$PATH:/sbin:/usr/sbin
 
-. /lib/dracut-lib
+. /lib/dracut-lib.sh
 
 if getarg rdnetdebug ; then
     exec >/tmp/dhclient.$interface.$$.out
modules.d/40network/ifup +1 -1
index 332fc21..89017bb 100755
@@ -46,7 +46,7 @@ do_static() {
 
 PATH=$PATH:/sbin:/usr/sbin
 
-. /lib/dracut-lib
+. /lib/dracut-lib.sh
 
 if getarg rdnetdebug ; then
     exec >/tmp/ifup.$1.$$.out
modules.d/40network/netroot +1 -1
index 099c9a9..f719d93 100755
@@ -2,7 +2,7 @@
 
 PATH=$PATH:/sbin:/usr/sbin
 
-. /lib/dracut-lib
+. /lib/dracut-lib.sh
 
 if getarg rdnetdebug ; then
     exec >/tmp/netroot.$1.$$.out
modules.d/95iscsi/iscsiroot +1 -1
index 783306b..c66f9d2 100755
@@ -6,7 +6,7 @@
 # iscsistart needs this.
 #
 
-. /lib/dracut-lib
+. /lib/dracut-lib.sh
 
 PATH=$PATH:/sbin:/usr/sbin
 
modules.d/95nbd/nbdroot +1 -1
index 71f6af9..90f6ef8 100755
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-. /lib/dracut-lib
+. /lib/dracut-lib.sh
 
 PATH=$PATH:/sbin:/usr/sbin
 
modules.d/95nfs/nfsroot +1 -1
index 46c2b42..6012598 100755
@@ -38,7 +38,7 @@ root_to_var() {
     fi
 }
 
-. /lib/dracut-lib
+. /lib/dracut-lib.sh
 
 PATH=$PATH:/sbin:/usr/sbin
 
modules.d/99base/dracut-lib deleted +0 -62

62 lines not on this page · raw message

modules.d/99base/dracut-lib.sh new file +55 -0

55 lines not on this page · raw message

modules.d/99base/init +1 -1
index 5ce28a0..113b130 100755
@@ -20,7 +20,7 @@ NEWROOT="/sysroot"
 
 trap "emergency_shell" 0
 
-. /lib/dracut-lib
+. /lib/dracut-lib.sh
 
 mknod /dev/null c 1 3
 
modules.d/99base/install +1 -1
index 4bf5301..01ad771 100755
@@ -12,7 +12,7 @@ if which switch_root >/dev/null 2>&1; then
 else
     inst "$moddir/switch_root" "/sbin/switch_root"
 fi
-inst "$moddir/dracut-lib" "/lib/dracut-lib"
+inst "$moddir/dracut-lib.sh" "/lib/dracut-lib.sh"
 inst_hook cmdline 10 "$moddir/parse-root-opts.sh"
 inst_hook cmdline 20 "$moddir/parse-blacklist.sh"
 inst_hook pre-pivot 50 "$moddir/selinux-loadpolicy.sh"
Signature · 6 lines
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#20 lore raw

PATCH 13/13 removed shebang from .sh and changed mode to 0644

In reply to a message not in the archive
---
 modules.d/50plymouth/plymouth-emergency.sh |    1 -
 modules.d/90dmraid/dmraid.sh               |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)
 mode change 100755 => 100644 modules.d/95resume/resume-genrules.sh
 mode change 100755 => 100644 modules.d/95rootfs-block/block-genrules.sh
 mode change 100755 => 100644 modules.d/95rootfs-block/parse-block.sh
 mode change 100755 => 100644 modules.d/99base/parse-root-opts.sh
modules.d/50plymouth/plymouth-emergency.sh +0 -1
index e8b642d..3119330 100644
@@ -1,2 +1 @@
-#!/sbin/sh
 [ -x /bin/plymouth ] && /bin/plymouth --hide-splash
modules.d/90dmraid/dmraid.sh +0 -1
index 17a92fb..c64d686 100644
@@ -1,4 +1,3 @@
-#!/bin/sh
 dmraid -ay
 udevadm settle --timeout=30 >/dev/null 2>&1 
 
modules.d/95resume/resume-genrules.sh +0 -0
old mode 100755
new mode 100644
modules.d/95rootfs-block/block-genrules.sh +0 -0
old mode 100755
new mode 100644
modules.d/95rootfs-block/parse-block.sh +0 -0
old mode 100755
new mode 100644
modules.d/99base/parse-root-opts.sh +0 -0
old mode 100755
new mode 100644
Signature · 6 lines
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#14 lore raw

Re: [PATCH 07/13] make iSCSI boot with root=dhcp and mount partitions labeled with "ROOT" or "/"

In reply to a message not in the archive
Quoted 6 lines · Harald Hoyer
modules.d/99base/install +0 -0
index 68d40fb..06cf6db 100755
@@ -7,9 +7,8 @@ fi
  # install our scripts and hooks

modules.d/99base/install fi · line 14

Quoted 10 lines
modules.d/99base/install +2 -3
  inst "$moddir/init" "/init"
  # Bail out if switch_root does not exist
-if [ ! -x "$moddir/switch_root" ]; then
-    # assume it is installed in the standard path
-    dracut_install switch_root
+if which switch_root>/dev/null 2>&1; then
+    dracut_install switch_root
  else
      inst "$moddir/switch_root" "/sbin/switch_root"
  fi

Hmpf.. that should have been a seperate patch
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#10 lore raw

Re: [PATCH 05/13] prepare udev rules for udev >= 143

In reply to a message not in the archive
Quoted 5 lines · Jeremy Katz

Note that this isn't "prepare" as much as "require udev>= 143 and util-linux-ng>= 2.15". Which means only working with the devel trees of every distro afaict.

Jeremy

not true... it will work with old versions as well, because it will install the old rules for that. --
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html