Specifications
Remote Booting Linux on Intel Processors (CERN Variant)
Concurrent Technologies Page 24 of 30
• Edit the “exec” line in the file “/tftpboot/ClientRamDisk/etc/udhcpc/sample.script” to
read, “exec /etc/udhcpc/sample.$1”
• “chmod 755 /tftpboot/ClientRamDiskFs/etc/udhcpc/sample.script”
11. In this example the client hostname and the client home directory information supplied by the
DHCP server will be used to set the client’s hostname, update the “/etc/hosts” file, and mount
the client’s home directory on “/home”. Append the following lines to the
“/tftpboot/ClientRamDisk/etc/udhcpc/sample.bound” file to perform these operations.
# Add client to hosts file and set hostname
if [ -n "$hostname" ]
then
# Set hostname
/bin/hostname ${hostname}
if [ -n "$domain" ]
then
echo $ip $hostname $hostname.$domain >> /etc/hosts
else
echo $ip $hostname >> /etc/hosts
fi
fi
# Mounting Home File System
if [ -n "$message" ]
then
echo Mounting home directory $message
mount -t nfs -o nolock $message /home
fi
12. After the DHCP client has configured the network interface and mounted the home directory,
the common and local root file systems are mounted. Create the following to perform these
operations.
• “mkdir /tftpboot/ClientRamDisk/etc/init.d”
• Cut and Paste the following and save to the file “/tftpboot/ClientRamDisk/etc/init.d/rcI”
#!/bin/sh
# Run /etc/init.d/rcN
/etc/init.d/rcN
# Tell init to reload the /etc/initab file
/sbin/init q
• “dos2unix /tftpboot/ClientRamDisk/etc/init.d.d/rcI”
• “chmod 755 /tftpboot/ClientRamDisk/etc/init.d/rcI”
• Cut and Paste the following and save it to “/tftpboot/ClientRamDisk/etc/init.d/rcN”
#!/bin/sh
mount -t proc proc /proc
mount -o remount -t ext2 /dev/ram /
# Bring up loop device