Installing Ubuntu onto a NFS mount

‹ Booting Ubuntu from a network filesystem | Light Vader ›

It is possible to install Ubuntu onto a NFS networked filesystem directory, which you might want to do in order to boot that copy of Ubuntu over the network on a diskless thin client computer.

Set up the base filesystem:

  • sudo debootstrap --arch i386 trusty /path/to/your/nfs/mount
  • echo yourhostname | sudo tee /path/to/your/nfs/mount/etc/hostname
  • Insert the following contents into /path/to/your/nfs/mount/etc/fstab
    /proc /proc proc defaults 0 0
    /sys /sys sysfs defaults 0 0
    /dev/fd0 /mnt/floppy auto user,noauto,sync,exec,umask=000 0 0
    /dev/cdrom /mnt/cdrom auto user,noauto,exec,ro 0 0
  • sudo chroot /path/to/your/nfs/mount bash -l
    mount /proc
  • Set your root password:
  • Edit /etc/network/interfaces.d/eth0 and insert:
    auto eth0
    iface eth0 inet dhcp

To build a new kernel which understands how to boot its root filesystem over NFS:

  • Edit /etc/initramfs-tools/initramfs.conf
    and set:
  • apt-get install linux-generic
  • update-initramfs -k all -c
  • umount /proc
  • Exit the chroot:

Preventing NetworkManager from trying to disconnect networking

  • Add this to /etc/NetworkManager/NetworkManager.conf


Subscribe to All Posts - Wesley Tanaka