[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cannot mount NFS share in preseed/late_command ("Protocol not supported")



On 09/22/2016 09:37 PM, Frank Thommen wrote:
Hi,

in the last step of a preseeded installation I want to mount an NFS
share and then finally run a configuration script which requires files
stored on this share.  My last step in the preseed file currently looks
like:

d-i preseed/late_command string in-target modprobe nfs; in-target mount
-v -o ro,nolock our.nfs.server:/export/d-i /mnt


However this command fails with the following entries in
/var/log/installer/syslog:

[...]
Sep 22 19:23:40 finish-install: info: Running
/usr/lib/finish-install.d/07preseed
Sep 22 19:23:40 debconf: --> GET preseed/late_command
Sep 22 19:23:40 debconf: <-- 0 in-target modprobe nfs; in-target mount
-v -o ro,nolock our.nfs.server:/export/d-i /mnt
Sep 22 19:23:40 preseed: running preseed command preseed/late_command:
in-target modprobe nfs; in-target mount -v -o ro,nolock
our.nfs.server:/export/d-i /mnt
Sep 22 19:23:40 debconf: --> GET mirror/protocol
Sep 22 19:23:40 debconf: <-- 0 http
Sep 22 19:23:40 debconf: --> GET mirror/http/proxy
Sep 22 19:23:40 debconf: <-- 0
Sep 22 19:23:40 debconf: --> GET debconf/priority
Sep 22 19:23:40 debconf: <-- 0 critical
Sep 22 19:23:40 debconf: --> GET debian-installer/locale
Sep 22 19:23:40 debconf: <-- 0 en_US.UTF-8
Sep 22 19:23:40 kernel: [  743.218772] FS-Cache: Loaded
Sep 22 19:23:40 kernel: [  743.220289] RPC: Registered named UNIX socket
transport module.
Sep 22 19:23:40 kernel: [  743.220291] RPC: Registered udp transport
module.
Sep 22 19:23:40 kernel: [  743.220291] RPC: Registered tcp transport
module.
Sep 22 19:23:40 kernel: [  743.220292] RPC: Registered tcp NFSv4.1
backchannel transport module.
Sep 22 19:23:40 kernel: [  743.221834] FS-Cache: Netfs 'nfs' registered
for caching
Sep 22 19:23:41 debconf: --> GET mirror/protocol
Sep 22 19:23:41 debconf: <-- 0 http
Sep 22 19:23:41 debconf: --> GET mirror/http/proxy
Sep 22 19:23:41 debconf: <-- 0
Sep 22 19:23:41 debconf: --> GET debconf/priority
Sep 22 19:23:41 debconf: <-- 0 critical
Sep 22 19:23:41 debconf: --> GET debian-installer/locale
Sep 22 19:23:41 debconf: <-- 0 en_US.UTF-8
Sep 22 19:23:41 in-target: mount.nfs: mount(2): Protocol not supported
Sep 22 19:23:41 in-target: mount.nfs: trying xxx.xxx.xxx.xxx prog 100003
vers 3 prot TCP port 2049
Sep 22 19:23:41 in-target: mount.nfs: trying xxx.xxx.xxx.xxx prog 100005
vers 3 prot UDP port 54750
Sep 22 19:23:41 in-target: mount.nfs: mount(2): Protocol not supported
Sep 22 19:23:41 in-target: mount.nfs: Protocol not supported
Sep 22 19:23:41 in-target: mount.nfs: timeout set for Thu Sep 22
15:25:41 2016
Sep 22 19:23:41 in-target: mount.nfs: trying text-based options
'nolock,vers=4,addr=xxx.xxx.xxx.xxx,clientaddr=xxx.xxx.xxx.xxx'
Sep 22 19:23:41 in-target: mount.nfs: trying text-based options
'nolock,addr=xxx.xxx.xxx.xxx'
Sep 22 19:23:41 in-target: mount.nfs: prog 100003, trying vers=3, prot=6
Sep 22 19:23:41 in-target: mount.nfs: prog 100005, trying vers=3, prot=17
Sep 22 19:23:41 debconf: --> SUBST preseed/command_failed COMMAND
in-target modprobe nfs; in-target mount -v -o ro,nolock
our.nfs.server:/export/d-i /mnt
Sep 22 19:23:41 debconf: Adding [COMMAND] -> [in-target modprobe nfs;
in-target mount -v -o ro,nolock our.nfs.server:/export/d-i /mnt]
Sep 22 19:23:41 debconf: <-- 0
Sep 22 19:23:41 debconf: --> SUBST preseed/command_failed CODE 32
Sep 22 19:23:41 debconf: Adding [CODE] -> [32]
Sep 22 19:23:41 debconf: <-- 0
Sep 22 19:23:41 debconf: --> INPUT critical preseed/command_failed
Sep 22 19:23:41 debconf: <-- 0 question will be asked
[...]


I have also tried with nfsv4 in various ways to no avail.  The package
nfs-commons is installed.

Mounting after reboot works fine.

What is the correct way to mount an NFS share within preseed/late_command?

Any hint is highly appreciated.

Cheers
frank


I've worked around the issue by packing the complete setup in a downloadable archive. However I still wonder, why NFS mounting doesn't work from the installer environment. I would assume that it /should/ work.

Cheers
frank


Reply to: