Sortix main manual
This manual documents Sortix main. You can instead view this document in the latest official manual.
NAME
mkinitrd — make initialization ramdiskSYNOPSIS
mkinitrd | [--filter=rules-file] [--format=format] [--manifest=manifest-file] -o destination directory ... |
DESCRIPTION
mkinitrd produces a initrd(7) for the Sortix kernel(7) at the destination. It is an archive in the <sortix/initrd.h> format of files and directories.- --filter=rule-file
- Include only files and directories during the recursive search that matches rules in the rule-file in the format specified under FILTER RULES.
- --format=format
- Produce the archive in the specified format. This is for forward compatibility and only sortix-initrd-2 is supported. default is an alias for the newest format sortix-initrd-2. mkinitrd will default to a newer format when one is introduced and this allows mkinitrd to support old callers during the transitional period.
- --manifest=manifest-file
- Include only files and directories during the recursive search whose path exactly matches a line in the manifest-file.
- -o, --output=destination
- Store the produced initrd(7) at the specified destination.
FILTER RULES
The rule format is line based and leading whitespace is skipped. Lines starting with a#
character are ignored as comments. The first word on a line must be one of the following commands and the rest of the line is its parameter. Trailing whitespace is not ignored.- default boolean
- The boolean parameter is either true or false and determines whether a file or directory is included if no other rules match it. This defaults to true.
- include path
- Include the file or directory if it matches path.
- exclude path
- Exclude the file or directory if it matches path.
EXIT STATUS
mkinitrd will exit 0 on success and non-zero otherwise.EXAMPLES
# By default include everything except these directories: exclude /dev exclude /src/sysroot exclude /tmp
BUGS
The path pattern matching should be upgraded to use fnmatch(3). The initrd format does not losslessly represent the Sortixstruct stat
.