diff options
author | Daniel Baumann <daniel@debian.org> | 2012-09-26 13:48:59 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-09-26 14:08:15 +0200 |
commit | 5fdc7f1fd20cee26443879022c1e6a3d0377a2b3 (patch) | |
tree | 0ccfd75d0dc7d2da41ab1776f1edbcb32434e83c /scripts | |
parent | 2d6f480a16a5af6d8a1599716ca8d859b1e69ee4 (diff) | |
download | live-boot-5fdc7f1fd20cee26443879022c1e6a3d0377a2b3.tar.gz live-boot-5fdc7f1fd20cee26443879022c1e6a3d0377a2b3.zip |
Exposing rofs and persistence mounts under /live in the live systems, not just initramfs only (Closes: #687099).
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/boot/9990-overlay.sh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/scripts/boot/9990-overlay.sh b/scripts/boot/9990-overlay.sh index 597ff50..9318f9b 100755 --- a/scripts/boot/9990-overlay.sh +++ b/scripts/boot/9990-overlay.sh @@ -405,8 +405,26 @@ setup_unionfs () done fi + # make /root/live writable for moving filesystems mkdir -p "${rootmnt}/live" - mount -o move /live "${rootmnt}/live" >/dev/null 2>&1 || mount -o bind /live "${rootmnt}/live" || log_warning_msg "Unable to move or bind /live to ${rootmnt}/live" + mount -t tmpfs tmpfs "${rootmnt}/live" + + # move all mountpoints to root filesystem + for _DIRECTORY in rofs persistence + do + if [ -d "/live/${_DIRECTORY}" ] + then + mkdir -p "${rootmnt}/live/${_DIRECTORY}" + + for _MOUNT in $(ls /live/${_DIRECTORY}) + do + mkdir -p "${rootmnt}/live/${_DIRECTORY}/${_MOUNT}" + mount -o move "/live/${_DIRECTORY}/${_MOUNT}" "${rootmnt}/live/${_DIRECTORY}/${_MOUNT}" > /dev/null 2>&1 || \ + mount -o bind "/live/${_DIRECTORY}/${_MOUNT}" "${rootmnt}/live/${_DIRECTORY}/${_MOUNT}" || \ + log_warning_msg "W: failed to mount /live/${_DIRECTORY}/${_MOUNT} to ${rootmnt}/live/${_DIRECTORY}/${_MOUNT}" + done + fi + done # shows cow fs on /overlay (FIXME: do we still need/want this? probably yes) mkdir -p "${rootmnt}/live/overlay" |