summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorSimon Boulay <simon.boulay@gmail.com>2010-02-08 19:44:53 +0100
committerThomas Bächler <thomas@archlinux.org>2010-02-09 20:28:05 +0100
commit82e9837b9661ead8f78023ef645c7b6679786739 (patch)
tree56e34875aab4ee172ec18c55b56e17402f9309b6 /init
parent7d99fdb862b10e9019e5be78ad7afb6c1ae7f8c0 (diff)
downloadmkinitcpio-82e9837b9661ead8f78023ef645c7b6679786739.tar.gz
mkinitcpio-82e9837b9661ead8f78023ef645c7b6679786739.tar.xz
Add support for mounting root filesystem over NFS.
Diffstat (limited to 'init')
-rw-r--r--init11
1 files changed, 9 insertions, 2 deletions
diff --git a/init b/init
index 88cefc1..05ec3d5 100644
--- a/init
+++ b/init
@@ -160,8 +160,15 @@ if [ -z "${nfsroot}" -a "${root}" != "/dev/nfs" ]; then
fi
mount ${fstype:+-t ${fstype}} -o ro${rootflags:+,${rootflags}} "${root}" /new_root
else
- # TODO: Actually implement this
- err "Mounting NFS root is not implemented yet."
+ if [ -z "$nfs_server" -o -z "$nfs_path" ]; then
+ err "Unable to mount root filesystem over NFS: wrong parameters."
+ echo "You are being dropped to a recovery shell"
+ echo " Type 'reboot' to reboot"
+ echo " Type 'exit' to try and continue booting"
+ launch_interactive_shell
+ msg "Trying to continue (this will most likely fail) ..."
+ fi
+ nfsmount ${nfs_option:+-o ${nfs_option}} "${nfs_server}:${nfs_path}" /new_root
fi
umount /proc
umount /sys