LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-25-2010, 04:23 PM   #1
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Rep: Reputation: 242Reputation: 242Reputation: 242
LUKS decryption fails in Dolphin


Hi everyone,

I've just did a fresh Slackware 13.1 install on a 32-bit box for friends of mine. It's an older machine with an AMD Athlon XP 2500. Generally everything works just fine, with one exception, however.

Connecting a LUKS encrypted USB harddisk is notified by KDE. Clicking on the device icon in Dolphin opens the dialog asking for the LUKS passphrase. No error message appears, but the file system is not opened and mounted, anyway.
However, before another attempt I have to "remove" the device in Dolphin.
Output of dmesg:
Code:
# Nov 25 23:58:24 mycomputer kernel: device-mapper: ioctl: unable to remove open device temporary-cryptsetup-3023

On the other hand, on the CLI everything works just find. I connect the USB device, look at the output of dmesg to find out the device name assigned to the USB device, and use cryptsetup to decrypt the filesystem on the device:

Code:
# cryptsetup luksOpen /dev/hdc1 usbluks
<isssue LUKS passphrase on request/>
# mount /dev/mapper/usbluks /media/memory0
This works, but there is no icon for the decrypted filesystem in Dolphin.

The USB device can be decrypted in KDE on my other computers, a relatively young desktop running Slackware64-13.1 and an old laptop (Pentium III 650 MHz) running Slackware-13.1.

As my friends are not "computer-literate" I want to make things as easy as possible for them. Therefore it would be essential, that the decrypting works in Dolphin, too.

Does anyone have an idea, what could be wrong?

Thanks a lot in advance!

gargamel

Last edited by gargamel; 11-25-2010 at 05:03 PM.
 
Old 11-25-2010, 05:04 PM   #2
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
The move to udev-enabled LVM2 broke this, and I don't know how to fix it. There's a patch from one of the RH guys that I added to the last hal rebuild in the -current tree, but the problem still isn't fixed. It seems to be some sort of race somewhere, because it work sometimes, especially with some devices -- for example, my MMC card with a LUKS container works great *every* time, while a usb thumb drive almost never works (it's worked *once* during the time I was trying to debug all this). Basically, HAL development is dead, so troubleshooting from that side isn't going to happen. Feel free to open a bug with the KDE folks, but I doubt that will go anywhere either since 4.6 is targeting udisks from all of the device management.
 
Old 11-26-2010, 10:19 AM   #3
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Original Poster
Rep: Reputation: 242Reputation: 242Reputation: 242
Thanks for the reply. In my environment, it doesn't seem to be dependant on the USB device, but on the machine. The problem persists on one machine for ALL USB devices, but on two others everything works just fine --- no problem with THE VERY SAME USB devices, there.

As KDE 4.6 should arrive early next year, I think, I can wait for that, hoping it is solved by then.

Thanks again!

gargamel

Last edited by gargamel; 11-26-2010 at 11:15 PM.
 
Old 11-27-2010, 09:16 AM   #4
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Original Poster
Rep: Reputation: 242Reputation: 242Reputation: 242
Quote:
Originally Posted by rworkman View Post
The move to udev-enabled LVM2 broke this, [...]
Reading your post again, I have one question for understanding. How can it be, that this affects KDE / Dolphin, but not the CLI?

My understanding up to now was, that udev and LVM2 and HAL were used by the system indepently of the environment (Fluxbox, KDE, CLI, Xfce, ...), and that the difference between the environments only was, how they "pick up" the signals from the systems and process them with or without explicit user interaction to add more comfort or allow more control.

gargamel
 
Old 11-27-2010, 02:54 PM   #5
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
There are temporary devices created during the LUKS/LVM 'bring-up' process, and hal isn't (always) ignoring them as it's supposed to do, and this (is|seems to be) confusing the desktop environments. That's what the one of the hal patches in the last rebuild was supposed to address, but it doesn't seem to be complete.
 
Old 11-27-2010, 03:50 PM   #6
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Original Poster
Rep: Reputation: 242Reputation: 242Reputation: 242
Thanks!
It's still weird, that it happens ALWAYS on one of three machines (AMD Athlon XP 2500), here, but NEVER on two others not on my quite up-to-date desktop/server (Intel Core 2 Duo) and not on my very old laptop (Intel Pentium III 650 MHz).

Hmmm. The machine, where I have this problem has a Tekram DC 395 SCSI controller and a Yamaha CD-RW SCSI drive fitted. No SCSI on the other machines. And all other components (mainboard, CPU, etc.) were used in another machine with (E)IDE only setup with no problem. Would you think, that the SCSI devices cause a race condition somehow?
I am asking, because apart from the age of the components, this is the only obvious major difference between the affected machine and the other two...

I guess, I'll remove the SCSI devices and give it another try, as soon as I have time. I'll report back!

gargamel

