commit eb78c20706aea33a099f8e8fa4d84a3309aa6384
parent fc300fb8f65c930af3b2fea7389ad90c1f44d5b2
Author: Emmett1 <emmett1.2miligrams@gmail.com>
Date: Tue, 16 Jun 2020 17:38:54 +0800
Update README.md
Diffstat:
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
@@ -1,5 +1,5 @@
# mkinitrd
-`mkinitrd` is a simple initrd generator for linux system. It was based on LFS initramfs script but heavily modified. It does support livecd iso, check [guide here](https://github.com/emmett1/mkinitrd/wiki/Make-livecd-ISO) how to do it.
+`mkinitrd` is a simple initrd generator for linux system. It does support livecd iso, check [guide here](https://github.com/emmett1/mkinitrd/wiki/Make-livecd-ISO) how to do it.
## Install
Install it is simply running:
@@ -12,11 +12,27 @@ make DESTDIR=/some/path install
```
## Dependencies
-- cpio
+- cpio/libarchive
## Usage
-To generate initrd is simply running as root:
+run `mkinitrd -h` to view usage:
```
-# mkinitrd [kernel version]
+Usage:
+ mkinitrd [option] [argument]
+
+Options:
+ -k <version> custom kernel version (default: 5.4.44-Venom)
+ -o <output> custom output name (default: )
+ -i <init> custom init file (default: init)
+ -m <modules> add extra modules (comma separated)
+ -b <binaries add extra binary (comma separated)
+ -f <file> add extra file (comma separated & absolute path)
+ -c <config> use custom config (default: )
+ -A <hook> add extra hook (comma separated, precedence over -a, -s & HOOKS)
+ -a <hook> add extra hook (comma separated, precedence over -s & after HOOKS)
+ -s <hook> skip hook defined in HOOKS (comma separated)
+ -q quiet mode
+
```
-Use `kernel version` if generating initrd for not currently running kernel. By default it automatically detect kernel using `uname -r`. The initrd output is `/boot/initrd-<kernel version>.img`.
+## Configuration
+Its configuration is at `/etc/mkinitrd.conf`. You can specify additional binary, files, kernel modules and custom output name for the initrd.