How to create ramdisk file
Revision as of 17:47, 15 June 2016 by 142.90.148.3 (talk)
Create the file. Replace filesize with 1024xsize:
dd if=/dev/zero of=initrdfs bs=1k count=filesize
Make a file system:
mke2fs -N 1024 initrdfs
Create a mount directory as root:
mkdir /mnt/initrdfs
Mount filesystem as root:
mount -o loop initrdfs /mnt/initrdfs
Copy needed files to /mnt/initrdfs
Umount it and compress:
umount /mnt/initrdfs gzip -9c initrdfs > initrd.img
Now you have a functional ramdisk.
Source: http://lists.busybox.net/pipermail/busybox/2004-September/046827.html