X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Fcasper;h=bb8a7ee06002528d5b0b86b41d70e932506a4c35;hb=05639e973f8720543712bff9782600127f10226b;hp=3e7db03b90ef79aeeaf83724beebf6a96f52d4fe;hpb=5d98c0a23826c3ee194980c782ebbb2787df4c68;p=live-boot-grml.git diff --git a/scripts/casper b/scripts/casper index 3e7db03..bb8a7ee 100644 --- a/scripts/casper +++ b/scripts/casper @@ -91,7 +91,7 @@ setup_loop() { local pattern=$3 modprobe -Qb "$module" - udevplug -W + udevsettle for loopdev in $pattern; do if [ "$(cat $loopdev/size)" -eq 0 ]; then @@ -189,8 +189,9 @@ setup_unionfs() { rootmnt="$2" modprobe -Qb unionfs - croot="" # Should really be /casper, but run-init doesn't handle - # mount-points in subdirectories at all + # run-init can't deal with this, but we're going to move all of these + # away before it runs anyway. + croot="/casper" # Let's just mount the read-only file systems first mkdir -p "${croot}" @@ -232,9 +233,8 @@ setup_unionfs() { mount -t unionfs -o dirs=/cow=rw:$rofsstring unionfs "$rootmnt" for d in $(mount -t squashfs | cut -d\ -f 3); do - mkdir -p "${rootmnt}/casper/${d}" - mount -o bind "${d}" "${rootmnt}/${d}" - umount "${d}" + mkdir -p "${rootmnt}/casper/${d##*/}" + mount -o move "${d}" "${rootmnt}/casper/${d##*/}" done if grep -q show-cow /proc/cmdline; then