English
Ask Your Question
0

tcplay: USB clean unmount

asked 2011-11-18 21:02:11 +0000

Mohan G gravatar image

updated 2011-11-19 01:00:17 +0000

Hi, I am using "tcplay" to encrypt my USB. I am able to map, mount and unmount the encrypted partition. But I think unmount is no clean.

When I insert my USB for the 1st time, it is under /dev/sdb, I mapped, mounted and unmounted it. 2nd time when I inserted it, USB gets detected as /dev/sdc. This continues as /dev/sdd, /dev/sde and so on. I even tried removing the map files (/dev/mapper/truecryptX) which were created previously. But no luck. When I restart my PC, this starts from /dev/sdb.

There is absolutely no problem when use a normal (unencrypted) USB.

How can overcome this problem ?

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2011-11-24 03:42:12 +0000

Mohan G gravatar image

updated 2011-11-25 11:09:05 +0000

I finally got my issue solved. I had to remove (unmapping) the map files (/dev/mapper/truecryptX) using cryptsetup, i.e., "cryptsetup remove truecryptX". Previously I was not unmapping but, just removing the map files using "rm" command.

In the tcplay man pages, the process of mapping and mounting is explained but nothing is mentioned about unmapping and unmounting. And being a beginner in using encrypted partitions, I knew nothing about this.

Anyhow thanks to both of you, for trying to help me.

edit flag offensive delete link more
0

answered 2011-11-21 10:03:13 +0000

While it might indeed indicate a problem with tcplay, it's safer and more resilient to use UUIDs to identify drives (especially removable). To get what is UUID of your encrypted drive, put it into USB slot and run blkid. Example output:

# blkid 
/dev/sda1: UUID="899b91ab-2c23-4ee3-b5d0-b53919e1d192" TYPE="ext4" 
/dev/sda2: UUID="xfxKg0-xE1h-OF5m-CxpF-jjNv-oVWt-YgGzUO" TYPE="LVM2_member" 
/dev/sda5: UUID="MKZ7BS-AJjm-LfCW-RDQS-k9eH-WD7x-4POh5W" TYPE="LVM2_member" 
/dev/mapper/vg_fedora-lv_swap: UUID="adcab3d7-967b-42d3-8ca8-4840bb0959b5" TYPE="swap" 
/dev/mapper/vg_fedora-lv_root: UUID="a6167631-1e31-4496-a89d-333155c2028b" TYPE="ext4" 
/dev/mapper/vg_fedora-lv_home: UUID="7a07fbbd-7eec-4897-bcd4-4614c5b0028b" TYPE="ext4" 
/dev/mapper/vg_fedora-data: UUID="2655240f-ef82-4eee-9ef1-fcbb7217165c" TYPE="ext4"
/dev/sdc: UUID="94372b90-1427-11e1-95ab-2b823b8cf22f" TYPE="ext4"

Let's say /dev/sdc is our drive. Then to configure /etc/fstab properly for changing device names I'd have to add following line into /etc/fstab:

UUID="94372b90-1427-11e1-95ab-2b823b8cf22f" /mnt/external_drive defaults 0 0

Obviously change the options suitable for your drive. But basically it all boils down to: Don't use device names, but rather UUIDs. They are unique and stable for each device.

edit flag offensive delete link more
0

answered 2011-11-21 09:46:55 +0000

mether gravatar image

Perhaps you should report a bug against tcplay in bugzilla.

edit flag offensive delete link more

Comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Stats

Asked: 2011-11-18 21:02:11 +0000

Seen: 1,980 times

Last updated: Nov 25 '11