Initcpio hooks for non persistent boot
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
sam e32ba075ef build: pick the highest version tag, not the newest one
The tags API returns tags newest-first by date, so taking the first
element meant a tag added later on an older branch, or a moving name
like stable, would win over the highest version. Filter to the
v<number> form and sort by version instead.

Requesting 50 tags rather than 1: that is the per-page maximum this
Forgejo returns whatever limit is asked for, so a repository with more
than 50 version tags would need paging.
2026-09-02 15:57:10 +02:00
src update 2026-05-07 10:29:07 +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 build: pick the highest version tag, not the newest one 2026-09-02 15:57:10 +02:00
README.md update 2026-05-05 18:43:10 +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