no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | nslu:pxebootserver [2009/11/27 17:54] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== PXE Booting from NSLU2 ====== | ||
+ | Wouldn' | ||
+ | * Run diskless [[http:// | ||
+ | * Perform a Symantec GHOST backup | ||
+ | |||
+ | I will show the basics of how setup PXE, DHCP, a DOS network boot image and PloP linux. | ||
+ | |||
+ | ===== Our Setup ===== | ||
+ | This is the configuration of our environment: | ||
+ | * We're working with a small network 192.168.1.0/ | ||
+ | * We'll allow all local machines to boot and get an IP address via DHCP from the range 196.168.1.100 - 192.168.1.150 | ||
+ | * Our " | ||
+ | * Our " | ||
+ | |||
+ | ===== Software install ===== | ||
+ | |||
+ | Install the following software (once again, an internet connection is required): | ||
+ | < | ||
+ | ipkg install xinetd | ||
+ | ipkg install tftp-hpa (the tfptd server) | ||
+ | </ | ||
+ | |||
+ | Check that / | ||
+ | < | ||
+ | defaults | ||
+ | { | ||
+ | only_from | ||
+ | instances | ||
+ | log_type | ||
+ | log_on_success = HOST PID | ||
+ | log_on_failure = HOST | ||
+ | cps = 25 30 | ||
+ | } | ||
+ | |||
+ | includedir / | ||
+ | </ | ||
+ | |||
+ | |||
+ | Also check that / | ||
+ | |||
+ | < | ||
+ | service tftp | ||
+ | { | ||
+ | flags = REUSE | ||
+ | socket_type = dgram | ||
+ | protocol = udp | ||
+ | instances = 30 | ||
+ | wait = yes | ||
+ | user = root | ||
+ | server = / | ||
+ | server_args = -vt 30 -c -s / | ||
+ | cps = 100 2 | ||
+ | log_on_success = HOST PID | ||
+ | log_on_failure = HOST | ||
+ | disable = no | ||
+ | } | ||
+ | </ | ||
+ | At first, the default setup only allows overwriting existing files so the -c option has to be added to server_args as shown above. The last server_args option (-s / | ||
+ | |||
+ | |||
+ | |||
+ | ===== Setting up the TFTPBOOT area ===== | ||
+ | |||
+ | We will now setup the / | ||
+ | < | ||
+ | -bash-3.2# cd / | ||
+ | -bash-3.2# ls -lR | ||
+ | -rw-r--r-- 1 root root 269 Apr 13 09:02 display.msg | ||
+ | -rw-r--r-- 1 root root 23540 Aug 16 2004 memdisk | ||
+ | -rw-r--r-- 1 root root 94356 Nov 11 2004 memtest | ||
+ | -rw-r--r-- 1 root root 14646 Apr 10 10:30 pxelinux.0 | ||
+ | -rw-r--r-- 1 root root | ||
+ | |||
+ | pxelinux.cfg: | ||
+ | total 4 | ||
+ | -rw-r--r-- 1 root root 580 Apr 13 09:06 default | ||
+ | </ | ||
+ | |||
+ | First we will create the PXE boot directory pxelinux.cfg | ||
+ | < | ||
+ | -bash-3.2# mkdir pxelinux.cfg | ||
+ | -bash-3.2# chmod 755 pxelinux.cfg | ||
+ | </ | ||
+ | |||
+ | Into this directory will be place the following contents named **default** | ||
+ | < | ||
+ | timeout 0 | ||
+ | prompt 1 | ||
+ | display display.msg | ||
+ | |||
+ | label localdisk | ||
+ | localboot 0 | ||
+ | |||
+ | label unet | ||
+ | KERNEL memdisk | ||
+ | APPEND initrd=unet.img keeppxe | ||
+ | |||
+ | label memtest | ||
+ | KERNEL memtest | ||
+ | </ | ||
+ | |||
+ | The **keeppxe** option allows the usage of the 3com UNDI driver. | ||
+ | |||
+ | Make sure you take note of the permission that these file have. If they are not others and group readable TFTP will not be able to access them. | ||
+ | |||
+ | Create the following display text | ||
+ | < | ||
+ | ***** PXE Boot Menu ***** | ||
+ | |||
+ | localdisk - Normal boot from local disk | ||
+ | unet - PCDOS7 Universal Network boot | ||
+ | memtest | ||
+ | |||
+ | |||
+ | |||
+ | </ | ||
+ | Take the entire contents here including the trailing < | ||
+ | |||
+ | Into the / | ||
+ | * {{nslu: | ||
+ | * {{nslu: | ||
+ | * {{nslu: | ||
+ | * {{nslu: | ||
+ | |||
+ | You can take a peek inside these .IMG files on the NSLU by doing the following. | ||
+ | < | ||
+ | ipkg install kernel-module-isofs | ||
+ | ipkg install kernel-module-loop | ||
+ | |||
+ | mkdir floppy | ||
+ | mount -o loop unet.img floppy | ||
+ | </ | ||
+ | |||
+ | ==== Universal TCP/IP Boot disk ==== | ||
+ | |||
+ | If you want to build your own Universal TCP/IP boot disk then I suggest you start by creating a PCDOS7 floppy in a Virtual floppy drive and go from there. | ||
+ | |||
+ | * {{nslu: | ||
+ | * {{nslu: | ||
+ | * [[http:// | ||
+ | |||
+ | ===== DHCP ===== | ||
+ | |||
+ | Personally I use the dnsmasq package to provide DHCP services upon my LAN, since this is small and simple and provides other useful abilities, setting up PXE booting with dnsmasq just requires the addition of the following line. This done via the " | ||
+ | < | ||
+ | dhcp-boot=pxelinux.0, | ||
+ | </ | ||
+ | (Again we've setup the filename along with the name and IP address of the TFTP server which is " | ||
+ | |||
+ | |||
+ | ===== BOOTING UNET ===== | ||
+ | |||
+ | The PXE boot process. | ||
+ | |||
+ | {{nslu: | ||
+ | |||
+ | PXE Boot message. | ||
+ | < | ||
+ | ^L^O0e | ||
+ | |||
+ | ^O0elocaldisk^O07 - Normal boot from local disk | ||
+ | ^O0eunet^O07 | ||
+ | </ | ||
+ | |||
+ | {{nslu: | ||
+ | |||
+ | Booting the {{nslu: | ||
+ | |||
+ | {{nslu: | ||
+ | |||
+ | ==== GHOST ==== | ||
+ | |||
+ | So now we have DOS being remotely transfer via PXE firing up ghost is easy. We create a new network share an on this share we put a copy of ghost. | ||
+ | < | ||
+ | N:\> NET USE G: \\192.168.1.77\backup | ||
+ | N:\> G: | ||
+ | G:\> GHOST | ||
+ | </ | ||
+ | Given the G: drive is visible to GHOST we can now perform network backup and restores. | ||
+ | |||
+ | {{nslu: | ||
+ | |||
+ | ====== Plop Linux ====== | ||
+ | |||
+ | Installing and configuring PLOP Linux requires only a few changes to what we already have in place. | ||
+ | |||
+ | Construct a new PXE menu boot up screen: **/ | ||
+ | < | ||
+ | ^L^O0e | ||
+ | |||
+ | ^O0elocaldisk^O07 - Normal boot from local disk | ||
+ | ^O0eunet^O07 | ||
+ | ^O0memtest^O07 | ||
+ | ^O0plop^O07 | ||
+ | </ | ||
+ | |||
+ | {{nslu: | ||
+ | |||
+ | An additional entry in our PXE linux configuration file **/ | ||
+ | < | ||
+ | label plop | ||
+ | kernel ploplinux/ | ||
+ | append initrd=ploplinux/ | ||
+ | </ | ||
+ | |||
+ | Into the **/ | ||
+ | < | ||
+ | # cd / | ||
+ | # tar zxf ploplinux.tgz | ||
+ | </ | ||
+ | |||
+ | Make sure we have NFS installed on the NSLU | ||
+ | < | ||
+ | # ipkg install nfs-utils | ||
+ | </ | ||
+ | |||
+ | Modify the / | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | After making this change make it current | ||
+ | < | ||
+ | # exportfs -a | ||
+ | # showmount -e | ||
+ | Export list for herman: | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | **BOOT IT UP** | ||
+ | |||
+ | {{nslu: | ||
+ | |||
+ | ====== See Also ====== | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | {{tag> |