Initcpio hooks for non persistent boot
Find a file
2026-05-07 10:29:07 +02:00
src update 2026-05-07 10:29:07 +02:00
.SRCINFO update 2026-05-05 19:33:00 +02:00
LICENSE update 2026-05-05 18:40:29 +02:00
liveroot-snix.install update 2026-05-05 19:33:00 +02:00
PKGBUILD update 2026-05-06 20:28:34 +02:00
README.md update 2026-05-05 18:43:10 +02:00
VERSION update 2026-05-05 19:01:15 +02:00

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

  1. Add to MODULES in /etc/mkinitcpio.conf:

    MODULES=(zram ext4 overlay)
    
  2. Add oroot to HOOKS in /etc/mkinitcpio.conf — after udev, and after zfs if using ZFS:

    HOOKS=(base udev zfs oroot ...)
    
  3. Add the desired mode to your bootloader kernel cmdline:

    oroot=compressed
    
  4. 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.conf with per-boot cmdline overrides
  • fstab entries are automatically commented out in oroot=live mode to prevent systemd from remounting datasets from disk
  • Removed overlay_flush script
  • Removed compiler script