LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-06-2009, 03:12 PM   #1
irairaira
LQ Newbie
 
Registered: Dec 2008
Posts: 6

Rep: Reputation: 0
Truecrypt encrypted USB drive on Linux


I have an Truecrypt encrypted USB thumb drive that works fine under Windows. I have successfully accessed files that were encrypted on other USB drives that were in standard FAT format.

The problem is that the encrypted drive is not seen by Linux (tried this on Ubuntu 8.10 and a Fedora 10 systems). The device /dev/sdb1 is mounted when I plug in a FAT formatted USB drive, but even that is not there when I plug in the encrypted USB drive.

Without a drive name to enter into the Truecrypt user interface, I can't decrypt and access the drive.

The question boils down to: How to access a non-FAT formatted USB device on Linux?

Thanks, Ira
 
Old 01-06-2009, 04:52 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware 14.1 (multilib) with kernel 3.13.2
Posts: 1,487
Blog Entries: 11

Rep: Reputation: 154Reputation: 154
Good question; I'm only guessing that the automounting under Ubuntu and Fedora assumes a FAT system; hence when you plug in a FAT system it's is mounted as /dev/sdb1.

These links might help:

http://www.howtoforge.com/truecrypt_data_encryption
http://www.movingtofreedom.org/2007/...ora-gnu-linux/

It looks like you have to look in /dev/mapper for the virtual volume; I haven't gotten around to using TrueCrypt under linux yet, so I can't help you further, but I suspect the command "truecrypt" has mount options..

Last edited by mostlyharmless; 01-06-2009 at 04:55 PM. Reason: added link
 
Old 01-06-2009, 07:30 PM   #3
jimbo1708
Member
 
Registered: Jan 2007
Location: Pennsylvania
Distribution: Ubuntu 8.10 Server/9.04 Desktop, openSUSE 11.1
Posts: 154

Rep: Reputation: 31
TrueCrypt has the ability to create a virtual filesystem that is simply a large file on any regular drive. I use this between linux and windows and it had worked very well for me.

- Jim
 
Old 01-06-2009, 07:50 PM   #4
irairaira
LQ Newbie
 
Registered: Dec 2008
Posts: 6

Original Poster
Rep: Reputation: 0
This problem appears to be my USB Thumb Drive

I "gave up" and went on a Windows system and reformatted my 8 GB Corsair USB drive and then created a 4 GB encrypted file on that drive.

Plugging this into my Ubuntu laptop I noticed that Linux didn't recognize the USB drive at all, even though it was a well formatted Windows drive.

I then remembered that I unsuccessfully tried to create a bootable Linux on this USB drive before and was unable to boot from on on a couple of desktop machines.

