Hi 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. /Kenneth
Murali Krishnan Ganapathy
2006-Mar-12 15:51 UTC
[syslinux] Can this be done with PXELinux?
Why not simplify this a little. * Computer always boots via PXELINUX * Boots into COMBOOT code * Code always sends MAC addr,RAM,HDD size, Video Card to "Server" * Server sends command to execute * Computer executes command The server can easily do the checking whether it is the first time or not. It can return any PXELINUX image name, so it could be anything from "reboot","chain.c32 hd0 1","ghost". Theoretically you should be able to do this. some potential issues (I dont know if they are that difficult). (1) Comboot code doing raw sockets or may be there is a way to piggy back this info on top of the DHCP protocol. (2) Is security an issue, i.e. what if there is a rogue laptop sitting on the network posing as the server. (3) You have to take the time to write such a code. I cant think of a solution already out there which does it for you. - Murali Kenneth Vandb?k wrote:> Hi > > 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. > > > /Kenneth > _______________________________________________ > SYSLINUX mailing list > Submissions to SYSLINUX at zytor.com > Unsubscribe or set options at: > http://www.zytor.com/mailman/listinfo/syslinux > Please do not send private replies to mailing list traffic. > > >
On Sunday 12 March 2006 01:05 am, Kenneth Vandb?k wrote:> Hi > > 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. > > > /KennethHi 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:> > /mybootdir/pxelinux.cfg/01-88-99-aa-bb-cc-dd > /mybootdir/pxelinux.cfg/C000025B > /mybootdir/pxelinux.cfg/C000025 > /mybootdir/pxelinux.cfg/C00002 > /mybootdir/pxelinux.cfg/C0000 > /mybootdir/pxelinux.cfg/C000 > /mybootdir/pxelinux.cfg/C00 > /mybootdir/pxelinux.cfg/C0 > /mybootdir/pxelinux.cfg/C > /mybootdir/pxelinux.cfg/default > > > ... 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 config file. ex: 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.) or 2. halt.com[1] 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); cd /tftpboot/pxelinux.cfg ln -s TSClient `gethostip -x IP_of_new_PC` wakeonlan ${MAC} Sorry for my english Florin P.S. I run dhcpd under supervise[2] with multilog [2]. multilog stderr points to a pipe; exec 2>/tmp/pipe_new_pc _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. P.P.S. to H.P.A. can tftpd be made to run in foreground , logging to stdout or stderr ? [1] http://strange.nsk.pt/old/halt.com shutdowns the PC using APM [2] http://cr.yp.to/daemontools.html