[Infrastructures] Installation using PXEboot but not booting system with DHCP
Thomas Lange
lange@informatik.uni-koeln.de
Wed, 29 Jun 2005 23:25:48 +0200
>>>>> On Wed, 29 Jun 2005 23:15:11 +0200, Ivan Popov <pin@konvalo.org> said:
> 1. Set up BIOS to always boot from the net.
> 2. Set up a default pxelinux config file that always boots from the local disk.
> 3. Set up a trivial inetd-based service which unlink()s a file
> in /tftpboot/pxelinux.cfg/XXXXXXXX
> where XXXXXXXX is the hexadecimal representation of the ip number
> which connects to the service, like
That exactly what I'm doing in FAI.
> -----------------------------
> #define PREFIX "/tftpboot/pxelinux.cfg/"
> ...
> getpeername(0, (struct sockaddr *) &addr, &len)
> ...
> snprintf(name+sizeof(PREFIX)-1, 9, "%08X", ntohl(*(uint32_t *)(&(addr.sin_addr))))
My fai-chboot script (GPL, written in perl) does the same but much
more.
You can say following
[/home/lange]# fai-chboot -Iv demohost
append parameters: ip=dhcp devfs=nomount FAI_ACTION=install
Booting kernel vmlinuz-install
rootfs is /dev/nfs
demohost has 192.168.1.12 in hex C0A8010C
Writing file /boot/fai/pxelinux.cfg/C0A8010C for demohost
FAI_ACTION is FAI specific but the rest will also work in other
environments.
The script fai-chboot is availabe in the tarbal of fai at
http://www.informatik.uni-koeln.de/fai/download
--
best regards Thomas