1MKFS.CRAMFS(8) System Administration MKFS.CRAMFS(8)
2
3
4
6 mkfs.cramfs - make compressed ROM file system
7
9 mkfs.cramfs [options] directory file
10
12 Files on cramfs file systems are zlib-compressed one page at a time to
13 allow random read access. The metadata is not compressed, but is
14 expressed in a terse representation that is more space-efficient than
15 conventional file systems.
16
17 The file system is intentionally read-only to simplify its design;
18 random write access for compressed files is difficult to implement.
19 cramfs ships with a utility (mkcramfs(8)) to pack files into new cramfs
20 images.
21
22 File sizes are limited to less than 16 MB.
23
24 Maximum file system size is a little under 272 MB. (The last file on
25 the file system must begin before the 256 MB block, but can extend past
26 it.)
27
29 The directory is simply the root of the directory tree that we want to
30 generate a compressed filesystem out of.
31
32 The file will contain the cram file system, which later can be mounted.
33
35 -v
36 Enable verbose messaging.
37
38 -E
39 Treat all warnings as errors, which are reflected as command exit
40 status.
41
42 -b blocksize
43 Use defined block size, which has to be divisible by page size.
44
45 -e edition
46 Use defined file system edition number in superblock.
47
48 -N big, little, host
49 Use defined endianness. Value defaults to host.
50
51 -i file
52 Insert a file to cramfs file system.
53
54 -n name
55 Set name of the cramfs file system.
56
57 -p
58 Pad by 512 bytes for boot code.
59
60 -s
61 This option is ignored. Originally the -s turned on directory entry
62 sorting.
63
64 -z
65 Make explicit holes.
66
67 -l[=mode]
68 Use exclusive BSD lock for device or file it operates. The optional
69 argument mode can be yes, no (or 1 and 0) or nonblock. If the mode
70 argument is omitted, it defaults to "yes". This option overwrites
71 environment variable $LOCK_BLOCK_DEVICE. The default is not to use
72 any lock at all, but it’s recommended to avoid collisions with
73 udevd or other tools.
74
75 -h, --help
76 Display help text and exit.
77
78 -V, --version
79 Print version and exit.
80
82 0
83 success
84
85 8
86 operation error, such as unable to allocate memory
87
89 fsck.cramfs(8), mount(8)
90
92 For bug reports, use the issue tracker at
93 https://github.com/util-linux/util-linux/issues.
94
96 The mkfs.cramfs command is part of the util-linux package which can be
97 downloaded from Linux Kernel Archive
98 <https://www.kernel.org/pub/linux/utils/util-linux/>.
99
100
101
102util-linux 2.39.2 2023-06-14 MKFS.CRAMFS(8)