a s p a s i a
2008-Mar-13 23:16 UTC
[syslinux] newbie question: pxelinux.cfg/default question
Hello all, I understand that during PXE boot, it goes into the pxelinux.cfg and it states: 1. "it will search for the config file using its own IP address in upper case hexadecimal, e.g. 192.0.2.91 -> C000025B (you can use the included progam "gethostip" to compute the hexadecimal IP address for any host.) If that file is not found, it will remove one hex digit and try again." a. I'm quite confused - does that mean that the files C0000025B through "C" SHOULD exist or not? b. Are these EMPTY files? c. and Utlimiately it reads /pxelinux.cfg/default - which I have seen it to work. BUT, what if I want to have like (5) FIVE - configuration files, each of which I want to define a unique NFSroot per host?? ... example: pxelinux.cfg/default1 DEFAULT vmlinuz-2.6.22-14 APPEND initrd=initrd.img-2.6.22-14 nfsroot=192.168.16.5:/export/images/00A0D1E35838 ip=dhcp pxelinux.cfg/default2 DEFAULT vmlinuz-2.6.22-14 APPEND initrd=initrd.img-2.6.22-14 nfsroot=192.168.16.5:/export/images/00A0D1E357CA ip=dhcp etcetera .... Is this possible - I tried to google and a few folks point to using the MAC address of the booting client - i tried to place a file: /pxelinux.cfg/00A0D1E35838 which contains the appropriate above configuration, and yet still the boot process reads the pxelinux.cfg/default file. Perhaps I'm slow in understanding the instructions ... does it mean therefore that ONLY the file /pxelinux.cfg/default is really "read" by the boot process, so perhaps I need to have a script that just creates the default file on the fly or copies and existing unique one to /pxelinux.cfg default based on who or what the MAC address of the booting client? Please advise. thanks in advance. - a. -- A S P A S I A . . . . . . . . . . ..
Andreas Kotes
2008-Mar-14 00:25 UTC
[syslinux] newbie question: pxelinux.cfg/default question
Hello a., * a s p a s i a <aspasia.sf at gmail.com> [20080314 00:24]:> I understand that during PXE boot, it goes into the pxelinux.cfg and it states: > > 1. "it will search for the config file using its own IP address in > upper case hexadecimal, e.g. 192.0.2.91 -> C000025B (you can use the > included progam "gethostip" to compute the hexadecimal IP address for > any host.) If that file is not found, it will remove one hex digit and > try again." > > a. I'm quite confused - does that mean that the files C0000025B > through "C" SHOULD exist or not?they MAY exist. It will try C0000025B, then, C0000025, then C000002, and so on, until one of them is found. If C is not found, it uses 'default'.> b. Are these EMPTY files?no. these are full configuration files :)> c. and Utlimiately it reads /pxelinux.cfg/default - which I have seen > it to work.yes.> BUT, what if I want to have like (5) FIVE - configuration files, each > of which I want to define a unique NFSroot per host?? ... example: > > pxelinux.cfg/default1 > DEFAULT vmlinuz-2.6.22-14 > APPEND initrd=initrd.img-2.6.22-14 > nfsroot=192.168.16.5:/export/images/00A0D1E35838 ip=dhcpthis file should be called e.g. pxelinux.cfg/C0A81010 for host 192.168.16.16 to do what you want> pxelinux.cfg/default2 > DEFAULT vmlinuz-2.6.22-14 > APPEND initrd=initrd.img-2.6.22-14 > nfsroot=192.168.16.5:/export/images/00A0D1E357CA ip=dhcpthis file should be called e.g. pxelinux.cfg/C0A81011 for host 192.168.16.17 to do what you want> Is this possible - I tried to google and a few folks point to using > the MAC address of the booting client - i tried to place a file: > /pxelinux.cfg/00A0D1E35838 > which contains the appropriate above configuration, and yet still the > boot process reads the pxelinux.cfg/default file.it has to be the _IP address_ in hex, not the MAC address :) good luck :) Andreas -- flatline IT services - Andreas Kotes - Tailored solutions for your IT needs
H. Peter Anvin
2008-Mar-14 08:04 UTC
[syslinux] newbie question: pxelinux.cfg/default question
Andreas Kotes wrote: \>> this file should be called e.g. pxelinux.cfg/C0A81011 for host > 192.168.16.17 to do what you want > >> Is this possible - I tried to google and a few folks point to using >> the MAC address of the booting client - i tried to place a file: >> /pxelinux.cfg/00A0D1E35838 >> which contains the appropriate above configuration, and yet still the >> boot process reads the pxelinux.cfg/default file. > > it has to be the _IP address_ in hex, not the MAC address :) >No, it can be the MAC address (which is tried before the IP address variants), but it needs to be in the proper format, in this case pxelinux.cfg/01-00-a0-d1-e3-58-38 The leading 01- signifies Ethernet. -hpa
a s p a s i a
2008-Mar-14 15:30 UTC
[syslinux] newbie question: pxelinux.cfg/default question
> pxelinux.cfg/01-00-a0-d1-e3-58-38 > > The leading 01- signifies Ethernet. > >yeah, and it was clearly shown as an example in your documentation: /mybootdir/pxelinux.cfg/01-88-99-aa-bb-cc-dd thx again! - a.