Difference between revisions of "How to create ramdisk file"
| Line 22: | Line 22: | ||
http://lists.busybox.net/pipermail/busybox/2004-September/046827.html | http://lists.busybox.net/pipermail/busybox/2004-September/046827.html | ||
| + | |||
| + | http://www.vanemery.com/Linux/Ramdisk/ramdisk.html | ||
Latest revision as of 02:02, 17 June 2016
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