 |
 |
 |
 |
| Security and Privacy Sadly, malware, spyware, hackers and privacy threats abound in today's world. Let's be paranoid and secure our penguins, and slam the doors on privacy exploits. |

2nd September 2012, 08:10 AM
|
|
Registered User
|
|
Join Date: Sep 2012
Location: Boulogne-Billancourt, France
Posts: 7

|
|
|
problem mounting encrypted drive on different PC
About a month or so I encrypted my 1TB drive.
I have a SSD that the OS, Fedora 17, is installed on, but I also have a HDD, this 1TB drive that I encrypted.
Everything was going fine. The 1TB wouldn't be mounted at boot time, but if I wanted to look at files on the 1TB drive, I'd go into the File Manager, click on the drive (I called it "Scorpio", because it's a WD Scorpio Blue), and the system would ask me for the password. I'd type that in, and then it would ask me for the Administrator password, to mount the drive.
Did it 50 times or so. Never any problem. Worked great.
And then, last week, I had a hardware problem on that PC. Some problem in the motherboard. The machine won't even boot up. But I'm confident that it had nothing to do with the 1TB drive.
So I installed Fedora 17 (exact same version, same DVD) on a second PC. That works fine too. But I wanted to get back my data on the encrypted drive. So I put it into an a small external USB 2 box.
I hooked that up to the second PC, and when I click on that drive it asks me for the password, just like in the past. I type that in, no problem. But then it tells me:
Error mounting /dev/dm-2 at /run/media/david/SCORPIO2: Command-line `mount -t "ext4" -o "uhelper=udisks2,nodev,nosuid" "/dev/dm-2" "/run/media/david/SCORPIO2"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/mapper/luks-27b3c2eb-461b-43b4-8ae7-8cc7e89bd8e2,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
When I type "dmesg | tail", I see:
[39383.104029] EXT4-fs (dm-2): bad geometry: block count 244190134 exceeds size of device (244190133 blocks)
Anybody have an ideas ? I'd be more than 99% sure that there's no hardware issue with the drive. The drive is fine, I'm quite sure. The issue is configuration.
Thanks for any help anybody can suggest.
|

5th September 2012, 07:55 PM
|
|
Registered User
|
|
Join Date: Sep 2012
Location: Boulogne-Billancourt, France
Posts: 7

|
|
|
Re: problem mounting encrypted drive on different PC
This turned out to be something interesting, at least for me.
I have spent at least 3 or 4 hours, maybe 5 or 6 hours, during the last 3 or 4 days, trying to figure out what the issue was. Not that the data on the drive was super important. I have other back-ups for most of it, but just the idea that I should not have faith in LUKS... the encryption could deny me access to my data, even if I knew the password, this was scary.
Finally I came along this:
http://forums.whirlpool.net.au/archive/1810877
For me, the interesting sentence was: "So for some reason, the Vantec underreports the disk size by
1,081,856 bytes".
The idea that an external enclosure could falsely report the disk size, its "geometry", that was very interesting.
So I took the disk that was giving me trouble out of the external enclosure, and mounted it directly in the PC, directly to the motherboard ... voila ... everything works perfect ! :-)
It was the external enclosure that was the entire problem. Not that it wouldn't work fine in other situations, but just a disk formatted elsewhere, and then put in it, that's a huge issue for that enclosure.
|

6th September 2012, 02:40 PM
|
|
Registered User
|
|
Join Date: Sep 2012
Location: Boulogne-Billancourt, France
Posts: 7

|
|
|
Re: problem mounting encrypted drive on different PC
Just a final note on this subject ... for future reference.
As it was, I had another HDD, a second "Western Digital Scorpio Blue", that was not encrypted.
I was thinking that if the encrypted "Western Digital Scorpio Blue" would have "bad geometry" in the USB external box, then the other, non-encrypted "Western Digital Scorpio Blue" would have "bad geometry" too.
Everything about their situations was the same, except that one was LUKS excrypted, and the other wasn't.
And the last surprise was that the that non-encrypted drive ran fine in the external USB box.
So my earlier comment, that it was all the fault of the external box, that's now very doubtful.
There must be several "layers" to the story. The HDD, the USB driver, and the way the encrypted drive is decrpyted.
And it's all a bit "over my head" in terms of understanding where the problem was. All I know for sure is that I put the encrypted drive into the second main PC case, directly connected to the motherboard, via the direct SATA connection, as it had been in the first PC, and it went back to working great.
Where as the non-encrypted drive ran fine, everywhere.
|

6th September 2012, 09:03 PM
|
|
Official Gnome 3 Sales Rep. (and Adminstrator)
|
|
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,704

|
|
|
Re: problem mounting encrypted drive on different PC
The unencrypted drive might run fine until the file-system actually tries to access the "missing" sectors. I don't know where LUKS keeps its headers, but if it puts some at the end of the volume, it could have been caught out.
|

7th September 2012, 06:21 AM
|
|
Registered User
|
|
Join Date: Sep 2012
Location: Boulogne-Billancourt, France
Posts: 7

|
|
|
Re: problem mounting encrypted drive on different PC
Quote:
Originally Posted by Gareth Jones
The unencrypted drive might run fine until the file-system actually tries to access the "missing" sectors. I don't know where LUKS keeps its headers, but if it puts some at the end of the volume, it could have been caught out.
|
I wonder if I wouldn't have had the problem if I hadn't formatted 100% of the disk as one 1TB partition.
As I mentioned in the first message, the message I was getting was:
[39383.104029] EXT4-fs (dm-2): bad geometry: block count 244190134 exceeds size of device (244190133 blocks)
That is to say, I was getting into trouble over 1 "block".
Maybe the mount command was looking at the partition table and seeing it was 244190134 blocks, and saying to itself that was strange because it was also being told by the hardware that the device was 244190133 blocks.
But if the partition table was only 244190100 blocks, it wouldn't have balked about mounting the disk.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 21:18 (Monday, 20-05-2013)
|
|
 |
 |
 |
 |
|
|