Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 04-20-2009, 02:46 AM   #1
LQ Newbie
Registered: Apr 2009
Posts: 3

Rep: Reputation: 0
Luks for one partition

Hi! is it possible to use Luks for only one partition? lets say /home and /root are not encrypted, but a third partition is encrypted (perhaps with luks) so that when a file from this partition is needed it can easily be mounted, decrypted and read?

thanks in advance

using debian squeeze
Old 04-20-2009, 04:54 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Yes. I don't know how you would do it for more than one partition (at a time instead of individually). Does debian have a partitioner program that you can use to prepare the partition? That would be the easiest way of doing it.

Simply use the "noauto" mount option in /etc/fstab so it isn't mounted when you boot. Then you will be asked for the passphrase when you enter the mount command. If you use the "user" option, you can mount it as a normal user.

Last edited by jschiwal; 04-20-2009 at 12:33 PM. Reason: added clarification for my meaning.
Old 04-20-2009, 11:47 AM   #3
LQ Newbie
Registered: Oct 2007
Posts: 5

Rep: Reputation: 3
You can select one or more partitions to be encrypted when you install debian. I don't remember how it's listed, but it's in the partitioner where you select what type of partition you want (Use as: whatever). Depending on how paranoid you are (how much security you need) you might want to consider encrypting more than that one partition, though. The files you open might show up in /tmp and they might persist on your swap partition.

Last edited by fsmithred; 04-20-2009 at 11:50 AM.
Old 04-20-2009, 12:34 PM   #4
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
/home, swap & /tmp are the partitions you want encrypted. They are the ones you have write access to. The temp files in your home directory may be symlinked to /tmp/.

Last edited by jschiwal; 04-20-2009 at 12:35 PM.
Old 04-24-2009, 03:33 PM   #5
LQ Newbie
Registered: Apr 2009
Posts: 3

Original Poster
Rep: Reputation: 0
is it possible to make this partition setup @ install

I simply need the files in #secret A & B to be "password-protected" according to my job. I wont encrypt the rest of the computer since I don't want to enter a decryption key every time I boot.

consequently my question is: is it possible to choose which partitions that are to be protected by luks when installing debian?

Old 04-18-2010, 04:33 AM   #6
LQ Newbie
Registered: Apr 2010
Location: babia
Distribution: slackdrake
Posts: 2

Rep: Reputation: 0
HEY you, the one with such a contradictory nickname (and post! you said "luks for one partition", and then they talked about "two secret partitions")

IF "#secretA" is a FAT32 primary partition backup, and "#secretB" just a bunch of audio, text and compressed files, you can call me back and I'll personally explain to you (again) exactly what to do with them.

OTHERWISE, you should have listened jschiwal and fsmithred advices to get it through at installation time, they already gave you a positive answer to your question (and no, they can not be encrypted on the fly by any debian distro installer: you'll need to backup that data away for restoring it into the the encrypted volumes once they are ready, and only this last part can be made at install)
OR you can try cryptsetup to encrypt'em "on the fly" under your running Debian, using gparted / fdisk / resize2fs (and a calculator) to free the necesary bytes (sectors) in the beggining of the partitions for luks initialization data. - acomplishing such a complicated task requires some further reading but might worth it -

TAKE a look at (bottom, under "the LUKS conversion option")

Best luck wiht luks.
Don't bore us, get to the chorus.


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
[SOLVED] Entering passphrase on LUKS partition with USB brooky9999 Slackware 7 04-09-2009 04:22 AM
Resize ext4 partition with LUKS encryption wsduvall Linux - Software 1 03-09-2009 10:14 AM
Recover encrypted LUKS partition itinlopez Linux - General 3 11-30-2008 02:20 AM
Hosed my kernel - LUKS partition is not making it easier king111 Linux - General 1 11-23-2008 02:24 PM
mount luks encrypted partition with kdm mattydee Slackware 2 01-28-2008 12:32 AM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration