Add support for NFS root file system.
Patch by Rickard Nilsson. svn path=/nixos/trunk/; revision=29855
This commit is contained in:
parent
5164ca570f
commit
38bc39c299
@ -221,8 +221,10 @@ mountFS() {
|
|||||||
# For CIFS mounts, retry a few times before giving up.
|
# For CIFS mounts, retry a few times before giving up.
|
||||||
local n=0
|
local n=0
|
||||||
while true; do
|
while true; do
|
||||||
if mount -t "$fsType" -o "$options" "$device" /mnt-root$mountPoint; then
|
if [ "$fsType" = "nfs" ]; then
|
||||||
break
|
nfsmount "$device" "/mnt-root$mountPoint" && break
|
||||||
|
else
|
||||||
|
mount -t "$fsType" -o "$options" "$device" "/mnt-root$mountPoint" && break
|
||||||
fi
|
fi
|
||||||
if [ "$fsType" != cifs -o "$n" -ge 10 ]; then fail; break; fi
|
if [ "$fsType" != cifs -o "$n" -ge 10 ]; then fail; break; fi
|
||||||
echo "retrying..."
|
echo "retrying..."
|
||||||
|
@ -169,6 +169,11 @@ let
|
|||||||
cp ${kernelPackages.splashutils}/${kernelPackages.splashutils.helperName} $out/bin/splash_helper
|
cp ${kernelPackages.splashutils}/${kernelPackages.splashutils.helperName} $out/bin/splash_helper
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
# Copy nfsmount if there is any NFS mounts required for boot.
|
||||||
|
${optionalString (filter (fs: fs.fsType == "nfs" && (fs.mountPoint == "/" || fs.neededForBoot)) fileSystems != []) ''
|
||||||
|
cp -v ${pkgs.klibc}/lib/klibc/bin.static/nfsmount $out/bin
|
||||||
|
''}
|
||||||
|
|
||||||
${config.boot.initrd.extraUtilsCommands}
|
${config.boot.initrd.extraUtilsCommands}
|
||||||
|
|
||||||
# Run patchelf to make the programs refer to the copied libraries.
|
# Run patchelf to make the programs refer to the copied libraries.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user