Why cpio rather than tar?
This decision was made back in December, 2001. The discussion started
And spawned a second thread (specifically on tar vs cpio), starting
The quick and dirty summary version (which is no substitute for
reading the above threads) is:
1) cpio is a standard. It's decades old (from the AT&T days), and
already widely used on Linux (inside RPM, Red Hat's device driver
disks). Here's a Linux Journal article about it from 1996:
It's not as popular as tar because the traditional cpio command
line tools require _truly_hideous_ command line arguments. But
that says nothing either way about the archive format, and there
are alternative tools, such as:
2) The cpio archive format chosen by the kernel is simpler and cleaner
(and thus easier to create and parse) than any of the (literally
dozens of) various tar archive formats. The complete initramfs
archive format is explained in buffer-format.txt, created in
usr/gen_init_cpio.c, and extracted in init/initramfs.c. All three
together come to less than 26k total of human-readable text.
3) The GNU project standardizing on tar is approximately as relevant
as Windows standardizing on zip. Linux is not part of either, and
is free to make its own technical decisions.
4) Since this is a kernel internal format, it could easily have been
something brand new. The kernel provides its own tools to create and
extract this format anyway. Using an existing standard was
preferable, but not essential.
5) Al Viro made the decision (quote: "tar is ugly as hell and not
going to be supported on the kernel side"):
explained his reasoning:
and, most importantly, designed and implemented the initramfs code.