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?


You should specify this on /etc/crypttab, like this -

{encrypted-block-device} {block-device} none noauto


encrypted-block-device - This is the device you setup using cryptsetup under /dev/mapper/

block-device - this is the actual block device. Eg: /dev/sda1

none - This mean password is not specified, hence it will be prompted.

noauto - This will prevent auto mount during the boot time.

So altogether, line should be like this (assuming my encrypt device is xdisk),

xdisk /dev/sda1 none noauto


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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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