LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-20-2020, 12:18 PM   #1
quickquestion111
LQ Newbie
 
Registered: Apr 2020
Posts: 12

Rep: Reputation: Disabled
How to re-encrypt full disk encryption (Ubuntu)?


Im on a live installation and I sometimes need to unlock the full disk encryption on the underling hard drive. The encryption is the one Ubuntu has you setup during the installation process. Once unlocked from the live environment, I don't know how to lock it again? Help?

Last edited by quickquestion111; 04-20-2020 at 12:20 PM.
 
Old 04-20-2020, 12:59 PM   #2
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Assuming, you are using cryptsetup, there is option to "close"; from man page:
Quote:
close <name>

Removes the existing mapping <name> and wipes the key from kernel memory.

For backward compatibility there are close command aliases: remove, plainClose, luksClose, loopaesClose, tcryptClose (all behaves exactly the same, device type is determined
automatically from active device).

<options> can be [--deferred]
 
1 members found this post helpful.
Old 04-20-2020, 08:51 PM   #3
quickquestion111
LQ Newbie
 
Registered: Apr 2020
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dc.901 View Post
Assuming, you are using cryptsetup, there is option to "close"; from man page:
Hi thanks, but im getting the error 'Device luks-7e3384a1-415c-41bd-bc9e-4a96074238d1 is still in use.' I even un-mounted it from /media, and it still says that.

Last edited by quickquestion111; 04-20-2020 at 11:31 PM.
 
Old 04-21-2020, 12:02 AM   #4
quickquestion111
LQ Newbie
 
Registered: Apr 2020
Posts: 12

Original Poster
Rep: Reputation: Disabled
Apparently that error is not very common, which im suprised as I guess not many people need to close their encrypted hard disks from a live install... I had to deactivate an LVM volume group that existed on the LUKS encrypted partition before closing the crypto-device, before i could run the command
Code:
crypsetup close <mapper-label>
.. Here's the one and only well written article that explained how to do that. https://linux-blog.anracom.com/2018/...s-device-busy/..

Last edited by quickquestion111; 04-21-2020 at 12:03 AM.
 
  


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
[SOLVED] Volume Encryption or Full Disk Encryption with Veracrypt? lisamint Linux - Security 4 11-07-2019 08:43 AM
How to have luks encryption with keyfile OR passphrase (efi full disk encryption including boot)? byroncollege Linux - Security 2 03-30-2017 07:45 AM
Mint 18 Full disk encryption VS Veracrypt Full Disk encryption: Help a Noob Decide Please ! APeacefulRig Linux - Security 2 11-11-2016 08:10 AM
[SOLVED] to encrypt or not to encrypt a secondary disk rdx Slackware 15 10-30-2014 02:24 PM
encrypt and decrypt using encrypt(char block[64], int edflag) rockwell_001 Linux - Security 3 08-30-2009 09:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:53 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