slitaz-doc-wiki-data view pages/en/guides/pxe.txt @ rev 7

Add pages/en folder.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Feb 26 12:17:18 2011 +0000 (2011-02-26)
parents
children 90832bdf1ed3
line source
1 ====== PXE =======
3 The //Preboot eXecution Environment// (or //PXE//, pronounced 'pixie') is the process of booting a computer from a network connection. It is comparable to booting a LiveCD from a remote CD drive.
5 This network boot method requires:
7 * a server to store files running DHCP and TFTP (each could be on a separate server);
8 * a client with a PXE boot-loader, stored in the BIOS firmware. It maybe disk-less.
10 \\
12 ===== PXE Server Set-Up =====
14 A PXE server comprises:
16 * a DHCP server to accept clients;
17 * a DHCP boot-file to configure them;
18 * a TFTP server to deliver an OS.
20 The SliTaz LiveCD can be used as a PXE server. To begin the process, launch the Netbox application (from the System Tools menu).
22 * From the //Static IP// tab, click //Start//.
23 * This box will be the DHCP server. It can't use DHCP to get IP configuration.
25 <note tip>Since SliTaz 3.0 the Netbox application is now split into Netbox and Serverbox. If you are running a recent SliTaz version, please read **Serverbox application** instead of **Server tab** below</note>
27 * From the //Server// tab, select the //INETD// sub-tab and ensure the //tftpd// line is **uncommented** in /etc/initd.conf. This is the default behaviour. Click //Start//.
28 * This will launch the TFTP server, which will deliver the SliTaz LiveCD across the network.
30 * From the //Server// tab, select the //PXE// sub-tab.
32 * Edit the configuration to add your boot options.
33 * This will update the DHCP server configuration automatically.
35 * From the //Server// tab, select the //DHCP// sub-tab. Check the configuration aligns with your network. The previous step has added the lines //boot_file// and //siaddr//. Click //Start//.
36 * This will launch the the DHCP server. If clients to do not receive an IP address, check this configuration.
38 * Ensure the files //bzImage// and //rootfs.gz// are stored in the // /boot // directory of the LiveCD.
40 \\
42 ===== PXE Client Set-Up =====
44 Most recent machines with on-board Ethernet have a PXE-capable BIOS. Look for this feature in BIOS menus and BIOS boot menu and ensure it is activated. It may require you press a key, such as F12, during the boot process.
46 If your computer does not support PXE booting, you can use SliTaz as a client instead. Create a bootable CD-ROM or floppy disk with the // Boot Floppy/CDROM // tool found in the //System Tools// menu.
48 In PXE Network tab click Write floppy. Use this to boot the client computer.
50 <note tip>Is your Ethernet card not recognised? See [[http://rom-o-matic.net/|ROM-O-Matic]]</note>
52 \\
54 ===== Web Booting =====
56 The SliTaz LiveCD has configuration settings to start your computer via the Internet. This is useful for using a newer version of SliTaz from older media.
58 You can start the automatic process with the following command at the SliTaz LiveCD boot-splash:
60 web
62 That's it!
64 You can find more information on using an Internet connection to boot your computer at the [[http://boot.slitaz.org/|SliTaz Web Boot home-page]].
66 You will need a DHCP server to get an IP address, netmask, gateway address, as per a normal network connection -- a standard home router should be sufficient for this.
68 \\
70 === PXE boot without DHCP server: Web Boot & Command Line ===
72 If you have no device that can function as a DHCP server, you need an IP address with a netmask, a gateway address and, optionally, a DNS address.
73 <file>
74 title Slitaz Web
75 kernel /boot/gpxe ip=192.168.0.12/24 gw=192.168.0.1 dns=192.168.0.1 url=http://mirror.slitaz.org/pxe/pxelinux.0
76 </file>
78 You can modify the URL thus:
79 <file>
80 title Slitaz Web
81 kernel /boot/gpxe ip=192.168.0.12/24 gw=192.168.0.1 dns=192.168.0.1 url=ip=192.168.0.12/24 gw=192.168.0.1
82 dns=192.168.0.1 url=http://mirror.slitaz.org/pxe/pxelinux.0
83 </file>
85 Note that only the following keywords are recognised:
87 * ip=
88 * gw=
89 * dns=
90 * url=
91 * nodhcp (useful to avoid a DHCP timeout error)
93 \\
95 ===== Advanced Web Booting Configuration =====
97 The Web Booting process can be embedded into routers and other devices, as well as being customised.
99 \\
101 === Embedded Web Boot, with PXE boot PROM (PXE forwarder) ===
103 Configure a PXE server with http://download.tuxfamily.org/slitaz/boot/gpxe.pxe as the boot file, a 42Kb second stage loader. This was successfully tested with an [[http://openwrt.org/|OpenWRT]] router:
105 * install http://mirror.slitaz.org/boot/mips/tftpd (mips version) in /jffs/usr/sbin
106 * install gpxe.exe in /jffs/boot
107 * add dhcp bootfile option in dnsmasq config file
109 # echo "dhcp-boot=gpxe.pxe" >> /tmp/dnsmasq.conf
111 launch the tftp server for your lan (say 192.168.0.1/24)
113 # /jffs/usr/sbin/tftpd 192.168.0.1 /jffs/boot
115 \\
117 === Modifying the Default GPXE Web Boot URL ===
119 The URL is stored at offset 519 in 255 bytes max.
121 * Show the current URL with:
123 $ dd bs=1 skip=519 count=255 if=gpxe 2> /dev/null | strings
125 * Change the URL with:
127 $ echo -n "http://myurl.org/myboot" | cat - /dev/zero | dd conv=notrunc bs=1 seek=519 count=255 of=gpxe
129 * Change the URL and IP configuration with:
131 $ echo -n "ip=192.168.0.10/24 gw=192.168.0.1 dns=192.168.0.1 url=http://myurl.org/myboot" | cat - /dev/zero | dd
132 conv=notrunc bs=1 seek=519 count=255 of=gpxe
134 * Remove URL to behave as a normal GPXE with:
136 $ dd if=/dev/zero conv=notrunc bs=1 seek=519 count=255 of=gpxe
138 \\
140 === Hack the gpxe.pxe Default Web Boot URL ===
142 The URL is stored at offset 5 in 255 bytes max.
144 Show the current URL with:
146 $ dd bs=1 skip=5 count=255 if=gpxe.pxe 2> /dev/null | strings
148 Change the URL with:
150 $ echo -n "http://myurl.org/myboot" | cat - /dev/zero | dd conv=notrunc bs=1 seek=5 count=255 of=gpxe.pxe
152 Remove the URL and behave as a normal //gpxe.pxe// with:
153 $ dd if=/dev/zero conv=notrunc bs=1 seek=5 count=255 of=gpxe.pxe
155 \\
157 === Using Redundancy with Web Boot Servers ===
159 Comma separated URL lists are supported.
161 The PXE client will try to load the first URL. If the load fails, it will try the next URL, and so on.
163 Example with current Slitaz Web boot servers :
165 $ echo -n "http://mirror.slitaz.org/pxe/pxelinux.0,http://mirror.switch.ch/ftp/mirror/pxe/pxelinux.0,http:
166 download.tuxfamily.org/slitaz/pxe/pxelinux.0" | cat - /dev/zero | dd conv=notrunc bs=1 seek=519 count=255 of=gpxe
169 ----
170 \\
171 ^ Page Review Section ^^
172 |Quality| Good |
173 |Review| Minor Updates |
174 |Priority| Medium |
175 |Problems| add a [[http://forum.slitaz.org|forum post link]]|
176 |::: | OR add a [[http://labs.slitaz.org/issues |lab issue tracker link ]]|
177 |How to Improve| Improve readability |
178 |::: | Section in to Client/Server, with Simple/Advanced in each |
179 |::: | |
181 \\
182 ----