SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2009-08-26 08:42:06

hgk
Member
Registered: 2009-08-25
Posts: 11

HOWTO: Install #! with encrypted /, swap and /data partitions

/sbin/badblocks -c 10240 -s -w -t random -v /dev/sda5

Offline

Help fund CrunchBang, donate to the project!

#2 2009-08-26 08:55:21

Toolz
#! Die Hard
From: Asia
Registered: 2009-02-02
Posts: 937

Re: HOWTO: Install #! with encrypted /, swap and /data partitions

Very interesting, very thorough. I'm going to try this out.

Offline

#3 2009-08-28 06:21:19

hgk
Member
Registered: 2009-08-25
Posts: 11

Re: HOWTO: Install #! with encrypted /, swap and /data partitions

Offline

#4 2009-09-03 05:30:38

hemu
Member
From: Finland
Registered: 2009-09-03
Posts: 10

Re: HOWTO: Install #! with encrypted /, swap and /data partitions

Thanks, great tutorial!

Worked fine smile Thanks to you i'm running crypted partitions again.

Offline

#5 2009-09-03 06:33:32

tartan
#! Junkie
From: Moscow
Registered: 2009-07-13
Posts: 314

Re: HOWTO: Install #! with encrypted /, swap and /data partitions

Kinda noob question: what is going on to performance after that tweak? I would try it, 'cause i'm a little bit paranoid about having mail archive and prawn collection on the same laptop, but not paranoid enough to tolerate noticeable lags and memory leak. Would 1 gb ram and 1600 khz be enough?

And how do I get access to my hypothetically encrypted /home partition after switching from !# to Arch or Sabayon?

Last edited by tartan (2009-09-03 06:34:01)

Offline

#6 2009-09-03 08:18:06

hgk
Member
Registered: 2009-08-25
Posts: 11

Re: HOWTO: Install #! with encrypted /, swap and /data partitions

sudo cryptsetup luksOpen /dev/sda8 sda8crypt

Offline

#7 2009-09-03 08:19:36

hgk
Member
Registered: 2009-08-25
Posts: 11

Re: HOWTO: Install #! with encrypted /, swap and /data partitions

Offline

#8 2009-10-23 06:32:02

seespatz
New Member
Registered: 2009-10-23
Posts: 2

Re: HOWTO: Install #! with encrypted /, swap and /data partitions

Hi! Thanks for the great HOWTO. It works great. But I do have a tiny little problem with it:

Before encryption I created /dev/sda5 as my SWAP with the size 2500 MB. After encryption and installation it only shows up with 501 MB. The command "free" and "cat /proc/swaps" show also only 513 MB. I checked the partition and it's definetly the correct one with 2500 MB.

Do you have any ideas what went wrong?

Thanks in advance.

Last edited by seespatz (2009-10-23 06:33:23)

Offline

#9 2009-10-23 07:35:13

hgk
Member
Registered: 2009-08-25
Posts: 11

Re: HOWTO: Install #! with encrypted /, swap and /data partitions

ls /dev/mapper/

Offline

#10 2009-10-23 09:02:52

seespatz
New Member
Registered: 2009-10-23
Posts: 2

Re: HOWTO: Install #! with encrypted /, swap and /data partitions

I just changed the HOWTO to fit my partitions (but maybe, I made a mistake following it). I guess you are right, the swap is not activated at boot. But it gets mounted.

ls /dev/mapper

shows

control sda2crypt sda5crypt

sda5crypt is the swap partition.

cat /proc/swaps

shows /dev/ramzswap0 with size 513380. I suppose that would be the small swapfile created by !#.
I found out that I can get my swap to work with

sudo swapon /dev/mapper/sda5crypt

Afterwards

cat /proc/swaps

shows 2 swaps: the one mentioned above AND my swap with the size 2441840. So it seems it is just not activated during boot. Do you have a suggestion? My idea is now (if there is no other way) to write a swapoff for the small one and a swapon for my one into austostart ...

Last edited by seespatz (2009-10-23 09:03:56)

Offline

#11 2011-03-08 11:47:57

jvd
#! CrunchBanger
Registered: 2010-01-29
Posts: 194

Re: HOWTO: Install #! with encrypted /, swap and /data partitions

Digging up an old topic, but looks like a great one!

Tried it yesterday, but failed since I did not understand that the installer should be started from the live session, in stead of booting anew. Want to give it a shot when I have the time later today.

Just wanted to know if the same (multiple encrypted partitions among which swap and root with a single password) can be achieved through the new LVM setup of the installer? Is there a way to get a longer key than 256, BTW?

Offline

#12 2011-03-08 16:03:20

jvd
#! CrunchBanger
Registered: 2010-01-29
Posts: 194

Re: HOWTO: Install #! with encrypted /, swap and /data partitions

Last edited by jvd (2011-03-08 20:40:10)

Offline

#13 2011-03-13 19:50:54

Erinsfan
#! CrunchBanger
From: At a terminal
Registered: 2011-01-28
Posts: 148

Re: HOWTO: Install #! with encrypted /, swap and /data partitions

EF@Spoonbill:~$ sudo /etc/init.d/cryptdisks start

Enjoying a good !#

Offline

#14 2011-03-14 12:55:15

jvd
#! CrunchBanger
Registered: 2010-01-29
Posts: 194

Re: HOWTO: Install #! with encrypted /, swap and /data partitions

Hey Erin,

The first post does not apply to Debian Squeeze, apparently only to the 9.04 ubuntu versions, as there is no possibility to install debian from a running live session.

You can make the encryption of multiple disks all happen from the debian installer. Be prepared to spend quite some time in the not so intuitive partitioning tool.

The least intuitive part for me was to select Finish after creating the encrypted volume, before moving on to creating the LVM that contains the other partitions. Make sure you enter your passphrase before getting to the LVM phase...

Offline

#15 2011-03-14 13:06:24

Erinsfan
#! CrunchBanger
From: At a terminal
Registered: 2011-01-28
Posts: 148

Re: HOWTO: Install #! with encrypted /, swap and /data partitions

Hello jvd,

The only problem I am having is getting sda4 (a data drive) to recognise the passphrase entered during boot for sda2 (swap). I didn't bother with all the Live CD stuff as my !# exists currently.

Is there an alternative encryption method? All I am after is having a swap, data and home drive encrypted and mounted at boot - pref with home being mounted to the right user akin to Mint.

Thanks, Erin


Enjoying a good !#

Offline

#16 2011-03-14 13:54:19

jvd
#! CrunchBanger
Registered: 2010-01-29
Posts: 194

Re: HOWTO: Install #! with encrypted /, swap and /data partitions

Sorry, did not read your post well enough...

Not so sure, as I have not attempted to create encrypted disks after installation. Have not really looked under the hood of what is really happening, and cannot help you concretely, I am afraid sad

Good luck!

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: bleh

Debian Logo