https://github.com/poscat0x04/mkinitcpio-sd-zfs
https://github.com/poscat0x04/mkinitcpio-sd-zfs
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/poscat0x04/mkinitcpio-sd-zfs
- Owner: poscat0x04
- License: cc0-1.0
- Created: 2025-03-04T09:58:46.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-09-25T00:23:42.000Z (9 months ago)
- Last Synced: 2025-10-26T02:58:43.579Z (8 months ago)
- Language: Shell
- Size: 10.7 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mkinitcpio-sd-zfs
A mkinitcpio hook for booting zfs-on-root systems with systemd based initrd
See `help()` in `sd-zfs.initcpio.install` for usage.
## dev notes
- `sd-zfs.initcpio.install` file consumed by mkinitcpio.
- `zfs-root-generator` is the entry point when booting the initrd.
It reads the cmdline and injects a few systemd units
and unit overrides that changes the boot process to
1. import zfs pools
2. mount the zfs root dataset
See `systemd.generators(7)` for more information.
- `zfs-set-env` is a helper script that sets the
environment variable needed by `sysroot.mount`
- `zfs.shutdown` is a simple script that goes in
`/usr/lib/systemd/system-shutdown/` that is
executed by `/usr/lib/systemd/system-shutdown`
on shutdown which exports all zfs pools.
- `parse-cmdline` is a helper awk script that
parses the kernel command line. Code should be
pretty self evident with the comments.