3 ms·
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 m
by jschwartzi 8y ago
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.
- voltagex_ 8y agoDoes anyone know why CPIO is used in particular? The commands for dealing with those archives are particularly arcane.
- JdeBP 8y agoFor dealing with cpio archives, just use pax. * http://netbsd.gw.com/cgi-bin/man-cgi?pax http://netbsd.gw.com/cgi-bin/man-cgi?pax * https://manpages.debian.org/unstable/pax/pax.1.en.html https://manpages.debian.org/unstable/pax/pax.1.en.html * http://pubs.opengroup.org/onlinepubs/9699919799/ http://pubs.opengroup.org/onlinepubs/9699919799/ The answer to Why? is given in the kernel doco itself, in Documentation/filesystems/ramfs-rootfs-initramfs.txt .
- vetinari 8y agoBecause it is simple, much simpler than tar, and has an universally agreed serialization format, without variants, unlike tar.