We saw earlier in the section Creating a boot initramfs that the kernel has an option to create initramfs using a device table. Device tables are really useful because they allow a non-root user to create device nodes and to allocate arbitrary UID and GID values to any file or directory. The same concept has been applied to tools that create other filesystem image formats, as shown in this table:
Filesystem format | Tool |
jffs2 | mkfs.jffs2 |
ubifs | mkfs.ubifs |
ext2 | genext2fs |
We will look at jffs2 and ubifs in Chapter 7, Creating a Storage Strategy, when we look at filesystems for flash memory. The third, ext2, is a format commonly used for managed flash memory, including SD cards. The example that follows uses ext2 to create a disk image that can be copied to an SD card.
They each take a device table file with the format <...