Specifications
Remote Booting Linux on Intel Processors (CERN Variant)
Concurrent Technologies Page 14 of 30
• “cd /root/BusyBox/udhcp-0.9.8”
• “make” #Make the client and server
• “cp udhcpc /tftpboot/RamDiskFs/sbin” #Install the client
• “mkdir /tftpboot/RamDiskFs/etc/udhcpc” #Make client script directory
• “cp -a samples/* /tftpboot/RamDiskFs/etc/udhcpc” #Install client scripts
• Edit the “exec” line in the file “/tftpboot/RamDiskFs/etc/udhcpc/sample.script” to read,
“exec /etc/udhcpc/sample.$1”
• “chmod 755 /tftpboot/RamDiskFs/etc/udhcpc/sample.script”
7. The first program the Linux kernel calls is “/sbin/init”. The standard “/sbin/init” function
will look for the “/etc/inittab” script to tell it what actions to perform. This is where the Linux
system configuration files are usually run from, and could readily contain a call to a script that
runs your application, for example. There is a basic “inittab” file in the BusyBox directory
that sets up some terminals after the kernel has booted. Copy the script to the RamDiskFs
directory, “cp /root/BusyBox/busybox-0.60.5/scripts/inittab /tftpboot/RamDiskFs/etc/”. Now
modify the following lines in the “/tftpboot/RamDiskFs/etc/inittab” file,
Add the following lines under the existing :sysinit: line,
::sysinit:/etc/init.d/rcN
::sysinit:/etc/init.d/rcL
Comment out the following two lines,
# tty4::respawn:/sbin/getty 38400 tty5
# tty5::respawn:/sbin/getty 38400 tty6
8. Three resource files are called from “/tftpboot/RamDiskFs/etc/inittab”. The “rcS” script
mounts the file systems the “rcN” script initialises the network device(s) and the “rcL” script
executes local user command. Creating these files by,
• “cd /tftpboot/RamDiskFs/etc/”
• “mkdir init.d”
• Cut and Paste the following and save it to “/tftpboot/RamDiskFs/etc/init.d/rcS”
#!/bin/sh
# Create the mtab file, and remount file systems
echo -n > /etc/mtab
mount -o remount –t ext2 /dev/ram /
mount -t proc proc /proc
# Start system loggers
klogd
syslogd
# Put any other system initialisation stuff here
• “dos2unix /tftpboot/RamDiskFs/etc/init.d/rcS”
• “chmod 755 /tftpboot/RamDiskFs/etc/init.d/rcS”
• Cut and Paste the following and save it to “/tftpboot/RamDiskFs/etc/init.d/rcN”
#!/bin/sh
ifconfig lo
udhcpc -i eth0 -s /etc/udhcpc/sample.script