Closed redhog closed 9 months ago
Hi! Thanks for your PR! I really appreciate this!
Just some remarks:
Thanks!
There are many ways to build such a ramdisk, as it's just a filesystem image. For squashfs, you
cd filesystemtree; mksquashfs ./ ../myimage.squashfs -Xcompression-level 9
For ext3 etc, you'd have to make an empty file of the right size, then run mkfs.ext3 myimage.ext3
, then mount -o loop myimage.ext3 /mnt; cp -a filesystemtree/* /mnt; umount /mnt
.
So pretty straight forward to make (but what files to put in it is entirely up to the user, if you want to use it as a root disk, obviously you'd need to use buildroot or something).
Added some docs on the ramdisk usage, including explaining why this uses pmem over initrd/initramdisk.
Support an arbitrarily sized ramdisk using PMEM kernel driver.
Why not initrd? Because initrd and initramdisk have size limitations, for larger disks, it gets stuck loading the disk (probably copying and extracting the entire disk at boot). PMEM containing a normal filesystem, such as ext3 or squashfs can store an arbitrary number of files with no performance penalty at boot or when just accessing a small number of them.