mount-media-chroot 495 Bytes
Newer Older
1 2 3 4
#!/bin/bash
# This script runs on the live media, ie. outside of the chroot environment.

# debian-live ensures that this is always at the same place, so we can just bind-mount it
5
MEDIA="/run/live/medium"
6 7 8 9 10 11 12 13

# More tricky, we need to figure out where calamares left us the chroot.
# This seems to work reliably in all tested cases.
CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")

mkdir -p $CHROOT/media/installer
mount --bind $MEDIA $CHROOT/media/installer