[syslinux] Can this be done with PXELinux?
florin at cpi.ro
Mon Mar 13 04:51:43 PST 2006
On Sunday 12 March 2006 01:05 am, Kenneth Vandbæk wrote:
> This is what I like to be able to do.
> 1. Computer boot on LAN, using PXELinux.
> 2. If the computer is booting for the first time it sends MAC adr, RAM,
> size of harddrive and name of videocard to a shared folder on a computer,
> maybe a server, that is attached to the network.
> 3. If this is not the first time it scan for a new task, could be a new
> ghostimage or an unattended installation of a OS, if there isn't a new task
> it boot from harddrive.
> Can this be done with PXELinux?
> Feel free to ask for more questions if you don't understand the senario.
> I'm new in this, so sorry for my poor knowledge.
Use pxelinux file selection mechanism:
from doc http://syslinux.zytor.com/pxe.php#config
> ... If that file is not found, it will remove one hex digit and try again.
Ultimately, it will try looking for a file named default (in lower case). As
an example, if the boot file name is /mybootdir/pxelinux.0, the Ethernet MAC
address is 88:99:AA:BB:CC:DD and the IP address 192.0.2.91, it will try:
> ... in that order.
If is an old PC some of config file is used excepting default
if is first time booting it is unknown MAC to dhcp server , give it an
dynamic IP address outside known hosts IP range and it will use default
I use IP from 10.0.1.0 to 10.0.100.255 for known hosts
and "range 10.10.0.10 10.10.0.255;" for unknown hosts in dhcpd.conf
This will lead to /tftpboot/pxelinux.cfg/default config file which points to:
1. linux + initrd doing whatever you want (auto appending itself to
dhcpd.conf , DNS, pxelinux.cfg etc.)
halt.com which shutdowns the PC (put halt.com in /tftpboot dir).
Put syslogd to send a message to you (man syslog.conf) when it sees
"DHCPACK on 10.10." lines and from this line get the MAC of new PC;
put it in dhcpd.conf with an ip for known hosts or
new name(and add it in DNS);
ln -s TSClient `gethostip -x IP_of_new_PC`
Sorry for my english
I run dhcpd under supervise with multilog .
multilog stderr points to a pipe;
_e_ action of multilog sends selected line to stderr :
" '-*' '+* DHCPACK on 10.10.*to*' e "
pipe_new_pc is read by new_pc.sh program which creates new DNS & DHCP entries
incremental (ex: pc0123.example.org for first PC, pc0124.example.org for next
PC) and a cdb with name to MAC mappings for wake on lan.
can tftpd be made to run in foreground , logging to stdout or stderr ?
 http://strange.nsk.pt/old/halt.com shutdowns the PC using APM
More information about the Syslinux