Bering-uClibc 4.x - User Guide - Appendices - Hints and Tips for Network Booting
|Appendices - Hints and Tips for Network Booting|
|Prev||Bering-uClibc 4.x - User Guide|
Much of the preparation necessary in order to boot Bering-uClibc 4.x from the network using PXE technology is not specific to Bering-uClibc 4.x, since here the Bering-uClibc 4.x machine is acting as a client of other network devices, not as a server. These "other network devices" may or may not be other Bering-uClibc 4.x machines.
While it is possible to network-boot using a single other machine which serves all of the necessary content, there are multiple separate steps involved and typically also multiple different network protocols. The following diagram shows a small network which will be used as an example for the guidelines on this page.
The roles of the different machines can be summarized as follows:
- This is the Bering-uClibc 4.x machine which is being network booted.
- DHCP Server
- Provides the IP Address details for the LEAF machine and crucially also provides the PXE boot filename, together with the details of the server from which that file can be downloaded using TFTP.
- TFTP Server
- It is essential that a file like
gpxelinux.0- see below) can be downloaded using the Trivial File Transfer Protocol. The corresponding configuration file (often filename
pxelinux.cfg/) is also downloaded using TFTP.
- WEB Server
- There are various different options for the file transfer protocols which can be used to download the remaining files: the Linux kernel and initrd files,
leaf.cfgand the Bering-uClibc 4.x
.lrpfiles. These could all be downloaded using TFTP, but a better option is to use HTTP from a WEB server.
Physical Network Connection Considerations
When planning a network boot deployment, remember that most devices will only PXE boot from their "first" network interface card, the one that Linux identifies as eth0. The default configuration of Bering-uClibc 4.x uses eth0 for the external or Internet-facing network connection, and eth1 for the internal or "LAN" network connection. Most people will want to network-boot from servers located on their internal network. This means that eth0 must be connected to that internal network, at least during boot-up.
You probably want to pay careful attention to the contents of
You might want to swap eth0 and eth1.
PXELINUX versus gPXELINUX
"Traditional" PXELINUX uses a file called
pxelinux.0 as the second-stage boot loader.
This only supports TFTP for the delivery of the Linux kernel and initial RAM disk files.
An alternative is gPXELINUX, which is a combination of gPXE and PXELINUX. This uses a file called
gpxelinux.0 and adds support for a range of other file transfer protocols - in particular HTTP(S).
For the most part gPXELINUX is a drop-in replacement for PXELINUX. The main difference is that the configuration file can specify URLs rather than simple (TFTP) filenames. For example, a gPXELINUX
pxelinux.cfg/default might contain:
TIMEOUT 0 APPEND reboot=bios DEFAULT http://192.168.1.12/leaf/linux initrd=http://192.168.1.12/leaf/initrd.lrp rw root=/dev/ram0 LEAFCFG=http://192.168.1.12/leaf/leaf.cfg
Some older machines seem not to work with gPXELINUX whereas they do work with regular PXELINUX.
gpxelinux.0 are included in the Bering-uClibc 4.x "pxelinux" disk Images.
DHCP Server Configuration
PXE booting requires that the DHCP server delivers a PXE "boot filename" and the name and IP address of the server where this can be downloaded (using TFTP).
See the PXELINUX Wiki for more information.
Configuration Syntax for dnsmasq
The relevant entry in
/etc/dnsmasq.conf would be something like the following (if the DHCP server is also acting as the TFTP server):
Alternatively, if the TFTP server is running on a separate machine, specify the name and IP address of that separate machine at the end of the line:
TFTP Server Configuration
File/Web Server Configuration
- Some old PXE boot ROMs do not support downloading the "boot filename" from a different server and insist that this is downloaded from the DHCP server. If the DHCP boot works but the subsequent TFTP download does not then try installing a TFTP server on the DHCP server, if possible.
- If using dnsmasq as the DHCP server, also try using the "dhcp-no-override" configuration file option.