Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My 10.04 machine uses three partitions: 5 GB for /boot, 25 GB for / and 120 GB for /home. / and /home are encrypted with LUKS passphrase.

I've downloaded the alternate installer in order to reinstall the machine. I want my / partition to be rewritten, but to keep my existing /home.

Any way to tell the installer my /home already exists in a separate LUKS partition?

Thanks in advance,

Adam

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

What I would do is to reinstall using /boot and / and leave the /home partition alone during the install. Once you have installed you can install cryptsetup, set up your partition in /etc/crypttab and /etc/fstab and you'll be away. I'll assume you have an encrypted swap For the details, once you have installed and rebooted, open a terminal and:

sudo apt-get install cryptsetup
cryptsetup luksOpen /dev/sda6 crypthome
cd /
mount -t ext4 /dev/mapper/crypthome /home

Edit the partition details and file system type as required. Now you can browse /home and ensure it is what you expect. Then you need to put the following in /etc/crypttab

crypthome /dev/sda6 none         luks
cryptswap /dev/sda7 /dev/urandom swap

And in /etc/fstab you need to add these lines to the end

/dev/mapper/crypthome  /home  ext4  defaults  0  2
/dev/mapper/cryptswap  none   swap  sw        0  0

Do a reboot to check it all works as expected and you're away :)

share|improve this answer
    
I wanna do pretty much the same but use a partition with custom password. I use pam_mount to automount the partition but it fails on Oneiric. Maybe you can have a look at it askubuntu.com/questions/73435/… –  n3rd Oct 29 '11 at 5:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.