From 82e9837b9661ead8f78023ef645c7b6679786739 Mon Sep 17 00:00:00 2001 From: Simon Boulay Date: Mon, 8 Feb 2010 19:44:53 +0100 Subject: Add support for mounting root filesystem over NFS. --- init | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'init') 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 -- cgit v1.2.3-24-g4f1b