Specifications
Remote Booting Linux on Intel Processors (CERN Variant)
Concurrent Technologies Page 17 of 30
• “dd if=/dev/zero of=rootfs bs=1k count=65536” Initialises the file system to zero
• “losetup /dev/loop0 rootfs” Attach rootfs to loop device
• “mkfs.ext2 -F -i 2000 rootfs” Create an EXT2 file system
• “mkdir /mnt/loop” Make a mount directory
• “mount –o loop rootfs /mnt/loop” Mount the root file system file
6. Transfer the root file system created in the NFS section above into the mounted root file
system file,
• “cp -a /tftpboot/RamDiskFs/* /mnt/loop”
7. Detach the root file system file,
• “umount /mnt/loop”
• “losetup -d /dev/loop0“
8. Compress the root file system file,
• “cd /root/netboot”
• “gzip –9 rootfs“
9. The “rootfs.gz” file now contains a compressed image of part of the root file system for the
Client and the “fstabs” file informs Linux to mount the other directories via NFS, “/usr” in
this case. The next step is to create an Etherboot boot image to boot the Client.
How to create an Etherboot Image
• Type either “mknbi-linux --rootdir=/dev/ram bzImage rootfs.gz > LinuxBootImage.nbi”
• Or if you are using a board without a VGA adapter, or simply wish to use a serial console
then type this command instead, “mknbi-linux --rootdir=/dev/ram --
append=”console=ttyS0,9600” bzImage rootfs.gz > LinuxBootImage.nbi”
• Copy the image to the TFTP directorty “cp LinuxBootImage.nbi /tftpboot”
How to create a PXE Image
• Ensure the PXELINUX configuration files “/tftpboot/pxelinux.cfg/C04354AB” and
“/tftpboot/pxelinux.cfg/C04354AB” have the correct “APPEND initrd=rootfs.gz
root=/dev/ram rw” statement.
• “cp /root/netboot/bzImage /tftpboot/”
• “cp /root/netboot/rootfs.gz /tftpboot/”
10. Reboot the client machine. It should execute a BOOTP or DHCPD request, TFTP the boot
image, and start the Linux kernel mounting its root file system from RamDisk and mount /usr
and /home from the Server with NFS.
Ramdisk and NFS example for multiple configurable servers and clients
1. In this example we take the concepts introduced in the above sections and extend them further
into a practical example. Below we describe a system that has one or more Server boards
serving an Etherboot image to one or more Client boards. We describe how a single
Etherboot image can be served to multiple clients, with each client sharing a common NFS
root file system together with its own local root file system, and each client being fully
configurable with its own unique NFS home file system and command scripts. For the
purpose of this example we will consider only one Server in the system, with two Client
boards. The client systems are based entirely on the Red Hat server system and so will share