Specifications
Remote Booting Linux on Intel Processors (CERN Variant)
Concurrent Technologies Page 25 of 30
ifconfig lo 127.0.0.1
ifconfig lo up
# Start portmap
/sbin/portmap
# Configure Ethernet port and mount home file system through udhcpd and scipts
for p in 0 1
do
echo udhcpc attempting to configure eth$p
udhcpc -n -i eth$p -s /etc/udhcpc/sample.script 2&> /dev/null
done
# Updating /etc/fstab file system
if [ -f /home/.fstab.global ]
then
echo Updating /etc/fstab with /home/.fstab.global
cat /home/.fstab.global >> /etc/fstab
fi
if [ -f /home/.fstab.local ]
then
echo Updating /etc/fstab with /home/.fstab.local
cat /home/.fstab.local >> /etc/fstab
fi
# Save files before overlaying nfs mounts on the ramdisk
cp /etc/hosts /hosts # Save hosts file
cp /etc/fstab /fstab
# Mount remote filesystems
echo Mounting remote file systems
mount -an
# Restore files
cp /hosts /etc/hosts
cp /fstab /etc/fstab
# Restore /etc/mtab
mt=`cat /proc/mounts | wc -l`;let mt-=2;tail -n $mt /proc/mounts > /etc/mtab
• “dos2unix /tftpboot/ClientRamDisk/etc/init.d/rcN”
• “chmod 755 tftpboot/ClientRamDisk/etc/init.d/rcN”
13. Edit the “/tftpboot/ClientRamDisk/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
14. 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