Had a bit of fun getting this running with my existing PXE setup. I wanted a non standard disk layout for Proxmox.
The Debian PXE way (stupidly) assumes it is the only distro in town so making it work with a tftp setup with multiple distros is a touch more tricky.
I assume you have a working tftp setup.
I store my image files in:
/tftpboot/images/somedirectory
I have the following directories in my tftpboot directory:
com32 > contains vesamenu.c32 etc
graphics > contains background images
images > contains directories for each distro
pxelinux.cfg > contains config files
pxelinux.0 is in the root tftpboot directory
To make Debian boot we have to amend a whole pile of paths.... tftpd is
very dumb so you have to be pretty specific about where stuff is stored.
First I extracted the relevant Debian boot files from netboot.tar.gz to
/tftpboot/images/debian
In my 'default' tftpd config file I have several menu choices leading off to other menus and configs. I first added a link to the Debian installer menu.
cat /tftpboot/pxelinux.cfg/default
# header stuff
label Debian Netinstall
menu label ^Debian Netinstall
kernel com32/vesamenu.c32
append pxelinux.cfg/debian
I then added a 'debian' config file containing the following:
cat /tftpboot/pxelinux.cfg/debian
# D-I config version 1.0
include images/debian/debian-installer/amd64/boot-screens/menu.cfg
default images/debian/debian-installer/amd64/boot-screens/vesamenu.c32
prompt 0
timeout 0
Now you have to adjust paths/directories in the debian config files.
In my case here : /tftpboot/images/debian/debian-installer/amd64/boot-screens
grep -r -l debian-installer * | xargs sed -i "s|debian-installer|images/debian/debian-installer|g"
One last issue is the possible lack of firmware for your hardware.
I fixed this by doing the following:
# cd to the directory where you have your initrd
cd /tftpboot/debian-installer/amd64
[ -f initrd.gz.orig ] || cp -p initrd.gz initrd.gz.orig
[ -f firmware.cpio.gz ] || wget http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/stable/current/firmware.cpio.gz
cat initrd.gz.orig firmware.cpio.gz > initrd.gz
Hopefully you can now PXE boot and get your Debian installed
No comments:
Post a Comment