# 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 \
# 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
# 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;
-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
}