Skip to content

Instantly share code, notes, and snippets.

@uebayasi
Last active September 7, 2016 10:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uebayasi/806d3c0dd014f67b47f1ec774b95dcac to your computer and use it in GitHub Desktop.
Save uebayasi/806d3c0dd014f67b47f1ec774b95dcac to your computer and use it in GitHub Desktop.
Ubuntu PXE + NFS root

Summary

  • Not difficult but documentation inaccurate

Overview

  • Build PXE + NFS root environment for development
    • KVM
    • Serial console
  • Basically [1] but tweaks needed
    • tftp
      • Ubuntu's default tftp directory is located at /var/lib/tftpboot instead of /tftpboot
    • pxelinux.cfg
      • /tftpboot/pxelinux.cfg/default should have a DEFAULT line point to a LABEL name
      • See below
    • XXX More?

Appendix

pxelinux.cfg

Example in [1] doesn't have a DEFAULT line. A workable example looks like:

DEFAULT multi
LABEL multi
 KERNEL vmlinuz-4.4.0-36-generic
 APPEND root=/dev/nfs initrd=initrd.img-4.4.0-36-generic nfsroot=192.168.128.1:/home/uebayasi/debootstrap ip=dhcp rw console=ttyS0,115200
LABEL single
 KERNEL vmlinuz-4.4.0-36-generic
 APPEND root=/dev/nfs initrd=initrd.img-4.4.0-36-generic nfsroot=192.168.128.1:/home/uebayasi/debootstrap ip=dhcp rw console=ttyS0,115200 init=/bin/bash

References

  1. https://help.ubuntu.com/community/DisklessUbuntuHowto#Creating_your_NFS_installation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment