slitaz-doc-wiki-data annotate 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
rev   line source
slaxemulator@7 1 ====== PXE =======
slaxemulator@7 2
slaxemulator@7 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.
slaxemulator@7 4
slaxemulator@7 5 This network boot method requires:
slaxemulator@7 6
slaxemulator@7 7 * a server to store files running DHCP and TFTP (each could be on a separate server);
slaxemulator@7 8 * a client with a PXE boot-loader, stored in the BIOS firmware. It maybe disk-less.
slaxemulator@7 9
slaxemulator@7 10 \\
slaxemulator@7 11
slaxemulator@7 12 ===== PXE Server Set-Up =====
slaxemulator@7 13
slaxemulator@7 14 A PXE server comprises:
slaxemulator@7 15
slaxemulator@7 16 * a DHCP server to accept clients;
slaxemulator@7 17 * a DHCP boot-file to configure them;
slaxemulator@7 18 * a TFTP server to deliver an OS.
slaxemulator@7 19
slaxemulator@7 20 The SliTaz LiveCD can be used as a PXE server. To begin the process, launch the Netbox application (from the System Tools menu).
slaxemulator@7 21
slaxemulator@7 22 * From the //Static IP// tab, click //Start//.
slaxemulator@7 23 * This box will be the DHCP server. It can't use DHCP to get IP configuration.
slaxemulator@7 24
slaxemulator@7 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>
slaxemulator@7 26
slaxemulator@7 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//.
slaxemulator@7 28 * This will launch the TFTP server, which will deliver the SliTaz LiveCD across the network.
slaxemulator@7 29
slaxemulator@7 30 * From the //Server// tab, select the //PXE// sub-tab.
slaxemulator@7 31
slaxemulator@7 32 * Edit the configuration to add your boot options.
slaxemulator@7 33 * This will update the DHCP server configuration automatically.
slaxemulator@7 34
slaxemulator@7 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//.
slaxemulator@7 36 * This will launch the the DHCP server. If clients to do not receive an IP address, check this configuration.
slaxemulator@7 37
slaxemulator@7 38 * Ensure the files //bzImage// and //rootfs.gz// are stored in the // /boot // directory of the LiveCD.
slaxemulator@7 39
slaxemulator@7 40 \\
slaxemulator@7 41
slaxemulator@7 42 ===== PXE Client Set-Up =====
slaxemulator@7 43
slaxemulator@7 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.
slaxemulator@7 45
slaxemulator@7 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.
slaxemulator@7 47
slaxemulator@7 48 In PXE Network tab click Write floppy. Use this to boot the client computer.
slaxemulator@7 49
slaxemulator@7 50 <note tip>Is your Ethernet card not recognised? See [[http://rom-o-matic.net/|ROM-O-Matic]]</note>
slaxemulator@7 51
slaxemulator@7 52 \\
slaxemulator@7 53
slaxemulator@7 54 ===== Web Booting =====
slaxemulator@7 55
slaxemulator@7 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.
slaxemulator@7 57
slaxemulator@7 58 You can start the automatic process with the following command at the SliTaz LiveCD boot-splash:
slaxemulator@7 59
slaxemulator@7 60 web
slaxemulator@7 61
slaxemulator@7 62 That's it!
slaxemulator@7 63
slaxemulator@7 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]].
slaxemulator@7 65
slaxemulator@7 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.
slaxemulator@7 67
slaxemulator@7 68 \\
slaxemulator@7 69
slaxemulator@7 70 === PXE boot without DHCP server: Web Boot & Command Line ===
slaxemulator@7 71
slaxemulator@7 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.
slaxemulator@7 73 <file>
slaxemulator@7 74 title Slitaz Web
slaxemulator@7 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
slaxemulator@7 76 </file>
slaxemulator@7 77
slaxemulator@7 78 You can modify the URL thus:
slaxemulator@7 79 <file>
slaxemulator@7 80 title Slitaz Web
slaxemulator@7 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
slaxemulator@7 82 dns=192.168.0.1 url=http://mirror.slitaz.org/pxe/pxelinux.0
slaxemulator@7 83 </file>
slaxemulator@7 84
slaxemulator@7 85 Note that only the following keywords are recognised:
slaxemulator@7 86
slaxemulator@7 87 * ip=
slaxemulator@7 88 * gw=
slaxemulator@7 89 * dns=
slaxemulator@7 90 * url=
slaxemulator@7 91 * nodhcp (useful to avoid a DHCP timeout error)
slaxemulator@7 92
slaxemulator@7 93 \\
slaxemulator@7 94
slaxemulator@7 95 ===== Advanced Web Booting Configuration =====
slaxemulator@7 96
slaxemulator@7 97 The Web Booting process can be embedded into routers and other devices, as well as being customised.
slaxemulator@7 98
slaxemulator@7 99 \\
slaxemulator@7 100
slaxemulator@7 101 === Embedded Web Boot, with PXE boot PROM (PXE forwarder) ===
slaxemulator@7 102
slaxemulator@7 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:
slaxemulator@7 104
slaxemulator@7 105 * install http://mirror.slitaz.org/boot/mips/tftpd (mips version) in /jffs/usr/sbin
slaxemulator@7 106 * install gpxe.exe in /jffs/boot
slaxemulator@7 107 * add dhcp bootfile option in dnsmasq config file
slaxemulator@7 108
slaxemulator@7 109 # echo "dhcp-boot=gpxe.pxe" >> /tmp/dnsmasq.conf
slaxemulator@7 110
slaxemulator@7 111 launch the tftp server for your lan (say 192.168.0.1/24)
slaxemulator@7 112
slaxemulator@7 113 # /jffs/usr/sbin/tftpd 192.168.0.1 /jffs/boot
slaxemulator@7 114
slaxemulator@7 115 \\
slaxemulator@7 116
slaxemulator@7 117 === Modifying the Default GPXE Web Boot URL ===
slaxemulator@7 118
slaxemulator@7 119 The URL is stored at offset 519 in 255 bytes max.
slaxemulator@7 120
slaxemulator@7 121 * Show the current URL with:
slaxemulator@7 122
slaxemulator@7 123 $ dd bs=1 skip=519 count=255 if=gpxe 2> /dev/null | strings
slaxemulator@7 124
slaxemulator@7 125 * Change the URL with:
slaxemulator@7 126
slaxemulator@7 127 $ echo -n "http://myurl.org/myboot" | cat - /dev/zero | dd conv=notrunc bs=1 seek=519 count=255 of=gpxe
slaxemulator@7 128
slaxemulator@7 129 * Change the URL and IP configuration with:
slaxemulator@7 130
slaxemulator@7 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
slaxemulator@7 132 conv=notrunc bs=1 seek=519 count=255 of=gpxe
slaxemulator@7 133
slaxemulator@7 134 * Remove URL to behave as a normal GPXE with:
slaxemulator@7 135
slaxemulator@7 136 $ dd if=/dev/zero conv=notrunc bs=1 seek=519 count=255 of=gpxe
slaxemulator@7 137
slaxemulator@7 138 \\
slaxemulator@7 139
slaxemulator@7 140 === Hack the gpxe.pxe Default Web Boot URL ===
slaxemulator@7 141
slaxemulator@7 142 The URL is stored at offset 5 in 255 bytes max.
slaxemulator@7 143
slaxemulator@7 144 Show the current URL with:
slaxemulator@7 145
slaxemulator@7 146 $ dd bs=1 skip=5 count=255 if=gpxe.pxe 2> /dev/null | strings
slaxemulator@7 147
slaxemulator@7 148 Change the URL with:
slaxemulator@7 149
slaxemulator@7 150 $ echo -n "http://myurl.org/myboot" | cat - /dev/zero | dd conv=notrunc bs=1 seek=5 count=255 of=gpxe.pxe
slaxemulator@7 151
slaxemulator@7 152 Remove the URL and behave as a normal //gpxe.pxe// with:
slaxemulator@7 153 $ dd if=/dev/zero conv=notrunc bs=1 seek=5 count=255 of=gpxe.pxe
slaxemulator@7 154
slaxemulator@7 155 \\
slaxemulator@7 156
slaxemulator@7 157 === Using Redundancy with Web Boot Servers ===
slaxemulator@7 158
slaxemulator@7 159 Comma separated URL lists are supported.
slaxemulator@7 160
slaxemulator@7 161 The PXE client will try to load the first URL. If the load fails, it will try the next URL, and so on.
slaxemulator@7 162
slaxemulator@7 163 Example with current Slitaz Web boot servers :
slaxemulator@7 164
slaxemulator@7 165 $ echo -n "http://mirror.slitaz.org/pxe/pxelinux.0,http://mirror.switch.ch/ftp/mirror/pxe/pxelinux.0,http:
slaxemulator@7 166 download.tuxfamily.org/slitaz/pxe/pxelinux.0" | cat - /dev/zero | dd conv=notrunc bs=1 seek=519 count=255 of=gpxe
slaxemulator@7 167
slaxemulator@7 168
slaxemulator@7 169 ----
slaxemulator@7 170 \\
slaxemulator@7 171 ^ Page Review Section ^^
slaxemulator@7 172 |Quality| Good |
slaxemulator@7 173 |Review| Minor Updates |
slaxemulator@7 174 |Priority| Medium |
slaxemulator@7 175 |Problems| add a [[http://forum.slitaz.org|forum post link]]|
slaxemulator@7 176 |::: | OR add a [[http://labs.slitaz.org/issues |lab issue tracker link ]]|
slaxemulator@7 177 |How to Improve| Improve readability |
slaxemulator@7 178 |::: | Section in to Client/Server, with Simple/Advanced in each |
slaxemulator@7 179 |::: | |
slaxemulator@7 180
slaxemulator@7 181 \\
slaxemulator@7 182 ----