Difference between revisions of "Bering-uClibc 4.x - User Guide - Appendices - Hints and Tips for Network Booting"

From bering-uClibc
Jump to: navigation, search
(Added "PXELINUX versus gPXELINUX" Section)
(Added diagram)
Line 15: Line 15:
 
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''.
 
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.
 
These "other network devices" may or may not be other [[Bering-uClibc 4.x]] machines.
 +
 +
 +
==Network Overview==
 +
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.
 +
[[Image:Pxe-overview.png|center|512px|alt=PXE network boot overview]]
 +
  
  
Line 57: Line 63:
  
  
==File Server Configuration==
+
==File/Web Server Configuration==
 
TODO
 
TODO
  

Revision as of 08:20, 27 February 2011

Appendices - Hints and Tips for Network Booting
Prev Bering-uClibc 4.x - User Guide


Introduction

Note: pxelinux boot support is currently under development and is not yet available in the standard Bering-uClibc 4.x downloads. Refer to Trac ticket #3 for the latest status.

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.


Network Overview

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.

PXE network boot overview


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 /etc/network/interfaces and /etc/shorewall/interfaces. 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.121/leaf/linux initrd=http://192.168.1.121/leaf/initrd.lrp rw root=/dev/ram0 LEAFCFG=http://192.168.1.121/leaf/leaf.cfg

Some older machines seem not to work with gPXELINUX whereas they do work with regular PXELINUX.

Both pxelinux.0 and 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):

dhcp-boot=/gpxelinux.0

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:

dhcp-boot=/gpxelinux.0,tftpserver,192.168.1.111


TFTP Server Configuration

TODO


File/Web Server Configuration

TODO


Troubleshooting

  • 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.



Prev Up