2014-12-19 14:13:30 -05:00
|
|
|
# vim: set ft=sh:
|
|
|
|
|
|
|
|
run_cleanuphook () {
|
2015-01-30 20:38:42 -05:00
|
|
|
msg ":: Mounting OverlayFS on / with tmpfs=rw, ${root}=ro ..."
|
|
|
|
modprobe overlay
|
2014-12-19 14:13:30 -05:00
|
|
|
|
2015-02-01 01:48:51 -05:00
|
|
|
echo "Now attempting overlay mount..."
|
2014-12-19 14:13:30 -05:00
|
|
|
|
2015-02-04 19:56:39 -05:00
|
|
|
mkdir -p /new_root.hw /overlay /overlay-rw
|
2014-12-19 14:13:30 -05:00
|
|
|
mount --move /new_root /new_root.hw
|
2015-02-04 19:56:39 -05:00
|
|
|
mount -t overlay overlay -olowerdir=/new_root.hw,upperdir=/overlay,workdir=/overlay-rw,noatime /new_root
|
2014-12-19 14:13:30 -05:00
|
|
|
pkill -9 dropbear #kill SSH (in preparation for the live system starting ssh on port 22
|
|
|
|
}
|