Once mounted using TrueCrypt, cannot unmount

8,109

Solution 1

This looks indeed like a problem in Natty. A work-around exists by unmounting the mount point (usually a directory in /media/) and then pressing the Unmount button in TrueCrypt. An example of the umount command (sudo is required):

sudo umount /media/truecrypt1

After further investigation, it seems that a NTFS formatted container that was created in Windows is affected.

Output of file -s on the mounted stuff:

A 99MB volume formatted NTFS which is causing issues:

/dev/mapper/truecrypt1: x86 boot sector, code offset 0x52, OEM-ID "NTFS ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 1, dos < 4.0 BootSector (0x80)

A 99MB volume formatted FAT which works fine:

/dev/mapper/truecrypt1: x86 boot sector, code offset 0x3c, OEM-ID "MSDOS5.0", sectors/cluster 2, reserved sectors 36, Media descriptor 0xf8, heads 1, sectors 204288 (volumes > 32 MB) , FAT (32 bit), sectors/FAT 798, serial number 0xf30d2054, unlabeled The output for EXT* filesystems are similar.

Solution 2

There is some process(es) with file(s) on your encrypted container still opened.

You gave us too few info to help you with detailed instructions.

You should use fuser and lsof to catch the culprit.

EDIT:

if e.g. your TrueCrypt mount point is /media/truecrypt1 you should try:

fuser -mv /media/truecrypt1 or sudo fuser -mv /media/truecrypt1

and

lsof +c0 /media/truecrypt1 or sudo lsof +c0 /media/truecrypt1

Keep note of the offending PID and kill the process trying one of these commands:

kill PID
kill -9 PID
sudo kill PID
sudo kill -9 PID
Share:
8,109

Related videos on Youtube

zeiger
Author by

zeiger

Updated on September 18, 2022

Comments

  • zeiger
    zeiger over 1 year

    I have an external HDD and use TrueCrypt for keeping encrypted file containers. After mounting, whenever I try to dismount a file container (using TrueCrypt 7.0a on Ubuntu 11.04), it just does not happen and I get the following message:

    device-mapper: remove ioctl failed: Device or resource busy
    Command failed
    

    Further, if I close TrueCrypt and then try to start it again, it says that TrueCrypt is already running, but I cannot access it from the Unity sidebar (because it is not there).

    Also, if I power down my external HDD, the TrueCrypt volume still shows as one of the mounted volumes, but I cannot do anything with it.

    Any possible work around? I remember this NOT happening in earlier versions of Ubuntu so I am guessing there is something to do with 11.04.

    Thanks

    • Iradrian
      Iradrian almost 13 years
      I have the same problem with 10.10 and with a 100MB encrypted image file.
  • zeiger
    zeiger almost 13 years
    If I only mount it and then try to unmount it (without even accessing the mounted file system to add/remove files), it still does not work. Can you tell me how to use 'fuser' and 'lsof'?
  • Vanni Totaro
    Vanni Totaro almost 13 years
    @zeiger: I've just updated my answer with fuser and lsof usage info. Hope it helps. If it works please remember to upvote and accept :)
  • CodeExpress
    CodeExpress over 11 years
    +1 I wasn't able to dismount my tc partition and this helped. Thanks