Am 26.08.2011 07:49, schrieb Gerardo Exequiel Pozzi:
On 08/24/2011 08:23 PM, Gerardo Exequiel Pozzi wrote:
STATUS: Works for standard boot and with cow_device :) TODO: Testing needed for archiso_loop_mnt and archiso_pxe_nbd Also for copytoram=y, and mix of options/hooks. NEEDS: This commit [#2] in initscripts to work (no release at this time). Also this other [#3] for mkinitcpio (fix /run that is mounted as noexec)
This hook is based on work from Tom Gundersen[#1], but adapted for archiso things.
Motivation for this is for unmount property all filesystem, mostly for dm-snapshot persistent.
[#1] http://mailman.archlinux.org/pipermail/arch-projects/2011-July/001549.html
[#2] http://projects.archlinux.org/initscripts.git/commit/?id=1fa7b4b453e96533ae1...
[#3] http://mailman.archlinux.org/pipermail/arch-projects/2011-August/001749.html
+ +# Lazy unmount /oldroot and all things inside. +umount -l /oldroot + +# Remove all dm-snapshot devices. +dmsetup remove_all + +# Detach each loop device in reverse order (archiso start from 100 to N). +for _lup in $(ls -r /dev/loop???); do + losetup -d ${_lup} +done +
@Thomas: If you do not want lazy unmount, then these are the commands needed.
Looks good to me. I am not against lazy umount in principle, if you have a way of making sure that the umount finished.