From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dd6lGKTL_I74 for ; Wed, 26 Sep 2012 11:24:16 +0200 (CEST) Received: from mail-oa0-f50.google.com (mail-oa0-f50.google.com [209.85.219.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Wed, 26 Sep 2012 11:24:15 +0200 (CEST) Received: by oagn16 with SMTP id n16so471189oag.37 for ; Wed, 26 Sep 2012 02:24:14 -0700 (PDT) Sender: Matthew Monaco Message-ID: <5062C9BB.5010900@0x01b.net> Date: Wed, 26 Sep 2012 03:24:11 -0600 From: Matthew Monaco MIME-Version: 1.0 References: <5053D531.1000508@0x01b.net> <20120921100101.GA11357@tansi.org> <50614FBC.80709@0x01b.net> <506200BD.6010803@0x01b.net> <50626485.5000109@0x01b.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] Encrypt all partitions with dm-crypt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de On 09/26/2012 02:23 AM, Stayvoid wrote: >> You need to add "encrypt" to >> the HOOKS setting in /etc/mkinitcpio.conf and run (as root) >> >> # mkinitcpio -p linux-libre >> >> This will add cryptsetup and the necessary modules to your initramfs. > > It worked. > >> You also MUST add root=/dev/mapper/ROOT cryptdevice=/dev/sdX#:ROOT to your >> kernel command line (/boot/grub/menu.lst for grub-legacy, >> /boot/grub/grub.cfg >> for grub2). Where ROOT is whatever label you want and /dev/sdX# is your >> encrypted block device. Furthermore, you need to set crypto= to your >> specific >> settings, but I don't remember the format off the top of my head. > > I'd like to try mounting from a recovery shell. > But there is no /media. Is it possible to add it? > You can mount to wherever you like. Once you've mapped the block device to /dev/mapper/NAME, you have a block device like any other. > BTW, how to safely enable swap? > Should I chroot into the system and decrypt / swapon there? > The easiest thing is probably a swap file. However, you can also have a separate swap partition which gets encrypted with a random key each boot. You define it in /etc/crypttab. swap /dev/sdX# /dev/urandom swap This maps /dev/sdX# to /dev/mapper/swap with a random password. The "swap" in the forth column tells /etc/rc.sysinit to run mkswap on the device after it's mapped. >> Are you *sure* you don't want to use LUKS? > > Yes.