NetworkManager, PXE, TFTP and Debian Installer

When you have a laptop that you want to install Debian on and an Ethernet cable, but don't have a USB stick or CD-RW, etc...

In nm-connection-editor, edit the wired connection. Set Method to "Shared to other computers". By itself, this causes NetworkManager to fire up a dnsmasq process that will provide a DHCP server and a DNS proxy.

Now we need to enable dnsmasq's TFTP server and set a DHCP option to give the client the name of the file to retrieve from the server. Fortunately, NetworkManager thoughtfully launches dnsmasq with a useful option:

/usr/sbin/dnsmasq [...] --conf-dir=/etc/NetworkManager/dnsmasq-shared.d

All we need to do is create /etc/NetworkManager/dnsmasq-shared.d/d-i:

dhcp-boot=pxelinux.0
enable-tftp
tftp-root=/tmp/tftp

(... and bring the wired connection down and up again).

Now we head to https://www.debian.org/devel/debian-installer/ and hit the amd64 link under "other images". This takes us off to a mirror with a directory listing. We go to the netboot directory and grab netboot.tar.gz. Unpacking that within /tmp/tftp should be all we need!

Alternatively it seems I could have just installed debian-installer-10-netboot-amd64 and pointed dnsmasq at /usr/lib/debian-installer/images/10/amd64/text. ¯\_(ツ)_/¯


CategoryTechnote

robots.org.uk: NetworkManagerPXETFTPDebianInstaller (last edited 2019-03-09 17:07:23 by sam)

© Sam Morris <sam@robots.org.uk>.
Content may be distributed and modified providing this notice is preserved.