The problem appears to be a problem with the USB drive and non-Windows XP systems. Is the fact that it is > 4 GB the cause of the problem? Why can Windows see the drive but Linux (and some desktop Bios') can't?

Odd.

I will try the encrypted USB drive on another thumb drive and see what Linux does with that.
 
Old 01-06-2009, 09:46 PM   #5
irairaira
LQ Newbie
 
Registered: Dec 2008
Posts: 6

Original Poster
Rep: Reputation: 0
A Kingston 1GB USB drive works fine as an encrypted entire drive

So, the problem is either with the Corsair drive, or because it is an 8GB drive. It is the only USB drive that I have at the moment that is bigger than 1GB. So I can't tell the cause yet.

Has anyone else had problems with 8GB (or beyond) drives and Linux? Or with Corsair drives and Linux?
 
Old 01-07-2009, 08:23 AM   #6
jimbo1708
Member
 
Registered: Jan 2007
Location: Pennsylvania
Distribution: Ubuntu 8.10 Server/9.04 Desktop, openSUSE 11.1
Posts: 154

Rep: Reputation: 31
Quote:
Originally Posted by irairaira View Post
I "gave up" and went on a Windows system and reformatted my 8 GB Corsair USB drive and then created a 4 GB encrypted file on that drive.

Plugging this into my Ubuntu laptop I noticed that Linux didn't recognize the USB drive at all, even though it was a well formatted Windows drive.

I then remembered that I unsuccessfully tried to create a bootable Linux on this USB drive before and was unable to boot from on on a couple of desktop machines.

The problem appears to be a problem with the USB drive and non-Windows XP systems. Is the fact that it is > 4 GB the cause of the problem? Why can Windows see the drive but Linux (and some desktop Bios') can't?

Odd.

I will try the encrypted USB drive on another thumb drive and see what Linux does with that.
What filesystem did you use? NTFS or FAT?

- Jim
 
Old 01-08-2009, 01:08 AM   #7
irairaira
LQ Newbie
 
Registered: Dec 2008
Posts: 6

Original Poster
Rep: Reputation: 0
I used FAT32 formatting on XP

But, the format shouldn't make a difference as the drive itself wasn't even recognized as something plugged into the USB port.

XP doesn't seem to give me the option of NTFS formatting on the USB drive.
 
Old 01-08-2009, 01:46 AM   #8
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,013

Rep: Reputation: 83
I have used an 8GB memory stick on Linux before without any issues, although it wasn't a Corsair.

Have you checked that the Corsair drive is compatible with Linux?
 
Old 01-09-2009, 01:08 AM   #9
irairaira
LQ Newbie
 
Registered: Dec 2008
Posts: 6

Original Poster
Rep: Reputation: 0
The problem and fix is with the inq_timeout

The fix was to add:

echo 30 > /sys/module/scsi_mod/parameters/inq_timeout

in an rc startup script. (I placed mine in /etc/rc2.d/S99usb_inq_timeout.

Now the Corsair USB device can be seen by Linux and I can mount it or use Truecrypt to create/access a fully encrypted USB drive.

Some suggestions on the web included:

or in /etc/modprobe.conf

options usb_storage delay_use=20

That didn't work for me. (I didn't try 30, though.) Others also stated that the /etc/modprobe.conf fix didn't work for them either.

Ira

From the website: http://www.asktheramguy.com/v3/showthread.php?t=73036

See bugzilla #11640

Whenever you create multiple partitions or a non fat(32) file system in a partition on the stick the inquiry of the stick timeouts. The default linux timeout is set for 5 secs, and the stick takes 14.5 seconds. So if you set the timeout to 15 seconds or more, and reinsert the stick, the stick should be mountable and readable. Just remember to add this to your boot scripts, or repeat it every time you reboot the kernel.

The inquiry timeout can be set to 15 sec with the following command line:
Code:

echo 15 >/sys/module/scsi_mod/parameters/inq_timeout

Or if you prefer the grub command line is :
Code:

scsi_mod.inq_timeout=15

I hope this longer timeout will someday be standard for the kernel. Or maybe part of an exception list when a prolific 2528 stick is detected.
 
Old 01-09-2009, 01:09 AM   #10
irairaira
LQ Newbie
 
Registered: Dec 2008
Posts: 6

Original Poster
Rep: Reputation: 0
But, still can't boot from the Corsair drive

Probably due to the inq_timeout, but I don't know how to tell the BIOS to wait longer. That's OK, I will use other USB drives for my portable OS instantiations.
 
  


Reply

Tags
drive, encryption, truecrypt, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Encrypted Ubuntu with TrueCrypt penguinHugger Linux - General 5 12-19-2008 03:08 PM
LXer: Running Debian GNU/Linux from an encrypted USB drive LXer Syndicated Linux News 0 02-19-2008 11:11 AM
Encrypted Distributed Version Controlled ~home on a usb pen drive. cyent Linux - Software 0 01-27-2008 02:37 AM
Truecrypt on USB key drive, step by step help? Z038 Linux - General 1 07-04-2007 11:05 PM
Can't mount encrypted USB drive letrout Linux - General 1 02-08-2006 08:50 PM


All times are GMT -5. The time now is 11:11 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration