Skip to content

Commit

Permalink
Get iscsi boot working (issue 13)
Browse files Browse the repository at this point in the history
  • Loading branch information
garlick committed Aug 21, 2014
1 parent 0f50063 commit d099749
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
4 changes: 4 additions & 0 deletions dracut/installkernel
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ instmods scsi_wait_scan

# When booting from a block device, we need a local file system like ext4
instmods ext4

# iscsi requires scsi_mod
# We don't include 'kernel-modules' so pull it in here.
instmods sd_mod
2 changes: 1 addition & 1 deletion dracut/xnfsroot.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dracutmodules="nbd nfs network base xnfsroot"
dracutmodules="iscsi nbd nfs network base xnfsroot"
2 changes: 1 addition & 1 deletion rc/rc.nfsroot
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fi
if ! touch / 2>/dev/null; then
mount -oremount,rw / 2>/dev/null
if touch / 2>/dev/null; then
panic "NFS root file system is mounted ro but exported rw"
panic "root file system is mounted ro but exported rw"
fi
fi

Expand Down
13 changes: 12 additions & 1 deletion rc/rc.nfsroot-zram
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,22 @@ if [ -f $configfile ]; then
fi
prog=rc.nfsroot-zram

find_root_dev () {
local a b c

while read a b c; do
if [ $b = "/" -a $a != "rootfs" ]; then
echo $a
break
fi
done </proc/mounts
}

if touch / 2>/dev/null; then
echo "${prog}: root file system is read-write" >&2
return 1
fi
ROOTDEV=$(readlink /dev/root)
ROOTDEV=$(find_root_dev)
if [ -z "$ROOTDEV" -o ! -b "$ROOTDEV" ]; then
echo "${prog}: root file system is not on a block device" >&2
return 1
Expand Down

0 comments on commit d099749

Please sign in to comment.