# [encryption] baselayout2 for dmcrypt or other solutions

## Gabriel_Blake

Hi.

I'm moving my data to a new laptop and wanted to encrypt my two user partitions (separately) to that they are mounted after login (the user password is pass-phrase). I was following this guide, but at one point I've realized that running dmcrypt requires baselayout2.

I've heard that baselayout2 is very stable, but still... installing an unstable core package doesn't seem like a good idea.

Is it safe to use baselayout2 or should I use a different encrypting method (and if so, could you propose any) ??

----------

## avx

I'd say just use it. I'm using it for years with dmcrypt/LUKS and only had a little problem once (lvm2-update) which was easily fixed. In my experience, it's the most stable core-package not labeled stable and I'm pretty sure that's not just my opinion.

----------

## gentoo_ram

You don't need baselayout-2 to do encryption.  Baselayout-1 will do it as well.  Follow the steps in the guide you mentioned except for step 4.  Instead, modify the file /etc/conf.d/dmcrypt.  There are plenty of examples in the file.  Baselayout-1 reads that file at system startup time.  Everything else is the same.

----------

## Gabriel_Blake

 :Arrow:  gentoo_ram The thing is that running /etc/init.d/dmcrypt results in an error which goes more or less like this: "dmcrypt init script is written for baselayout-2. Do not use it with baselayout-1." And the script fails.

But it doesn't matter any more sine I've emerged baselayout2 without issues, and everything is running just fine  :Smile:  I'll have some more questions about encryption but that's for another thread.

Thanks everyone  :Smile: 

----------

## gentoo_ram

With baselayout-1 you don't need to run /etc/init.d/dmcrypt.  Baselayout-1 has built-in code that reads /etc/conf.d/dmcrypt and "just works".  That's why you don't need /etc/init.d/dmcrypt in baselayout-1.  I went down that whole path last week when I wanted to enable encrypted swap partitions.

----------

