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.

I've read that I can boot the kernel without initrd, and I've also read that additional modules are loaded during the initrd stage -- as I understand it, for necessary drivers that weren't included in the kernel.

If I build the kernel with make defconfig && make, on what kind of hardware can I expect the kernel to boot in? A reasonably modern desktop? Virtualbox?

When would I really need initrd/initramfs?

I'm trying to put together a minimal system to tets out on Virtualbox, and if possible, I'd like to keep things simple and not use an initrd.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

You can boot without initrd on any hardware. I never use it myself on desktops/laptops and home servers, because it just adds to boot time. The only situation where I've found it really necessary so far, is when your root filesystem is on an LVM (but I may be in error - there might be some way to go about this also).

If you want your setup to be fast and simple, you should first of all try to remove all the unnecessary stuff from your kernel configuration. There are two general ways you can do that while configuring your kernel:

  • strip down - try to get rid of all the unnecessary modules and options

or

  • build up - take a minimal config and add in just the stuff you need

I personally recommend the second option - simply because it takes less time and you avoid being overwhelmed by uncertainty about all the options. For a great starting point, you can pick an adequate Pappy's kernel seed. You can find more information about those on his webpage. With this approach, a general tip from my side is to first run lspci -knn, which will tell you, what modules are currently used by most of your hardware.

share|improve this answer

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.