Files
Nimux/rootfs-overlay/usr/lib/nimux/nimux-early-mount.xsh
2025-10-11 19:19:58 +02:00

24 lines
601 B
Plaintext
Executable File

#!/bin/xonsh --no-rc
# Nimux Early Mount (xonsh)
#mount /mnt
print("mount /mnt")
/bin/mount /mnt
# mount root on future accesable place
print("re-mount rootfs")
/bin/mkdir -p /mnt/rootfs
/bin/mount --bind / /mnt/rootfs
/bin/mount --make-rprivate /mnt/rootfs/
# import zpool
print("import zpool")
/sbin/zpool import nimux-zfs
# overlay etc and home with a persistant zfs dataset
print("overlay mount etc")
/bin/unionfs -o cow,nonempty /mnt/rootfs.overlay/etc=RW:/mnt/rootfs/etc=RO /etc
print("overlay mount home")
/bin/unionfs -o cow,nonempty /mnt/rootfs.overlay/home=RW:/mnt/rootfs/home=RO /home