Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've got following situation, I currently I use dm-crpyt on top of vlm on my rootfs and I need initramfs for unlock and mount LVM volumes.

It works well with modular kernel, I compile kernel, create initramfs using modules from the kernel and i works well.
But how can I create initramfs with non-modular kernel? Is that possible or is there better way how to create initramfs or unlock and mount LVM?

share|improve this question

1 Answer 1

Have a look at dracut, the swiss army knife for creating a proven good initramfs. It's modularized script approach will scour automatically or kernel-parameters based for all your rootfs volumes and key devices. I don't see how this issue has anything to do with kernel modularization. But please do provide some additional info if you think it does.

share|improve this answer
Well I create initramfs on my own and for dm-crypt i need to load few modules aes_generic, sha256_generic, dm-crypt and ahci for detect block device. I am not sure, how can I load these modules, if I've got my own non-modular kernel. If I've got modular kernel I can copy them into my initramfs and it works. Anyway, I'll take a look on what you suggest. –  Ency May 6 '11 at 19:56
If you have the drivers compiled in the kernel, you will not need the modules at all. They won't be even built, so you won't be even able to. dracut I believe has initramfs build time detection mechanisms for this, since the builtin vs modular and dependency information is all readily available from /lib/modules/your-kernel-version/modules.builtins. So no matter how you set up your kernel, same dracut command will make an initramfs that has exactly the modules you need and none of what you don't. –  lkraav May 7 '11 at 15:20

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.