1

I am installing Debian 7.5 using a preseed. I am using the linux and initrd.gz supplied by Debain 7.5 for PXE booting. I have gotten the entire system to the point where I can install the OS completely automatically. I want the installer to finish with running a script, which is where I have a problem.

I get the preseed to successfully call the script using the late_command setting:

d-i preseed/late_command \
  in-target wget -nv -0 /root/myscript.sh http://pxeserver/myscript.sh ; \
  in-target chmod +x /root/myscript.sh ; \
  in-target /root/myscript.sh

A minimal version of myscript.sh looks something like this:

#!/bin/bash
mkdir /installfiles
mount pxeserver:/installfiles /installfiles
# Run lots of scripts from /installfiles

Alas, the mounting fails with the error: mount.nfs: No such device

I have tried the following things:

  • apt-get install nfs-common: to make sure that nfs is actually installed. It already is.
  • which mount.fs: to make sure that the mounter actually existed. It did.

I am able to mount with NFS once the system reboots, so I know it has something to do with the state of the system during installation. This script runs without problem as a post-installation script of our Red Hat machines using Kickstart.

drhagen
  • 201
  • 2
  • 8

1 Answers1

3

Even though NFS is installed in the target machine. It is not installed in the kernel actually doing the installation, which is the one that will have to do the actual mounting at this stage. Therefore, you need to add NFS to the running kernel with the following command before trying to mount with NFS:

modprode nfs
drhagen
  • 201
  • 2
  • 8