You are not logged in.

#1 2010-08-24 14:39:09

Registered: 2010-03-29
Posts: 38

truecrypt in Script correct UUID/devname


Since I am using truecrypt for my backup-disk, I still have one thing in my script, that bothers me a bit. I mount my volume with the following command:

truecrypt /dev/sdb2 $TARGET

where $TARGET is a mount point, for example /media/backup

OK, this works nice, but you see at once, that I get a problem as soon as my external disk is plugged in after another usb-stick, because my backup-device would be /dev/sdc2 for example.

I don't want to do the mapping with an udev-rule, because I don't want to mount my backup-partition everytime I plug that hard disk in. So I need to somehow explore another name for my device. Correct me if I'm wrong, but afiak I can't use an UUID for a truecrypt-partition as long as it isn't mounted. And here is where my knowledge stops. Any ideas?



#2 2010-08-24 15:26:24

From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858

Re: truecrypt in Script correct UUID/devname

If UUID or labels won't work, there's also /dev/disk/by-{id,path}.


#3 2013-04-17 21:25:26

Registered: 2012-02-11
Posts: 15

Re: truecrypt in Script correct UUID/devname

Here's the solution I found today, incase others stumble on this thread looking for an answer, too...

Use gpt instead of msdos partition scheme. Package is gptfdisk; command is gdisk (works like fdisk). gpt partition headers include a label, and udev will put symlinks in /dev/disk/by-partlabel/

GPT ain't new, so this solution would have worked 2 years ago, too. wink

Last edited by bobpaul (2013-04-17 21:25:42)


Board footer

Powered by FluxBB