Rebuilding the Full Ramdisk Image
The following steps describe the procedure to build the ramdisk for the target.
NOTE: It is recommended to perform these commands with root permissions, as it would be easier to manage special files, such as device nodes.
Create an empty directory where the file-system will be mounted:
host $ mkdir -p $HOME/ramdisk
Create an empty image file:
host $ dd if=/dev/zero of=ramdisk_file bs=40M count=1
Format the image with ext2 files-system
host $ mkfs.ext2 ramdisk_file You may see warning message like the following. Enter "y" to continue mke2fs 1.35 (28-Feb-2004) <ramdisk_file> is not a block special device Proceed anyway? (y,n) y
Mount the filesystem image to be populated with files:
host $ sudo mount -o loop ramdisk_file $HOME/ramdisk
Now the filesystem can be populated with the required files. Untar the filesystem component archives as described in section Rebuilding NFS image
Now the filesystem is ready and can be saved for mounting on the target
host $ sudo umount $HOME/ramdisk host $ gzip ramdisk_file