Skip to content

Instantly share code, notes, and snippets.

@NoteAfterNote
NoteAfterNote / note-after-note-2025-april-7-tar-archive-mkfs-ext4-filesystem.md
Last active April 14, 2025 07:11
Using a tar archive with "mkfs.ext4 -d" to populate the ext4 filesystem

NoteAfterNote-11
Using a tar archive with "mkfs.ext4 -d" to populate the ext4 filesystem
Published: April 7, 2025
Link: https://gist.github.com/NoteAfterNote/65a139ce70cbf27c4875aaaee0e779cc


Here's the description for "-d root-directory|tarball" from the mkfs.ext4 man page:

"Copy the contents of the given directory or tarball into the root directory of the file system. Tarball input is only available if mke2fs was compiled with libarchive support enabled and if the libarchive shared library is available at run-time. The special value "-" will read a tarball from standard input."

Termux: Enable Wake-Lock