Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
LUKS drive cannot be unlocked anymore (produces "Invalid argument" error)
Hello.
I'm writing, because I have a rather interesting problem. I have an encrypted external drive, which I cannot unlock anymore. If I use Dolphin, it asks for the password as it should, bu then gives the following error:
Code:
An error occurred while accessing 'Home', the system responded: The requested operation has failed: Error unlocking /dev/sdb1: Failed to activate device: Invalid argument.
Being root or user doesn't make a difference. The last time I was able to unlock the drive was before a complete reinstall of my current machine (using Gentoo stable, kernel 4.14.65), so I'm not sure if some setting is missing or not right now.
So the question is: Does somebody know what this "Invalid argument" might be? Do you have some suggestions how this could be fixed?
Thanks in advance.
Last edited by pusrob; 08-27-2018 at 02:32 AM.
Reason: Corrected typo in error message
I forgot to mention, that the drive in question is external, connected via USB, so I have no entry in fstab for it. I don't recall having one before reinstall either, but my memory can of course lie. It is a simple LUKS drive, there is no LVM involved. The system doesn't use LUKS, as it uses something else, so the LUKS problem can be system setup/settings related.
The 'cryptsetup luksDump' doesn't show anything unusual either. Version, cipher name and mode, hash spec, etc. show normal values, and at least one key slot is enabled, so I don't think there is anything wrong with the drive. As I have said in the original post, it worked just fine before reinstall, so the problem must be on the system side I think.
As udisksctl and Dolphin are from other projects and packages, maybe something is missing from those packages.
udisksctl's message is strange, it refer to sdb1 and sdc1, two partition on two different physical disks...
And just to be sure about the external disk itself, do you have any way to mount it with another system ?
Sorry, the sdc1 vs sdb1 problem is a typo. All of them should be sdb1. I'll try the cryptsetup unlocking later this day, and I'll let you know the results. Thanks.
I tried the cryptsetup luksOpen command, and it gave me the first usable clue about what is wrong:
Code:
Cannot initialize device-mapper. Is dm_mod kernel module loaded?
As it turns out, the device mapper and dm_crypt weren't enabled in the kernel, so I did a quick recompile with these turned on. Now everything works as it should. I have no idea when and how these modules got disabled, but it doesn't matter now as the solution has been found.
IM having a similar problem but lack you guys proficiency.
I'm trying to access an encrypted partition on a USB HD (it used to be in a Linux Mint laptop that died)
I've tried running a LIVE version of Ubuntu to get into it, and have got as far as the password request but the old password doesn't work.
It returns an error message something to the effect,
"error unlocking device.....LUKS already exists."
Not sure if its significant, but it was a dual boot machine also running windoze, and the win partition seems to be corrupted.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.