Last edited by gargamel; 11-27-2010 at 03:51 PM.
 
Old 11-28-2010, 04:56 AM   #7
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Original Poster
Rep: Reputation: 242Reputation: 242Reputation: 242
Ok, just removed all SCSI devices from the computer and tried again --- no change, unfortunately.

gargamel
 
Old 11-28-2010, 06:32 AM   #8
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Original Poster
Rep: Reputation: 242Reputation: 242Reputation: 242
Another (last) attempt: I removed the PCI USB board, that adds four USB 2.0 ports to this old machine, which has only one USB 2.0 port by default. I was hoping, to avoid any possible conflicts between the onboard and the PCI controller.

The machine is now fitted with two (E)IDE harddisks running as a Linux software RAID-1 array on IDE controller 2 and a DVD-RW/DVD-RAM drive on IDE controller 1. Plus, there's an MSI AGP graphics adapter. That's all.

It still doesn't work. So it seems not to be caused by the plugged hardware.

As it happens reproducably on this machine with ALL USB devices I tried, and not on other machines, I still think, it could be hardware related. Might there be a problem with older VIA chipsets?

My mainboard is an MSI 6712 aka KT4A-V.


gargamel

Last edited by gargamel; 11-28-2010 at 06:33 AM.
 
Old 11-28-2010, 07:41 AM   #9
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Original Poster
Rep: Reputation: 242Reputation: 242Reputation: 242
Just notices one thing, not sure if it is related:

With everything equipped again (SCSI devices, USB controller board with four external ports) and one external USB device connected at boot time, LILO hangs for several seconds. Output is:

Code:
LIL
Duplicate device ID
This is right before an overview screen of the hardware appears, followed by the Slackware start screen (with the large Slackware logo), but after the BIOS and SCSI device scans. After a few seconds, the boot process continues. But: My USB keyboard isn't working on the Slackware boot screen, so I have to wait 2 minutes...

With no external USB harddisk connected, the system boots smoothly.

I am really looking forward to seeing the new kernel and KDE versions, soon, hoping, that the new architecture without HAL dependencies really solves this. Still, I don't understand, how this is dependant of the respective machine...

gargamel

Last edited by gargamel; 11-28-2010 at 07:42 AM.
 
Old 11-30-2010, 04:20 PM   #10
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Original Poster
Rep: Reputation: 242Reputation: 242Reputation: 242
One more step that may or may not help to track this down: I fitted a PCI card with two USB ports to one of the two machines where everything worked just fine, so far. This machine has had a few USB 2.0 and 1.1 ports offered by the mainboard and a PCI card with four additional USB ports. Decrypting LUKS encrypted USB volumes worked on all of them (as far as I have tested, but I didn't try the two USB ports for mouse and keyboard). However, when I connect a USB harddisk with an encrypted partition to any of the two new USB ports, I can reproduce exactly the problem described above.

So it seems, it depends on the USB port, if it works or not...

The two PCI cards are from different vendors. Maybe the hardware or firmware of the USB board causes the problem... ?

gargamel
 
Old 12-02-2010, 11:12 PM   #11
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
I don't know enough to debug it, to be honest, but the "sometimes works" aspect of it makes me think there's a race condition somewhere.
 
Old 12-03-2010, 02:35 PM   #12
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Original Poster
Rep: Reputation: 242Reputation: 242Reputation: 242
This might be it. But as I said: Here it is not "sometimes works", but "somewhere (on some machines and particular USB ports) it works, somewhere else (other machines, other ports) it doesn't."

Meanwhile I tried this: Fitted the same model of four-port USB PCI board to both machines. Works on one machine, not on the other, independent of the USB drive I connect. So it's probably NOT the USB board.

Race condition: Quite likely, I'd say.

gargamel
 
Old 05-01-2011, 02:57 AM   #13
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Original Poster
Rep: Reputation: 242Reputation: 242Reputation: 242
I've just upgraded my main machine to Slackware64-13.37. My first tests seem to indicate, that the problem might be gone. Before I mark the thread as solved I would like to make a few more tests with different computers, though. But at least one scenario, i. e. a particular combination of device and USB port, where the problem used to occur almost always, seems to work now. I'll make a few more tests and then come back to report the results in the next few weeks.

gargamel
 
  


Reply



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
Xfce LUKS handling randomly fails TwinReverb Slackware 19 06-19-2010 05:24 PM
[SOLVED] Combining LUKS and LVM... LILO fails to boot STDOUBT Slackware - Installation 4 06-10-2010 09:58 PM
[SOLVED] Kernel update on LUKS and LVM encrypted Slackware, mount fails KMBS Slackware 15 02-08-2010 01:23 PM
Decryption Of Code balakumarthirukonda Linux - Security 1 01-23-2006 12:54 PM
decryption Program ilnli Programming 9 08-04-2004 02:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration