- Shell 100%
| src | ||
| .SRCINFO | ||
| LICENSE | ||
| liveroot-snix.install | ||
| PKGBUILD | ||
| README.md | ||
| VERSION | ||
liveroot-snix
Initcpio hooks for non-persistent boot. A fork of liveroot with ZFS support, improved compression options, and a cleaner codebase.
How it works
At boot, liveroot intercepts the root mount and overlays it with a RAM-backed device, so all writes go to RAM instead of disk. The original disk is never modified during the session.
Modes
| Kernel cmdline | Description |
|---|---|
oroot=raw |
tmpfs overlay — no compression, fastest |
oroot=compressed |
zram overlay with compression |
oroot=live |
full copy of root into zram — slowest boot, fastest runtime |
Installation
Install via the PKGBUILD:
makepkg -si
Setup
-
Add to
MODULESin/etc/mkinitcpio.conf:MODULES=(zram ext4 overlay) -
Add
oroottoHOOKSin/etc/mkinitcpio.conf— afterudev, and afterzfsif using ZFS:HOOKS=(base udev zfs oroot ...) -
Add the desired mode to your bootloader kernel cmdline:
oroot=compressed -
Rebuild the initramfs:
mkinitcpio -P
Configuration
Edit /etc/liveroot.conf to set defaults:
# compression algorithm for oroot=compressed and oroot=live
# valid: lzo lzo-rle lz4 lz4hc zstd deflate 842
OROOT_ALGO=zstd
# fstab entries to keep active when using oroot=live
# exact match: /home
# prefix match: /home* (matches /home, /home/user, ...)
# / is always kept regardless of this setting
OROOT_FSTAB_KEEP="/"
Any option can be overridden per-boot on the kernel cmdline:
oroot=compressed oroot_algo=lz4
ZFS
liveroot-snix supports ZFS root out of the box. Use the standard root=ZFS=pool/dataset syntax on the kernel cmdline. The zfs hook must appear before oroot in the HOOKS array.
Differences from upstream
- ZFS root support
- Replaced LZO compression with zstd (configurable)
- Replaced ext2 with ext4 (no journal) on zram devices
- Configurable per
/etc/liveroot.confwith per-boot cmdline overrides - fstab entries are automatically commented out in
oroot=livemode to prevent systemd from remounting datasets from disk - Removed
overlay_flushscript - Removed
compilerscript