LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 02-14-2014, 03:24 PM   #1
shams
Member
 
Registered: Jan 2004
Posts: 405

Rep: Reputation: 30
Cannot close the mapping device with cryptsetup?


I want to encrypt a partition with cryptsetup plain mode what i did is here:
Quote:
cryptsetup create /dev/sdc3
mkfs.ext4 /dev/mapper/crypt
mount /dev/mapper/crypt /crypt
The commands was successfull and asked for the passphrase and everything was done, i copy my data to the /crypt directory and umount the /crypt:
Quote:
umount /crypt
Now how to close the /dev/mapper/crypt device for the security reason that no one can mount it? and how i can open the device again to mount it?
 
Old 02-14-2014, 03:33 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2/Arch/Knoppix
Posts: 1,609
Blog Entries: 13

Rep: Reputation: 186Reputation: 186
cryptsetup luksClose /dev/mapper/crypt

to re-open

cryptsetup luksOpen /dev/sdc3 crypt

Last edited by mostlyharmless; 02-14-2014 at 03:35 PM.
 
Old 02-14-2014, 06:45 PM   #3
shams
Member
 
Registered: Jan 2004
Posts: 405

Original Poster
Rep: Reputation: 30
Thanks for the reply, the first command luksClose working, but when i want to open the device get the error:
Quote:
# cryptsetup luksOpen /dev/sdc3 crypt

Device /dev/sdc3 is not a valid LUKS device.

Last edited by shams; 02-14-2014 at 06:51 PM.
 
Old 02-14-2014, 09:57 PM   #4
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,691

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
'cryptsetup remove' is the command to remove a device.
 
Old 02-15-2014, 04:14 PM   #5
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2/Arch/Knoppix
Posts: 1,609
Blog Entries: 13

Rep: Reputation: 186Reputation: 186
Might be the way it was created: I use
cryptsetup -s 255 -y luksFormat /dev/sdc3 to create the encrypted partition.
Warning: if you do that now it will wipe out whatever you put on sdc3
 
  


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
cryptsetup: WARNING: could not determine root device from /etc/fstab rendezvous123 Ubuntu 4 02-28-2013 08:09 AM
Different between Device Mapper and DM-Crypt and Cryptsetup , LUKS saeedsssss Linux - Software 1 10-01-2012 03:57 AM
13 2.6.29.6 cryptsetup luks wrong device name in /dev/mapper/* TheSoftRock Slackware 1 03-04-2010 06:51 PM
cryptsetup and device-mapper problem avallach Linux - Software 5 03-08-2007 12:38 PM
physical scsi channel mapping to scsiX device node mapping, how to configure manually drthornt Linux - Hardware 3 02-09-2003 12:50 PM


All times are GMT -5. The time now is 08:19 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration