[Fedora-livecd-list] /var/tmp/imgcreate-* : Can't umount
Mads Kiilerich
mads at kiilerich.com
Mon Sep 27 12:59:54 UTC 2010
>> I get:
>>
>> loop: can't delete device /dev/loop0: Device or resource busy
>
> Yes, you won't be able to delete the loop device until after you've
> successfully umounted, because the install root is mounted via the
> loopback device. When you've managed to umount everything, the losetup
> -d should succeed.
I usually use
for x in $(cat /proc/mounts |grep ' /var/tmp/.'|cut -d' ' -f2|tac); do
umount $x; done
for l in $(losetup -a|cut -d: -f1); do losetup -d $l; done
It will fail for mounts and loppbacks still in use, but running it twice
usually resolves all the dependency chains I have.
(There was a similar issue also involving crypt/dm chains when shutting
down the live os. See https://bugzilla.redhat.com/show_bug.cgi?id=519155
- I'm not sure if that still is an issue.)
/Mads
More information about the livecd
mailing list