LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 04-20-2009, 03:46 AM   #1
contredire
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, 05:54 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
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 01:33 PM. Reason: added clarification for my meaning.
 
Old 04-20-2009, 12:47 PM   #3
fsmithred
LQ Newbie
 
Registered: Oct 2007
Posts: 2

Rep: Reputation: 0
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 12:50 PM.
 
Old 04-20-2009, 01:34 PM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
/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 01:35 PM.
 
Old 04-24-2009, 04:33 PM   #5
contredire
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Original Poster
Rep: Reputation: 0
is it possible to make this partition setup @ install
#/boot
#/home
#/
#swap
#secretA
#secretB

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?

cheers!
 
Old 04-18-2010, 05:33 AM   #6
ToothR00T
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 https://help.ubuntu.com/community/En...lesystemHowto7 (bottom, under "the LUKS conversion option")

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


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


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