Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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)

share|improve this question
    
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) –  frostschutz Jul 4 '13 at 11:48
add comment

2 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.