
59
# Display the routing table
route -n
# Mount what will become the root filesystem
mount -t nfs -o nolock,rsize=8192,wsize=8192,hard,intr ${NFSDIR} /mnt
# We don't need these anymore, and they will get remounted later, anyway
umount /dev/pts
umount /proc
# Switch the mount points - the NFS mounted FS will become /
cd /mnt
pivot_root . initrd
# Mount all
mount –a
echo 256 > /proc/sys/kernel/real-root-dev
# Return, and init on the newly mounted filesystem will continue
# the boot process.
7.4.4 Building the Ramdisk Image
First, build a blank ramdisk image. In this example, we use 16MB. If additional software is
required, the ramdisk image may need to be larger.
# dd if=/dev/zero of=${PXEROOT}/initrd.img bs=1024K count=16
Next, format the ramdisk:
# mke2fs -F -m0 -b 1024 ${PXEROOT}/initrd.img
Then, mount it and copy the data to it:
# mkdir /mnt/initrd/
# mount -o loop ${PXEROOT}/initrd.img /mnt/initrd/
# tar cvf - ${INITRD} |( cd /mnt/initrd/; tar xvfp - )
Lastly, unmount it and compress it:
# umount /mnt/initrd/
# gzip -9 ${PXEROOT}/initrd.img
7.5 Installing and Configuring a DHCP Server
A DHCP (Dynamic Host Configuration Protocol) server is required on your network. There
are HOWTOs covering installation and configuration at the following web site (
dhcpd
also
comes with most distributions).
http://www.tldp.org/HOWTO/DHCP/index.html
We recommend that you ensure that your external firewall blocks port 67 and 68 for both
UDP and TCP since DHCP has no security.