Skip to content

xserveraws/debian-preseed

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

debian-preseed

Debian Buster preseed file and related configs for automatic installation over UEFI PXE from MacBook to NUC.

Links:

Steps:

prepare TFTP directory

download and extract netboot installer

http://ftp.debian.org/debian/dists/buster/main/installer-amd64/current/images/netboot/netboot.tar.gz

copy grubx64.efi to the top of TFTP root

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 ./

change debian-installer/amd64/grub/grub.cfg

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

set static IP for ethernet interface

Configure IPv4: Manually
Ip Adderss 192.168.2.1
Subnet Mask 255.255.255.0

configure dnsmasq (DHCP + TFTP)

install dnsmasq

brew install dnsmasq

change /usr/local/etc/dnsmasq.conf

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

start dnsmasq

sudo /usr/local/opt/dnsmasq/sbin/dnsmasq --keep-in-foreground -C /usr/local/etc/dnsmasq.conf

setup NAT for sharing internet

https://www.xarg.org/2017/07/set-up-internet-sharing-on-mac-osx-using-command-line-tools/

add to /etc/pf.conf:

# en0 iface name with internet access
nat on en0 from 192.168.2.0/24 to any -> (en0)

enable IP forwarding

# Enable IP forwarding: 
sudo sysctl -w net.inet.ip.forwarding=1

start pfctl

# Disable PF if it was enabled before
sudo pfctl -d

# Enable PF and load the config
sudo pfctl -e -f /etc/pf.conf

create and serve preseed.txt

create preseed.txt

Create your own preseed.txt based on official preseed-example.txt

install and run http-server

npm install -g http-server or brew install http-server

sudo http-server -p 80 .

Tested environment:

  • target machinie NUC 6CAYH
  • installation server MacBook 16 (macOS 10.15.5)

About

Debian preseed file and related configs for automatic installation over UEFI PXE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Shell 100.0%