G4u configure for pxe boot
From TuxDocsWiki
Below are steps needed to boot G4U via PXE on FC5. The process will be similiar for other flavors of unix as well.
Contents |
PreReqs
Install the following packages via yum:
- tftp
- tftp-server
- nfs-utils
- dhcp
Configuration
Set tftp root
On FC5, the default tftp root is set to /tftpboot. If you wish to change this, you can edit /etc/xinetd.d/tftp and change /tftpboot to be the location you would like to act as the root
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -v -s /tftpboot
per_source = 11
cps = 100 2
flags = IPv4
}
DHCP Config Options
For information on installing and configuring dhcpd, please view the DHCP Configuration Examples.
Add the following options to either the global config, or within a certain subnet:
filename "pxeboot_ia32.bin"; next-server 192.168.0.254; # IP of NFS server option root-path "/tftpboot";
The filename path will be relative to the tftproot path.
NFS
Edit the /etc/exports file and add the following line:
/tftpboot 192.168.0.0/255.255.255.0(async,no_subtree_check,ro)
Note: Don't forget to adjust your subnet in the exports file above.
Load on Startup
Configuring services to start automatically is very easy on FC5.
Issue the following commands to configure the servers to start at boot:
chkconfig tftp on chkconfig dhcpd on chkconfig nfs on
Issue the following commands to start the servers:
service xinetd restart service dhcpd start service nfs start
Download the NetBSD's base.tgz
Download NetBSD's base.tgz file
wget ftp://ftp.netbsd.org/pub/NetBSD-daily/HEAD/200605020000Z/i386/binary/sets/base.tgz
Copy the file into a new folder, and extract it:
tar -xzf base.tgz
Copy the "pxeboot_ia32.bin" from the /usr/mdec which was just extracted from base.tgz to /tftpboot on the local filesystem. Make sure the file is world readable.
Extract the G4U Kernel
Download the G4U floppy images and extract the kernel using the following command. Note: The command below is 1 line the "/" detonates a line break.
(cat g4u-2.1-1.fs | dd bs=512 skip=16 ; / cat g4u-2.1-2.fs | dd bs=512 skip=16) | tar vxf -
After the command executes, you should get output similiar to:
boot netbsd 2864+0 records in 2864+0 records out 1466368 bytes (1.5 MB) copied, 0.064286 seconds, 22.8 MB/s 2864+0 records in 2864+0 records out 1466368 bytes (1.5 MB) copied, 0.026308 seconds, 55.7 MB/s
The extracted kernel is gzip compressed. By running the "file netbsd" command, we see that the kernel is compressed:
netbsd: gzip compressed data, was "netbsd-INSTALL_G4U", from Unix
In order for the kernel to be used, we have to gunzip the file.
mv netbsd netbsd.gz gunzip netbsd.gz
Now we run the "file netbsd" command again, and we see the kernel is no longer compressed:
netbsd: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
Copy the "boot" and "netbsd" files into the /tftpboot directory. Make sure the file is world readable.
Complete
You should now be able to boot into G4U via PXE on your network. If you have errors, be sure to check /var/log/messages.
