bdisk/extra/pre-build.d/usr/lib/initcpio/hooks/livecd

14 lines
456 B
Bash

# vim: set ft=sh:
run_cleanuphook () {
msg ":: Mounting OverlayFS on / with tmpfs=rw, ${root}=ro ..."
modprobe overlay
echo "Now attempting overlay mount..."
mkdir -p /new_root.hw /overlay /overlay-rw
mount --move /new_root /new_root.hw
mount -t overlay overlay -olowerdir=/new_root.hw,upperdir=/overlay,workdir=/overlay-rw,noatime /new_root
pkill -9 dropbear #kill SSH (in preparation for the live system starting ssh on port 22
}