LinuxQuestions.org
Review your favorite Linux distribution.
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 02-18-2010, 06:20 AM   #1
BashTin
Member
 
Registered: May 2003
Location: West Midlands, United Kingdom.
Distribution: Slackware 14.1, Centos 7
Posts: 278

Rep: Reputation: 32
Cannot mount my /dev/mapper/crypted-drive


Hi all, back for more. So I decided it was about time I encrypted all that porn :-)

Well as you can see from my sig I am running Slack 13 and unfortunately did not discover the readme_crypt.txt on the installation cd until it was far too late. Not to worry, many hours burned and things learned.

So I compiled and installed cryptsetup and for my test encryption I am using an external usb harddrive (sdb3).

First off cryptsetup kept segfaulting with the luksFormat command and this seems to be a know bug. The workaround it to pass USE="dynamic" to config before you build the package. Then

Code:
# cryptsetup.dynamic -h sha512 --verify-passphrase luksFormat /dev/sdb3 test-crypt

# cryptsetup luksOpen /dev/sdb3

# mount /dev/mapper/test-crypt /mnt/tmp
mount: special device /dev/mapper/test-crypt does not exist
Ooops, and that is my problem. I cannot mount the encrypted device even though it is clearly showing with 'ls /dev/mapper/'. I guess I have missed a step or if not something is wrong.

Also, one last thing, I keep seeing references to 'cat /proc/crypto' to see a list of kernel supported algorithms but my /proc/crypto is empty?

As always pointers and ideas very much appreciated.

BashTin.
 
Old 02-18-2010, 07:51 AM   #2
jelezarov
LQ Newbie
 
Registered: Nov 2007
Location: /dev/urandom
Distribution: Slackware
Posts: 26

Rep: Reputation: 17
According to the cryptsetup luksFormat help the format is:

cryptsetup: luksFormat: requires <device> [<new key file>}

So it seems that "test-crypt" in your command is interpreted as new key file. Actually, when i tried that the command fails to execute when not finding a file named "test-crypt" in the current directory.

Also, cryptsetup luksOpen requires a name after the device.
And, you have to format the newly created device before using it. So, something like that:

Code:
#cryptsetup luksFormat /dev/sdb3
#cryptsetup luksOpen /dev/sdb3 test-crypt
#mkfs.ext2 /dev/mapper/test-crypt
#mount /dev/mapper/test-crypt /mnt/tmp/
 
1 members found this post helpful.
Old 02-18-2010, 09:19 AM   #3
BashTin
Member
 
Registered: May 2003
Location: West Midlands, United Kingdom.
Distribution: Slackware 14.1, Centos 7
Posts: 278

Original Poster
Rep: Reputation: 32
Ahah, that is what I was missing, thanks very much jelezarov. I did create a file system before, on /dev/sdb3, not, as I now realise I should have done, on /dev/mapper/crypt-test.

Yes you are right about lukFormat. I don't think that was actually my command, it was from memory, frail I know. I recall what I actually did was 'cryptsetup.dynamic -h sha512 --verify-passphrase luksFormat /dev/sdb3', (no key file/name so I was prompted for a password/passphrase).

Now I can get it to mount. Thanks. BashTin.

Last edited by BashTin; 02-18-2010 at 09:37 AM.
 
  


Reply


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
vgcreate command is changing /dev/mapper as PV Name in pvdisplay to /dev/dm-xx path neeravsingh Linux - Enterprise 6 03-23-2010 03:05 AM
LVM mount as /dev/vg00/lv00 instead of /dev/mapper/vg00-lv00 ZedLeppelin Linux - Newbie 2 03-29-2009 05:44 PM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 07:16 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 1 12-24-2005 04:25 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 02:15 AM

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

All times are GMT -5. The time now is 09:00 AM.

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