jimx0r: (Default)
[personal profile] jimx0r
So, I'm thinking a lot about booting over the network lately. I'm wondering about filenames for PXELINUX. PXELINUX will load its configuration via TFTP with any of these filenames:
/tftpboot/pxelinux.cfg/01-88-99-aa-bb-cc-dd
/tftpboot/pxelinux.cfg/C000025B
/tftpboot/pxelinux.cfg/C000025
/tftpboot/pxelinux.cfg/C00002
/tftpboot/pxelinux.cfg/C0000
/tftpboot/pxelinux.cfg/C000
/tftpboot/pxelinux.cfg/C00
/tftpboot/pxelinux.cfg/C0
/tftpboot/pxelinux.cfg/C
/tftpboot/pxelinux.cfg/default

So, what does that really mean to us??? Lets look at these entries individually:

/tftpboot/pxelinux.cfg/01-88-99-aa-bb-cc-dd
This first entry is the most highly preferred of the possible filenames you could give. It corresponds to a NIC with a MAC address of 01:88:99:aa:bb:cc:dd. This filename could be a good choice, but if you're using DHCP to hand out IP addresses to your machines that are netbooting, then you'll have to put that MAC address both into the DHCP daemon's configuration file and encode it into the boot filename here. Should the NIC die, you'll have to remember to change both this filename and the entry in the dhcpd.conf!

/tftpboot/pxelinux.cfg/C000025B
This entry, represents a host that has the IP address 192.0.2.91. This seems to me like a really reasonable choice to use for your boot filename. This way you're *not* having to specify the MAC in two places!

If you're wondering... the filename is the IP address encoded into hex. printf(1) or printf(3) can be nice for converting to/from HEX (hint: %X is unsigned hex (with capital letters) and %u is unsigned integer :)

And, for completeness sake, lets look at these:
/tftpboot/pxelinux.cfg/C000025
This corresponds to any of the 16 IP addresses:
192.0.2.80 192.0.2.81 192.0.2.82 192.0.2.83 192.0.2.84 192.0.2.85 192.0.2.86 192.0.2.87 192.0.2.88 192.0.2.89 192.0.2.90 192.0.2.91 192.0.2.92 192.0.2.93 192.0.2.94 192.0.2.95

/tftpboot/pxelinux.cfg/C00002
This is any of the IP addresses in 192.0.2.0/24.

/tftpboot/pxelinux.cfg/C0000
This is any of the IP addresses in 192.0.0.0/20.
/tftpboot/pxelinux.cfg/C000
This is any of the IP addresses in 192.0.0.0/16.
/tftpboot/pxelinux.cfg/C00
This is any of the IP addresses in 192.0.0.0/12.
/tftpboot/pxelinux.cfg/C0
This is any of the IP addresses in 192.0.0.0/8.
/tftpboot/pxelinux.cfg/C
This is any of the IP addresses in 192.0.0.0/4.
/tftpboot/pxelinux.cfg/default
This is, obviously, the default filename which any client will load.

So, I'm gen into *controlling* what is going on with each individual machine, so I don't see a whole lot of use for any of the possible filenames except for those based on the MAC or the IP or the "default". I especially find the "default" handy for "registering" new machines in some way and other things when you don't know enough about the machine to be sure of what to do!

One of these days I'll get around to writing something about PXELINUX configuration files themselves...

Profile

jimx0r: (Default)
jimx0r

July 2012

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930 31    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 24th, 2017 04:35 am
Powered by Dreamwidth Studios