Skip to content

Instantly share code, notes, and snippets.

View kele6ra's full-sized avatar

Andrei Auchynnikau kele6ra

View GitHub Profile
@kele6ra
kele6ra / ro-root.sh
Created May 13, 2026 07:37 — forked from emsi/ro-root.sh
A scrip to replace the default RPi init to create and chroot to an overlayfs-backed root
#!/bin/sh
# Read-only Root-FS for Raspian using overlayfs
# Version 1.2:
# Don't mount ro/rw root inside newroot
# Don't remove root from ftab
# Move dev & proc to newroot and redirect execed chrooted subshell console to newroot's dev
# Version 1.1:
# Changed to use /proc/mounts rathern than /etc/fstab for deriving the root filesystem.
#