An initramfs generator used in NULL GNU/Linux and Redrose GNU/Linux written in C++.
- nullinitrd is broken with NVMe drives
Clone the repo:
git clone https://github.com/NULL-GNU-Linux/nullinitrd --depth 1
cd nullinitrdBuild:
make defconfig
# make menuconfig
makeInstall:
sudo make installAs always, the DESTDIR and PREFIX enviroment variables are supported.
We have a script to create a bootable system with nullinitrd.
sh tests/test_system.sh path-to-kernelSimply run:
nullinitrdThe config.default file has the file written to the configuration file
during install.
| Option | Default | Description |
|---|---|---|
COMPRESSION |
zstd |
Compression algorithm to use. Supported: zstd, gzip, xz, lz4, bzip2, lzma, none |
ROOTFS_TYPE |
ext4 |
Filesystem type to use when mounting root. |
INIT_PATH |
/sbin/init |
Path to the init binary (NOT the initramfs init.) |
AUTODETECT_MODULES |
n |
Automatically detect and include kernel modules. |
MODULES |
empty | Additional kernel modules to include (space-separated). |
HOOKS |
keyboard |
Hooks to run during initramfs creation. |
FEATURE_LVM |
n |
Include LVM support. |
FEATURE_LUKS |
n |
Include LUKS support. |
FEATURE_MDADM |
n |
Include MDADM support. |
FEATURE_BTRFS |
n |
Include Btrfs support. |
FEATURE_ZFS |
n |
Include ZFS support. |
| Parameter | Description |
|---|---|
root= |
Root device (e.g., /dev/sda1, UUID=..., PARTUUID=..., LABEL=...) |
rootfstype= |
Root filesystem type |
rootflags= |
Mount flags for root |
rootdelay= |
Seconds to wait before mounting root |
init= |
Path to init on root filesystem |
rw |
Mount root read-write |
ro |
Mount root read-only |
rd.debug |
Enable verbose initramfs output |
initrd.debug |
Alias for rd.debug |
rd.modules= |
Additional modules to load (comma-separated) |
Run make menuconfig or edit .config:
| Option | Description |
|---|---|
CONFIG_STATIC=y |
Static linking |
CONFIG_DEBUG=y |
Debug build |
CONFIG_LTO=y |
Link-time optimization |
Custom hooks can be placed in {/etc,/usr/[local]/share}/nullinitrd/hooks/ and enabled via the HOOKS config option.
To create a hook template:
nullinitrd hook-template my-hookRun:
make tgz-pkgCreates a tgz with a dir called stage with the files to install and a README.
Car .tar.zst
Run:
make car-pkg