Hi Aleksey, Yes, I think this is the same problem. This fix requires changing two files, one in the initrd.gz, one in the main filesystem. Fortunately you can make this second change in the casper-rw filesystem, so there's no need to rebuild filesystem.squashfs ..
The first _is_ a bit of a pain because it means unpacking and repacking the initrd. The quick and dirty way to do that (i.e., as root), is to copy the initrd.gz to /tmp and do something like (untested): cd /tmp gunzip initrd.gz mkdir ird cd ird cpio -i <../initrd patch scripts/casper <<EOM diff -Nur casper-1.152.orig/scripts/casper casper-1.152/scripts/casper --- casper-1.152.orig/scripts/casper 2008-10-25 23:46:45.000000000 +0100 +++ casper-1.152/scripts/casper 2009-04-03 00:57:25.000000000 +0100 @@ -396,6 +396,8 @@ mount -t ${cow_fstype} -o ${cow_mountopt} ${cowdevice} /cow || panic "Can not mount $cowdevice on /cow" mount -t ${UNIONFS} -o noatime,dirs=/cow=rw:$rofsstring ${UNIONFS} "$rootmnt" || panic "${UNIONFS} mount failed" + [ -d "${rootmnt}/cow" ] || mkdir "${rootmnt}/cow" + mount /cow "${rootmnt}/cow" -o move # Adding other custom mounts if [ -n "${PERSISTENT}" ]; then @@ -592,3 +594,5 @@ exec 2>&7 7>&- cp casper.log "${rootmnt}/var/log/" } + +# vi:ts=4:et: EOM find | cpio -H newc -o >../newird cd .. gzip newird And then overwrite the initrd.gz on your live USB/CD with the generated 'newird.gz'. The second file is easier, boot the live CD/USB with persistence enabled and then (as root) do: patch /etc/init.d/casper <<EOM diff -Nur casper-1.152.orig/debian/casper.init casper-1.152/debian/casper.init --- casper-1.152.orig/debian/casper.init 2008-10-25 23:46:45.000000000 +0100 +++ casper-1.152/debian/casper.init 2009-04-10 14:49:09.000000000 +0100 @@ -75,6 +75,17 @@ prompt= fi + # remount cow ro + OPTS=`grep '^aufs / aufs ' /proc/mounts | awk '{print $4}'` + if [ -n "$OPTS" ]; then + OPTS=`echo "$OPTS" | sed -e 's/xino=.*,/noxino,/' -e \ + 's/cow=rw/cow=ro/' -e 's/^rw/ro/'` + mount / -no remount,$OPTS + mount /cow -no remount,ro + sync # you'd think mount would do this .. + sleep 5 # could probably get away with less + fi + for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default $(which stty); do cache_path "$path" done @@ -113,3 +124,5 @@ exit 3 ;; esac + +# vi:ts=4:et: EOM I've not yet tested this fix with jaunty, but it seemed to work for me with intrepid. -- casper-rw fs not cleanly unmounted on persistent live USB shutdown https://bugs.launchpad.net/bugs/125702 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs