Specifications

Remote Booting Linux on Intel Processors (CERN Variant)
Concurrent Technologies Page 15 of 30
“dos2unix /tftpboot/RamDiskFs/etc/init.d/rcN”
“chmod 755 /tftpboot/RamDiskFs/etc/init.d/rcN”
Cut and Paste the following and save it to “/tftpboot/RamDiskFs/etc/init.d/rcL”
#!/bin/sh
# This script will be executed after all the other initialisation scripts. You can
put your own initialisation stuff here
“dos2unix /tftpboot/RamDiskFs/etc/init.d/rcL”
“chmod 755 /tftpboot/RamDiskFs/etc/init.d/rcL”
9. Edit the “/tftpboot/RamDiskFs/etc/fstab” file to look like this,
/dev/ram / ext2 defaults 1 1
none /proc proc defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
10. The following few steps converts the file structure created in “/tftpboot/RamDiskFs” into a
RamDisk file for booting. Create an empty file system file,
“cd /root/netboot”
“dd if=/dev/zero of=rootfs bs=1k count=65536” #Initialises the file system to zero
“losetup /dev/loop0 rootfs” #Attach rootfs to the 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 rootfs file system file
11. Transfer the root file system created above into the mounted “rootfs” file system file,
“cp -a /tftpboot/RamDiskFs/* /mnt/loop”
12. Detach the root file system file,
“umount /mnt/loop”
“losetup -d /dev/loop0
13. Compress the root file system file,
“cd /root/netboot”
“gzip –9 rootfs“
14. The “rootfs.gz” file now contains a compressed root file system for the Client. 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”