Commit 228469fa authored by segfault's avatar segfault

Ensure real mount/umount is used instead of busybox's

parent 4f049230
......@@ -13,6 +13,7 @@
+/bin/sh
+/bin/sleep
+/bin/systemctl
+/bin/umount
/lib/systemd/system/tails-remove-overlayfs-dirs.service
/lib/systemd/system-shutdown/tails
+/lib/systemd/systemd-shutdown
......
......@@ -14,38 +14,38 @@ set -x
sync
# Debugging
mount
/bin/mount
# Otherwise we can't drop caches.
# This may also help for tracking remaining mounts.
mount -o remount,rw /proc
/bin/mount -o remount,rw /proc
# Otherwise we can't create new mountpoints in /mnt
mount -o remount,rw /
/bin/mount -o remount,rw /
# Move /oldroot/* mountpoints out of the way
mkdir -p /mnt/live/squashfs
mount --move \
/bin/mount --move \
/oldroot/lib/live/mount/rootfs/filesystem.squashfs \
/mnt/live/squashfs
mkdir -p /mnt/live/medium
mount --move \
/bin/mount --move \
/oldroot/lib/live/mount/medium \
/mnt/live/medium
mkdir -p /mnt/live/dev
mount --move \
/bin/mount --move \
/oldroot/dev \
/mnt/live/dev
mkdir -p /mnt/live/run
mount --move \
/bin/mount --move \
/oldroot/run \
/mnt/live/run
# Finally, really unmount relevant filesystems
umount /oldroot
/bin/umount /oldroot
# Debugging
mount
/bin/mount
### Ensure any remaining disk cache is erased by Linux' memory poisoning
echo 3 > /proc/sys/vm/drop_caches
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment