95iscsi: fix "root=iscsi:...." case

install udev rules and wait for /dev/root
master
Harald Hoyer 2012-02-16 11:34:37 +01:00
parent 86de902e35
commit 2a3faa2df9
2 changed files with 4 additions and 1 deletions

View File

@ -46,6 +46,7 @@ if getargbool 0 rd.iscsi.firmware -y iscsi_firmware ; then
if [ -n "${root%%block:*}" ]; then if [ -n "${root%%block:*}" ]; then
# if root is not specified try to mount the whole iSCSI LUN # if root is not specified try to mount the whole iSCSI LUN
printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules
udevadm control --reload
fi fi
iscsistart -b iscsistart -b
exit 0 exit 0

View File

@ -28,9 +28,11 @@
if [ "${root%%:*}" = "iscsi" ] ; then if [ "${root%%:*}" = "iscsi" ] ; then
if [ -n "$netroot" ] ; then if [ -n "$netroot" ] ; then
echo "Warning: root takes precedence over netroot. Ignoring netroot" echo "Warning: root takes precedence over netroot. Ignoring netroot"

fi fi
netroot=$root netroot=$root
# if root is not specified try to mount the whole iSCSI LUN
printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules
root=/dev/root
fi fi


# If it's not empty or iscsi we don't continue # If it's not empty or iscsi we don't continue