summaryrefslogtreecommitdiff
path: root/modules.d/95iscsi/iscsiroot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'modules.d/95iscsi/iscsiroot.sh')
-rwxr-xr-xmodules.d/95iscsi/iscsiroot.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
index 20738cfd..463fa458 100755
--- a/modules.d/95iscsi/iscsiroot.sh
+++ b/modules.d/95iscsi/iscsiroot.sh
@@ -10,6 +10,7 @@
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
type parse_iscsi_root >/dev/null 2>&1 || . /lib/net-lib.sh
+type write_fs_tab >/dev/null 2>&1 || . /lib/fs-lib.sh
PATH=/usr/sbin:/usr/bin:/sbin:/bin
@@ -43,6 +44,8 @@ if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
# 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
udevadm control --reload
+ write_fs_tab /dev/root
+ wait_for_dev /dev/root
fi
for p in $(getargs rd.iscsi.param -d iscsi_param); do
@@ -136,6 +139,8 @@ handle_netroot()
# if root is not specified try to mount the whole iSCSI LUN
printf 'SYMLINK=="disk/by-path/*-iscsi-*-%s", SYMLINK+="root"\n' $iscsi_lun >> /etc/udev/rules.d/99-iscsi-root.rules
udevadm control --reload
+ write_fs_tab /dev/root
+ wait_for_dev /dev/root
# install mount script
echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh