I have /usr/portage mounted on a loop device (see http://forums.gentoo.org/viewtopic.php?p=445092&highlight=#445092) and on every (occasional) reboot a get several error messages while trying to umount it. Poking around, I found the solution, at least for me, so please audit this patch and probably include it in the next release of the sys-apps/baselayout ... I use the marked stable sys-apps/baselayout-1.8.6.8-r1 at the moment.
Created attachment 15796 [details, diff] Patch for /etc/init.d/halt.sh For me this works, but please test it on other platforms.
Comment on attachment 15796 [details, diff] Patch for /etc/init.d/halt.sh Ooops... Seems that |sort -r is needed when you have several mounts on in onother...
Created attachment 15798 [details, diff] Instead of umounting /dev/loop0, /dev/loop1 etc umount what it points to Fixed my own patch not to remove the pipe to sort -r
Fixed in CVS, thanks.