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.

I'm using dm-crypt and LVM, which I set up during installation. I have two volume groups, one of which is encrypted and not needed for system/boot purposes. As of now, Ubuntu asks for a password on boot to mount the encrypted volumes. The computer in question will be remotely administered, so I won't be able to enter any password on boot.

Ideally I would like it to boot normally without asking for a password, after which I could ssh in and mount the encrypted volume manually. I suspect this involves creating a new initramfs, but I'm not sure.

Any hints as to what I need to do to not have to enter a password on boot?

share|improve this question

2 Answers 2

I'm not sure if this will work in your situation, and I've never tried this option, but you might be able to use the "noauto" option in /etc/fstab - more info on fstab here if you're not familiar with it.

The "noauto" option is supposed to only allow the drive to be mounted explicitly rather than automatically, useful for CD or USB drives. You can also specify the various options that will be used when you do explicitly mount the drive, so all you need to do is a simple mount device here type command (eg, mount /dev/sdx /mnt/somedirectory), and it can be an alias or script.

share|improve this answer
    
Unfortunately this doesn't work. I've tried editing both fstab and crypttab, but the password prompt comes long before these files are read. I suspect even before the root file system is mounted. Thanks, though! I think I might just reinstall without the encrypted partition and add the encryption later. –  blaabjerg Jun 25 '12 at 22:01
    
Sorry, it seemed like it might be worth a try, but I have no experience with LVM, and I guess it does things differently or something. With ext3 or ext4, everything is done in fstab: the swap drive, root filesystem, even /boot with the grub configuration. –  Marty Fried Jun 25 '12 at 22:08

I'm not using LVM but I managed to get my system booting without waiting for user interaction at boot by modifying both fstab and crypttab:

in /etc/fstab add noauto as option on disk that is encrypted. Example: /dev/mapper/Secret /mnt/Secret ext4 defaults,noatime,nodiratime,noauto 0 0

in /etc/crypttab add options noauto and quiet. Example: Secret /dev/sdc1 none luks,noauto,quiet

share|improve this answer

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.