Boots into initramfs then switch_root

This commit is contained in:
2026-03-26 09:00:28 +08:00
parent 8acf025a9d
commit 215eb0dc75
11 changed files with 173 additions and 32 deletions

View File

@@ -1,3 +1,7 @@
PARTLABEL=config /opt/monok8s/config vfat defaults,noatime 0 0
PARTLABEL=data /data ext4 defaults,noatime 0 21
/data/var /var none rbind,noatime 0 0
PARTLABEL=config /opt/monok8s/config vfat defaults,noatime 0 0
PARTLABEL=data /data ext4 rw,noatime,nodiratime 0 0
/data/var /var none rbind 0 0
tmpfs /run tmpfs defaults,nosuid,nodev,mode=0755 0 0
tmpfs /tmp tmpfs defaults,nosuid,nodev,noexec,mode=1777 0 0

View File

@@ -0,0 +1,16 @@
#!/sbin/openrc-run
description="Keep root filesystem read-only for immutable boot"
depend()
{
after clock
need fsck
keyword -docker -podman -jail -lxc -openvz -prefix -systemd-nspawn -vserver -wsl
}
start()
{
ebegin "Keeping root filesystem read-only"
eend 0
}