For Gentoo, I am able to (finally) boot my encrypted system with an initrd and LILO.

I used the guide at http://whitehathouston.com/documentation/gentoo/initramfs_howto.htm

However it appears that /dev/mapper/cryptvg-root is missing after the system has finished booting. Why would that be? Doing ls -al /dev/mapper shows only the file "control". Yet mount says that /dev/mapper/cryptvg-root is mounted at /.

I thought perhaps I needed to add something to remap the /dev file system in the initrd to the real root file system before control is passed over. So I added this:

mount -o move /dev /mnt/root/dev

Before I do exec switch_root.

However I still have no /dev/mapper/cryptvg-root when it has finished booting.

What do I need to do so that control is passed properly prior to and during exec switch_root?

If it should matter:

/dev/sda1 = /boot (not encrypted) /dev/sda2 = / (encrypted)

  • Works fine for me, using just devtmpfs in initramfs. Unfortunately gentoo-wiki.com is down but here is a mirror: gentoo-en.vfose.ru/wiki/Initramfs (for custom initramfs under Gentoo) Commented Jul 4, 2013 at 11:48

2 Answers 2


I would strongly suggest building your initramfs with dracut. Unless you're in it for the learning of the whole process, I guess.

As for the problem at hand, make sure udev runs in initramfs to find your real drives and then also properly runs after switching root fs to create all the real device nodes.


This is way late, but - if you fire off "dmsetup mknodes" after the switch_root, it should get you the device nodes under /dev/mapper. Just make sure this is done before checkfs and fsck are run. Check out topic 940802 on the Gentoo boards for specifics.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .