PXE-Debian-Netinstall

 

 

 

sudo su
mkdir /sharedfolders/appdata/tftpboot
cd /sharedfolders/appdata/tftpboot
wget http://ftp.debian.org/debian/dists/stretch/main/installer-amd64/current/images/netboot/netboot.tar.gz
tar xzvf netboot.tar.gz
chown nobody:nogroup -R .

 

cd
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -o eth0 -i eth1 -s 192.168.252.0/24 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE
service dnsmasq restart
mkdir /tmp/initrd
cd /tmp/initrd
cd /tmp/initrd
cat /sharedfolders/appdata/tftpboot/debian-installer/amd64/initrd.gz | gzip -d | cpio -i
cp /tmp/initrd/preseed.cfg .
find | cpio -o --format=newc | gzip -9c > ../initrd.gz
cp ../initrd.gz /sharedfolders/appdata/tftpboot/debian-installer/amd64/
nano /sharedfolders/appdata/tftpboot/debian-installer/amd64/boot-screens/syslinux.cfg

# D-I config version 2.0
include debian-installer/amd64/boot-screens/menu.cfgdefault debian-installer/amd64/boot-screens/vesamenu.c32
prompt 0
timeout 0
DEFAULT stretch
 LABEL stretch
        kernel debian-installer/amd64/linux
        append vga=normal initrd=debian-installer/amd64/initrd.gz auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical preseed/file=/preseed.cfg IPAPPEND 2

Die pxelinux/default noch anpassen.

 

Erstelle deine Website mit WordPress.com
Jetzt starten