slitaz-doc-wiki-data diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/pages/en/guides/pxe.txt	Sat Feb 26 12:17:18 2011 +0000
     1.3 @@ -0,0 +1,182 @@
     1.4 +====== PXE =======
     1.5 +
     1.6 +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.
     1.7 +
     1.8 +This network boot method requires:
     1.9 +
    1.10 +    * a server to store files running DHCP and TFTP (each could be on a separate server);
    1.11 +    * a client with a PXE boot-loader, stored in the BIOS firmware. It maybe disk-less.
    1.12 +
    1.13 +\\
    1.14 +
    1.15 +===== PXE Server Set-Up =====
    1.16 +
    1.17 +A PXE server comprises:
    1.18 +
    1.19 +  * a DHCP server to accept clients;
    1.20 +  * a DHCP boot-file to configure them;
    1.21 +  * a TFTP server to deliver an OS.
    1.22 +
    1.23 +The SliTaz LiveCD can be used as a PXE server. To begin the process, launch the Netbox application (from the System Tools menu).
    1.24 +
    1.25 +    * From the //Static IP// tab, click //Start//.
    1.26 +      *  This box will be the DHCP server. It can't use DHCP to get IP configuration.
    1.27 +
    1.28 +<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>
    1.29 +
    1.30 +    * 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//.
    1.31 +      *  This will launch the TFTP server, which will deliver the SliTaz LiveCD across the network.
    1.32 +
    1.33 +    * From the //Server// tab, select the //PXE// sub-tab.
    1.34 +
    1.35 +    * Edit the configuration to add your boot options.
    1.36 +      *  This will update the DHCP server configuration automatically.
    1.37 +
    1.38 +    * 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//.
    1.39 +      *  This will launch the the DHCP server. If clients to do not receive an IP address, check this configuration.
    1.40 +
    1.41 +    * Ensure the files //bzImage// and //rootfs.gz// are stored in the // /boot // directory of the LiveCD.
    1.42 +
    1.43 +\\ 
    1.44 +
    1.45 +===== PXE Client Set-Up =====
    1.46 +
    1.47 +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.
    1.48 +
    1.49 +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.
    1.50 +
    1.51 +In PXE Network tab click Write floppy. Use this to boot the client computer.
    1.52 +
    1.53 +<note tip>Is your Ethernet card not recognised? See [[http://rom-o-matic.net/|ROM-O-Matic]]</note>
    1.54 +
    1.55 +\\
    1.56 +
    1.57 +===== Web Booting =====
    1.58 +
    1.59 +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.
    1.60 +
    1.61 +You can start the automatic process with the following command at the SliTaz LiveCD boot-splash:
    1.62 +
    1.63 +  web
    1.64 +
    1.65 +That's it!
    1.66 +
    1.67 +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]].
    1.68 +
    1.69 +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.
    1.70 +
    1.71 +\\
    1.72 +
    1.73 +=== PXE boot without DHCP server: Web Boot & Command Line ===
    1.74 +
    1.75 +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. 
    1.76 +<file>
    1.77 +title Slitaz Web
    1.78 +  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
    1.79 +</file>
    1.80 +
    1.81 +You can modify the URL thus:
    1.82 +<file>
    1.83 +title Slitaz Web
    1.84 +  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
    1.85 +  dns=192.168.0.1 url=http://mirror.slitaz.org/pxe/pxelinux.0
    1.86 +</file>
    1.87 +
    1.88 +Note that only the following keywords are recognised:
    1.89 +
    1.90 +  * ip=
    1.91 +  * gw=
    1.92 +  * dns=
    1.93 +  * url=
    1.94 +  * nodhcp (useful to avoid a DHCP timeout error)
    1.95 +
    1.96 +\\
    1.97 +
    1.98 +===== Advanced Web Booting Configuration =====
    1.99 +
   1.100 +The Web Booting process can be embedded into routers and other devices, as well as being customised.
   1.101 +
   1.102 +\\
   1.103 +
   1.104 +=== Embedded Web Boot, with PXE boot PROM (PXE forwarder) ===
   1.105 +
   1.106 +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:
   1.107 +
   1.108 +    * install http://mirror.slitaz.org/boot/mips/tftpd (mips version) in /jffs/usr/sbin
   1.109 +    * install gpxe.exe in /jffs/boot
   1.110 +    * add dhcp bootfile option in dnsmasq config file
   1.111 +
   1.112 +  # echo "dhcp-boot=gpxe.pxe" >> /tmp/dnsmasq.conf
   1.113 +
   1.114 +launch the tftp server for your lan (say 192.168.0.1/24)
   1.115 +
   1.116 +  # /jffs/usr/sbin/tftpd 192.168.0.1 /jffs/boot
   1.117 +
   1.118 +\\
   1.119 +
   1.120 +=== Modifying the Default GPXE Web Boot URL ===
   1.121 +
   1.122 +The URL is stored at offset 519 in 255 bytes max.
   1.123 +
   1.124 +  * Show the current URL with:
   1.125 +
   1.126 +  $ dd bs=1 skip=519 count=255 if=gpxe 2> /dev/null | strings
   1.127 +
   1.128 +  * Change the URL with:
   1.129 +
   1.130 +  $ echo -n "http://myurl.org/myboot" | cat - /dev/zero | dd conv=notrunc bs=1 seek=519 count=255 of=gpxe
   1.131 +
   1.132 +  * Change the URL and IP configuration with:
   1.133 +
   1.134 +  $ 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
   1.135 +  conv=notrunc bs=1 seek=519 count=255 of=gpxe
   1.136 +
   1.137 +  * Remove URL to behave as a normal GPXE with:
   1.138 +
   1.139 +  $ dd if=/dev/zero conv=notrunc bs=1 seek=519 count=255 of=gpxe
   1.140 +
   1.141 +\\
   1.142 +
   1.143 +=== Hack the gpxe.pxe Default Web Boot URL ===
   1.144 +
   1.145 +The URL is stored at offset 5 in 255 bytes max.
   1.146 +
   1.147 +Show the current URL with:
   1.148 +
   1.149 +  $ dd bs=1 skip=5 count=255 if=gpxe.pxe 2> /dev/null | strings
   1.150 +
   1.151 +Change the URL with:
   1.152 +
   1.153 +  $ echo -n "http://myurl.org/myboot" | cat - /dev/zero | dd conv=notrunc bs=1 seek=5 count=255 of=gpxe.pxe
   1.154 +
   1.155 +Remove the URL and behave as a normal //gpxe.pxe// with:
   1.156 +  $ dd if=/dev/zero conv=notrunc bs=1 seek=5 count=255 of=gpxe.pxe
   1.157 +
   1.158 +\\
   1.159 +
   1.160 +=== Using Redundancy with Web Boot Servers ===
   1.161 +
   1.162 +Comma separated URL lists are supported.
   1.163 +
   1.164 +The PXE client will try to load the first URL. If the load fails, it will try the next URL, and so on.
   1.165 +
   1.166 +Example with current Slitaz Web boot servers :
   1.167 +
   1.168 +  $ echo -n "http://mirror.slitaz.org/pxe/pxelinux.0,http://mirror.switch.ch/ftp/mirror/pxe/pxelinux.0,http:
   1.169 +  download.tuxfamily.org/slitaz/pxe/pxelinux.0" | cat - /dev/zero | dd conv=notrunc bs=1 seek=519 count=255 of=gpxe
   1.170 +
   1.171 + 
   1.172 +---- 
   1.173 +\\
   1.174 +^  Page Review Section  ^^ 
   1.175 +|Quality| Good  |
   1.176 +|Review| Minor Updates  |
   1.177 +|Priority| Medium |
   1.178 +|Problems| add a [[http://forum.slitaz.org|forum post link]]|
   1.179 +|:::     | OR add a [[http://labs.slitaz.org/issues |lab issue tracker link ]]|
   1.180 +|How to Improve| Improve readability |
   1.181 +|:::           | Section in to Client/Server, with Simple/Advanced in each |
   1.182 +|::: |  |
   1.183 +
   1.184 +\\
   1.185 +----
   1.186 \ No newline at end of file