
57
7.4.3 Populating the Ramdisk
Create an initrd directory structure to be used for the ramdisk. For this example, the initrd
directory structure is shown below:
# ls ${INITRD}
bin ccore dev etc linuxrc mnt modules proc sbin share var
Copy the BusyBox files:
# cp -a ${BUSYBOX}/_install/bin/* ${INITRD}/bin
# cp -a ${BUSYBOX}/_install/sbin/* ${INITRD}/sbin
Copy
insmod
from
modutils
:
# cp ${MODUTILS}/insmod/insmod.static ${INITRD}/bin/insmod
Copy the firmware and loading tools:
# cp ${AMSO1100}/verbatim/fw/boot ${INITRD}/ccore/ccos.boot
# cp ${AMSO1100}/verbatim/release/fw/boot_image ${INITRD}/ccore/ccos.bin
# cp ${AMSO1100}/verbatim/release/fw/boot_image_start \
${INITRD}/ccore/ccos.bin_start
Copy the
AMSO1100
host device driver. This driver module must be built against the kernel
that will be PXE booted.
# cp ${AMSO1100}/software/host/linux/sys/devccil/obj_\
`uname -r`_release/ccil.o ${INITRD}/modules/net/
Depending on your kernel configuration, you may need to copy additional drivers to the
ramdisk. These drivers can be found in
/lib/modules/`uname -r`/kernel/
With most RedHat installations we needed drivers to support NFS. The modules we needed
were
sunrpc.{o,ko}
,
lockd.{o,ko}
, and
nfs.{o,ko}
. They should be installed in
${INITRD}/modules/net/.
With most SuSE installations we needed drivers for Raw Socket support. The module we
needed was
af_packet.{o,ko}
. This module is installed in
${INITRD}/modules/net/.
Edit
${INITRD}/linuxrc
accordingly (see below for some detail).
Example 1 [for RHEL 3, 2.4.21-15.ELsmp]:
# load the drivers
insmod /modules/net/sunrpc.o
insmod /modules/net/lockd.o
insmod /modules/net/nfs.o
insmod /modules/net/ccil.o
Example 2 [for SuSE 9, 2.4.21-102-smp]:
# load the drivers
insmod /modules/net/af_packet.o