Use busybox mount instead of klibc nfsmount for nfs mounts in initrd.
This commit is contained in:
parent
d13a3c741a
commit
e33dfa936f
@ -266,11 +266,7 @@ 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 [ "$fsType" = "nfs" ]; then
|
|
||||||
nfsmount "$device" "/mnt-root$mountPoint" && break
|
|
||||||
else
|
|
||||||
mount "/mnt-root$mountPoint" && break
|
mount "/mnt-root$mountPoint" && break
|
||||||
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..."
|
||||||
n=$((n + 1))
|
n=$((n + 1))
|
||||||
|
@ -40,12 +40,6 @@ in
|
|||||||
|
|
||||||
boot.initrd.kernelModules = mkIf inInitrd [ "nfs" ];
|
boot.initrd.kernelModules = mkIf inInitrd [ "nfs" ];
|
||||||
|
|
||||||
boot.initrd.extraUtilsCommands = mkIf inInitrd
|
|
||||||
''
|
|
||||||
# !!! Uh, why don't we just install mount.nfs?
|
|
||||||
cp -v ${pkgs.klibc}/lib/klibc/bin.static/nfsmount $out/bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Ensure that statd and idmapd are started before mountall.
|
# Ensure that statd and idmapd are started before mountall.
|
||||||
jobs.mountall.preStart =
|
jobs.mountall.preStart =
|
||||||
''
|
''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user