bdisk/extra/pre-build.d/usr/lib/initcpio/hooks/livecd
2015-01-30 20:38:42 -05:00

16 lines
466 B
Bash

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