Many Linux distributions use an in-memory filesystem as a temporary root filesystem when booting. There are two forms of such in-memory filesystems: initrd, the traditional form, which is a RAM drive, and initramfs, the modern form, which is a filesystem filled by data from an archive.
The job of the programs on the initrd (or initramfs, the difference is irrelevant here) is to do everything that is necessary to mount the root filesystem. This includes loading modules for the relevant drivers (for the hard disk, for the root filesystem type, and for any other data layer such as RAID and volume encryption). This also includes making the root volume ready for use. Prompting the user for the encryption password is one of these tasks.
The initrd is loaded by the bootloader (Grub, Lilo, …) at the same time as the kernel. It is generally stored in the same directory as the kernel, in
Most distributions arrange to regenerate the initrd whenever the kernel is upgraded. You may also need to regenerate the initrd in other circumstances such as a change in the location of the root filesystem or of the type of volume. If the root filesystem is encrypted, the distribution will make sure that the initrd contains
crypttab (these are copies from the root filesystem made when the initrd is generated).