topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 7:43 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: tiny thing to help angry truecrypt users ;)  (Read 6610 times)

m4rkiz

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
IDEA: tiny thing to help angry truecrypt users ;)
« on: April 21, 2009, 11:59 AM »
when mountingencrypted partition with truecrypt i have to use \Device\HarddiskX\PartitionX path

but there is a known problem with windows disk numbers - they are not always the same http://support.micro....com/kb/937251/en-us
so basically if i have three hdds there is no way to tell if partition i want to mount will be

\Device\Harddisk0\Partition1, \Device\Harddisk1\Partition1 or \Device\Harddisk2\Partition1

therefore i cant connect \device\harddisk paths to correct drive letters

what i come with so far is:

1. i can have list of disks and their serial numbers with some utils for ex. diskid32.exe http://www.winsim.com/diskid32/diskid32.html

2. to make it more clear lets do: diskid32.exe | findstr /C:"STORAGE_DEVICE_DESCRIPTOR" /C:"Serial Number ="

output is:

**** STORAGE_DEVICE_DESCRIPTOR for drive 0 **** Serial Number = [S13PJ90QA46513]
**** STORAGE_DEVICE_DESCRIPTOR for drive 1 **** Serial Number = [S13PJ9BQC04227]
**** STORAGE_DEVICE_DESCRIPTOR for drive 2 **** Serial Number = [S13PJ1KQ600179]

or simply:

drive 0  = [S13PJ90QA4X513]
drive 1  = [S13PJ9BQC04X27]
drive 2  = [S13PJ1KQ60X179]

command to actually mount a partition is

TrueCrypt.exe /V \Device\Harddisk S13PJ90QA4X513 \Partition1 /L D

where
/V is volume
/L is drive letter

but instead of \Device\Harddisk S13PJ90QA4X513 \Partition1

\Device\Harddisk0\Partition1 should be used

so, so far at every boot i need to create list of hhds numbers & serial numbers and replace serial numbers with disk numbers in my batch file that mounts partitions
it is working for me, but it have to be some way to combine everything (diskid32, findstr, sed, my own batch) to something simpler that will work for all the people

http://forums.truecrypt.org/viewtopic.php?t=15714

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: tiny thing to help angry truecrypt users ;)
« Reply #1 on: April 21, 2009, 12:04 PM »
this seems like a good idea.

can i clarify: a solution to your problem would be a commandline tool that took as input a serial number and returned the hard drive number, is that right?

m4rkiz

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: IDEA: tiny thing to help angry truecrypt users ;)
« Reply #2 on: April 21, 2009, 01:07 PM »
this seems like a good idea.

can i clarify: a solution to your problem would be a commandline tool that took as input a serial number and returned the hard drive number, is that right?

exactly, making some batch file with mount commands would be really easy with something like that

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: tiny thing to help angry truecrypt users ;)
« Reply #3 on: April 21, 2009, 01:17 PM »
seems like something easy to do, i'll bet someone codes it in the next few days.. let's see..

m4rkiz

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: IDEA: tiny thing to help angry truecrypt users ;)
« Reply #4 on: April 21, 2009, 02:13 PM »
to make it even more easy (for truecrypt users, not for programmers;) perfect tool would do that:

c:\tool.exe mount.bat

1. get serial numbers of all hdds in the system (linked to disk numbers)
2. make copy of mount.bat to temp_mount.bat (overwrite if exist)
3. search temp_mount.bat for disk serial numbers and replace them with disc number
4. run temp_mount.bat
5. quit

ad. 1 http://www.codeproje...cpp/DriveInfoEx.aspx

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: IDEA: tiny thing to help angry truecrypt users ;)
« Reply #5 on: April 21, 2009, 07:11 PM »
Sounds like a very very nice idea - I'm a bit annoyed that I have to manually select the correct partition every time I mount my encrypted USB drive.

Instead of focusing on batch files and stuff, the tool should probably be a bit more "integrated", allowing you to list currently attached devices, set up rules for them (wanted drive letter, which partition to use), perhaps referring to a disk by a "friendly name" etc.
- carpe noctem

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: IDEA: tiny thing to help angry truecrypt users ;)
« Reply #6 on: April 21, 2009, 08:45 PM »
apologies if I'm talking out of turn here (I don't use TrueCrypt so I'm not altogether sure I understand the issue) but do you use drive labels?

this could be a useful tag for identifying drives and partitions as they don't change

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: IDEA: tiny thing to help angry truecrypt users ;)
« Reply #7 on: April 22, 2009, 06:36 AM »
Aren't drive labels stored as part of the NTFS Volume Information? That won't work when using truecrypt to encrypt the partition :)
- carpe noctem

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: IDEA: tiny thing to help angry truecrypt users ;)
« Reply #8 on: April 22, 2009, 05:29 PM »
sorry, I have no idea

just seems like they could be a potential tag to identify the necessary volume(s)