PXE netboot

Via PXE / netboot, you can boot and install systems over network. Just switch the bios to PXE netboot.

You need dnsmasq, it includes a tftpd server, which serves the boot images.

dnsmasq config

Example config:



dnsmasq includes a tftp server, you just need to serve the pxe boot files from there. For debian, you can use:


this includes the bootmenu and is started, as soon as the client boots via pxe/tftp. put your matching config here.

# the debian installer. this is included in netboot.tar.gz
path debian-installer/amd64/boot-screens/
include debian-installer/amd64/boot-screens/menu.cfg
default debian-installer/amd64/boot-screens/vesamenu.c32
prompt 0
timeout 0
# another entry for debian live - run without installing:
LABEL Debian LiveCD
KERNEL ::/debianlive/live/vmlinuz
# an automated installer, which downloads a preseed file:
label Install Automat
kernel debian-installer/amd64/linux
append vga=normal initrd=debian-installer/amd64/initrd.gz netcfg/choose_interface=eth0 domain=mynet keyboard-configuration/xkb-keymap=de locale=en_US.UTF-8 debian-installer/country=DE debian-installer/language=en debian-installer/keymap=de console-keymaps-at/keymap=de auto-install/enable=false preseed/url= DEBCONF_DEBUG=5 -- quiet


You can automate the debian installer, so all questions get answered automagically, including formatting, network, software, everything :)

Add a download url for the preseed file to the bootmenu in pxelinux.cfg/default. This can be served via nfs or web. Some things (like keyboard language) must be set in the 'append' line of the bootmenu - see above.

If you preseed hangs and asks questions, you can switch to console 2 to see, what is going on.

Complete pressed.cfg example:


postinstall script

Some things are hard to preseed, so you run a script after the installer competes, inside the new system.

Download the script and run it, with a similar command in the preseed file:

d-i preseed/late_command string in-target wget -P /tmp/; in-target chmod +x /tmp/postinst.sh; in-target /tmp/postinst.sh

Complete postinstall script example: postinst_demo.txt

Back to top
linux/debian_install/pxe_netboot.txt · Last modified: 2016/12/04 11:36 by tkilla