Debian Buster preseed file and related configs for automatic installation over UEFI PXE from MacBook to NUC.
- https://www.debian.org/releases/buster/amd64/index.en.html
- https://www.debian.org/releases/buster/example-preseed.txt
- prepare TFTP directory
- set static IP for ethernet interface
- configure dnsmasq (DHCP + TFTP)
- setup NAT for sharing internet
- create and serve
preseed.txt - start installation
http://ftp.debian.org/debian/dists/buster/main/installer-amd64/current/images/netboot/netboot.tar.gz
for some reason installer will try to load grubx64.efi from the TFTP root and will fail if it's not there
cp debian-installer/amd64/grubx64.efi ./menuentry 'INSTALL' {
set background_color=black
# URL TO PRESEED FILE:
linux /debian-installer/amd64/linux url=http://192.168.2.1/preseed.txt auto=true priority=critical vga=788 --- quiet
initrd /debian-installer/amd64/initrd.gz
}
# AUTO SELECT MENU OPTION:
default=INSTALL
timeout=0
Configure IPv4: Manually
Ip Adderss 192.168.2.1
Subnet Mask 255.255.255.0
brew install dnsmasq
log-queries
log-dhcp
# log to stdout
log-facility=-
# change to your ethernet interface name
# which you can find in `ifconfig` output
interface=en8
dhcp-range=192.168.2.100,192.168.2.150,255.255.255.0,1h
dhcp-boot=/debian-installer/amd64/bootnetx64.efi
enable-tftp
# change to your absolute path to TFTP dir
tftp-root=/Users/pesto/netboot
sudo /usr/local/opt/dnsmasq/sbin/dnsmasq --keep-in-foreground -C /usr/local/etc/dnsmasq.confhttps://www.xarg.org/2017/07/set-up-internet-sharing-on-mac-osx-using-command-line-tools/
# en0 iface name with internet access
nat on en0 from 192.168.2.0/24 to any -> (en0)
# Enable IP forwarding:
sudo sysctl -w net.inet.ip.forwarding=1# Disable PF if it was enabled before
sudo pfctl -d
# Enable PF and load the config
sudo pfctl -e -f /etc/pf.confCreate your own preseed.txt based on official preseed-example.txt
-
check documentation explanations for some options https://www.debian.org/releases/buster/amd64/apbs04.en.html
-
see the diff of my preseed.txt with the preseed-example.txt to get some ideas
-
include
d-i partman-efi/non_efi_system boolean trueto bypass Force UEFI installation screen -
include
d-i preseed/late_command string in-target wget --output-document=/tmp/postinstall.sh http://192.168.2.1/postinstall.sh; in-target /bin/sh /tmp/postinstall.shto download and runpostinstall.sh
npm install -g http-server or brew install http-server
sudo http-server -p 80 .
- target machinie
NUC 6CAYH - installation server
MacBook 16 (macOS 10.15.5)