Encrypt single partition? [Solved]

Message
Author
User avatar
rasat
Posts: 653
Joined: Tue Dec 19, 2017 12:19 pm

Encrypt single partition? [Solved]

#1 Post by rasat »

How to encrypt a single partition?
I never thought doing this, didn't take interest in knowing. Also there are anything important which cannot be recovered from backup. But when traveling a lot, which I do. If notebook get lost, there are sensitive company data and other information one don't want falling into the wrong hands. Google search shows different option, what does MX recommend... simple and manageable via file manager (I am using Dolphin) ?
Last edited by rasat on Fri Mar 13, 2020 5:54 pm, edited 1 time in total.

User avatar
dolphin_oracle
Developer
Posts: 22863
Joined: Sun Dec 16, 2007 12:17 pm

Re: Encrypt single partition?

#2 Post by dolphin_oracle »

you can use luks to encrypt a partition.

I have such a partition, and when I access it via the usual file manager options I'm prompted for the encryption password.

there are many luks tutorials on the interweb.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/

User avatar
rasat
Posts: 653
Joined: Tue Dec 19, 2017 12:19 pm

Re: Encrypt single partition?

#3 Post by rasat »

dolphin_oracle wrote: Thu Mar 12, 2020 3:18 pm you can use luks to encrypt a partition.
I found cryptsetup installed in antiX, so this will do the luks encryption?

User avatar
dolphin_oracle
Developer
Posts: 22863
Joined: Sun Dec 16, 2007 12:17 pm

Re: Encrypt single partition?

#4 Post by dolphin_oracle »

That's the tool yes
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/

User avatar
rasat
Posts: 653
Joined: Tue Dec 19, 2017 12:19 pm

Re: Encrypt single partition?

#5 Post by rasat »

Thanks... for the records, this link does the job:
https://www.techrepublic.com/article/ho ... -in-linux/

User avatar
rasat
Posts: 653
Joined: Tue Dec 19, 2017 12:19 pm

Re: Encrypt single partition?

#6 Post by rasat »

dolphin_oracle wrote: Thu Mar 12, 2020 6:21 pm That's the tool yes
Link I posted didn't work as I thought

Found the solution here below...
Last edited by rasat on Fri Mar 13, 2020 5:53 pm, edited 3 times in total.

User avatar
rasat
Posts: 653
Joined: Tue Dec 19, 2017 12:19 pm

Re: Encrypt single partition?

#7 Post by rasat »

These steps will do..... if there is a way to auto mount, would be good.

Code: Select all

sudo cryptsetup luksFormat /dev/sda8
sudo cryptsetup luksOpen /dev/sda8 encrypted
sudo mkfs.ext4 /dev/mapper/encrypted
sudo mkdir /luks
To view with any filemanager....

sudo cryptsetup luksOpen /dev/sda8 encrypted
sudo mount /dev/mapper/encrypted /luks

To add or edit via root access.

User avatar
dolphin_oracle
Developer
Posts: 22863
Joined: Sun Dec 16, 2007 12:17 pm

Re: Encrypt single partition? [Solved]

#8 Post by dolphin_oracle »

you could set up an automount thru use of a keyfile, but unless you put the keyfile on an external device (like a usb stick) then your newly encrypted partition would not be secure.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/

User avatar
rasat
Posts: 653
Joined: Tue Dec 19, 2017 12:19 pm

Re: Encrypt single partition?

#9 Post by rasat »

rasat wrote: Fri Mar 13, 2020 5:45 pm To add or edit via root access.
This was solved by adding one directory with user access... same permit as the secured files. After login and mounting, works same as in /home. In other words, this is very nice and handy when working with sensitive data.

Post Reply

Return to “Software / Configuration”