Christian Faulhammer

und seine kleine Welt

  • Schrift vergrößern
  • Standard-Schriftgröße
  • Schriftgröße verkleinern
Home Archiv Gentoo Automount of LUKS-encrypted partitions

Automount of LUKS-encrypted partitions

E-Mail PDF

Something I would like to share, because it caused a bad headache for me. There are two external USB hard drives which I wanted to encrypt, one for not really essential data and one for backups. After following a German guide (there is an English version, which seems to be equivalent), one of the drives (brand new) got automounted, asking me for my passphrase, creating the device mapper node and mounting it as it should be. The other one worked by doing the manual steps on the command-line, but udev and Hal did not recognise it properly as LUKS-encrypted. So after some investigation I found the culprit in the cryptsetup udev rules, where the blkid program failed to identify the encrypted partition. After some head scratching, I stumbled upon a blog post by a util-linux hacker, which described the wipefs tool, introduced in util-linux 2.17. It wipes some faulty left-overs of mkfs, which confuses some programs like blkid. Now everything is fine for both external drives.

Kommentare

avatar suka
0
 
 
Hmmm... Which desktop are you using? With current GNOME (2.28+) encrypting an external drive is just a question of right click on the device in Nautilus, selecting "format" and choosing one of the encrypted options in the dialog ;-) (if you want more options or use another desktop you can use gnome-disk-util ity for all that) Very easy and works absolutely reliable for me, connecting the drive opens a password dialog, after entering it the encrypted partition is automounted...
B
i
u
Quote
Code
List
List item
URL
Name *
URL
Code   
ChronoComments by Joomla Professional Solutions
Kommentar abschicken
Abbrechen
avatar Christian Faulhammer
0
 
 
It will fail nonetheless if there are stray strings in the partition table from a broken mkfs implementation as it will prevent detection (even for Gnome) through Hal and udev. I use thunar-volman
B
i
u
Quote
Code
List
List item
URL
Name *
URL
Code   
ChronoComments by Joomla Professional Solutions
Kommentar abschicken
Abbrechen
avatar
0
 
 
as far as i know gnome-disk-util uses the devicekit framework. its not based on hal
B
i
u
Quote
Code
List
List item
URL
Name *
URL
Code   
ChronoComments by Joomla Professional Solutions
Kommentar abschicken
Abbrechen
avatar Christian Faulhammer
0
 
 
And does it use udev? I am sure it does:

IMPORT{program}="/sbin/blkid -o udev -p $tempnode"

is the problem in /etc/udev/rules.d/64-device-mapper.rules
B
i
u
Quote
Code
List
List item
URL
Name *
URL
Code   
ChronoComments by Joomla Professional Solutions
Kommentar abschicken
Abbrechen
avatar Martin
0
 
 
I can't say for sure, but probably this video will help as well - http://www.tubehome.com/watch/how-to-encrypt- your-hard-drive . Please let me know if it did.
B
i
u
Quote
Code
List
List item
URL
Name *
URL
Code   
ChronoComments by Joomla Professional Solutions
Kommentar abschicken
Abbrechen
B
i
u
Quote
Code
List
List item
URL
Name *
URL
Code   
ChronoComments by Joomla Professional Solutions
Kommentar abschicken