Hacker News new | past | comments | ask | show | jobs | submit login

Yes. I have a systemd-based embedded system that uses initramfs so that I can execute some things out of RAM when I need to erase the root filesystem. The old mechanism was initrd which was an ext2 filesystem that was baked into the kernel. The new system, initramfs uses a CPIO archive instead. But it's basically the same idea.



Does anyone know why CPIO is used in particular? The commands for dealing with those archives are particularly arcane.


For dealing with cpio archives, just use pax.

* http://netbsd.gw.com/cgi-bin/man-cgi?pax

* https://manpages.debian.org/unstable/pax/pax.1.en.html

* http://pubs.opengroup.org/onlinepubs/9699919799/

The answer to Why? is given in the kernel doco itself, in Documentation/filesystems/ramfs-rootfs-initramfs.txt .


Because it is simple, much simpler than tar, and has an universally agreed serialization format, without variants, unlike tar.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: