Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an encrypted partition that I setup during install for CentOS 6 that I want to mount manually after boot. By default it prompts me for a password at boot time. I was able to get it to not prompt me for a password at boot by commenting the drive out from /etc/fstab and /etc/crypttab (although this is probably the wrong way to do it). I tried adding noauto to both the crypttab and fstab but that didn't seem to help. So I guess my question is a two-parter:

1) How do I properly disable an encrypted partition from mounting automatically on boot?

2) How do I manually mount the partition after boot?

For reference I've enclosed the relevant lines from my fstab and crypttab (as they were setup by default):


/dev/mapper/luks-4fa25d53-0dcd-44ab-9f4d-bee5d6f90fce /sec                    ext4    defaults        1 2


luks-4fa25d53-0dcd-44ab-9f4d-bee5d6f90fce UUID=4fa25d53-0dcd-44ab-9f4d-bee5d6f90fce none
share|improve this question
Try adding noauto as the 4th field in your crypttab file. If it works I'll update my answer. The crypttab manpage, however, seems to indicate that the passphrase is always asked for at boot time. – Scott Pack Aug 3 '11 at 23:21
I've added noauto's to both the crypttab and fstab. Looks like you're right about the password always being asked a boot time. Looks like it's time to get creative. – Dan Aug 4 '11 at 15:49
up vote 2 down vote accepted

You need to add the noauto option to the filesystem in your fstab. That will prevent the automounter, or anything that calls or simulates a mount -a, from mounting it. However, since auto is part of the defaults option set, you should replace it entirely with the explicit options, minus auto. Pulling the full set from the man page, your new entry should look something like:

/dev/mapper/luks-4fa25d53-0dcd-44ab-9f4d-bee5d6f90fce /sec   ext4    rw,suid,dev,exec,nouser,async,noauto     1 2

Now, whether including dev, suid, and exec are appropriate for your file system is something you should consider.

share|improve this answer
Yeah I've tried noauto just as you described previously. It still prompts me for my password at boot. – Dan Aug 3 '11 at 23:07
I suspect you need to also remove the entry from the crypttab or modify that as well to not automatically try to unlock the volume. – Zoredache Aug 3 '11 at 23:18
This bug looks a bit concerning. The last comment seems to indicate there is still not a noauto feature for crypttab. – Zoredache Aug 3 '11 at 23:20
The man page, on F15, discusses a noauto option, saying "This device will not be automatically unlocked on boot." Though text further up indicates that the passphrase is always asked for at boot time. Will have to test when I have a test machine available. – Scott Pack Aug 3 '11 at 23:30
I was able to get it to work by just completely commenting out the lines in fstab and crypttab and then following the instructions found here: – Dan Aug 4 '11 at 18:23
  1. Don't use defaults as it implies auto which means "mount on boot". For more detail see man mount
  2. As root do an mount /sec.
share|improve this answer
I've removed the defaults and just placed noauto and it still asks me for a password at boot – Dan Aug 3 '11 at 23:10

Your Answer


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.