-   Linux - General (
-   -   When I compile a kernel do I need to list which modules to boot.. (

HGeneAnthony 02-13-2005 01:30 AM

When I compile a kernel do I need to list which modules to boot..
I'm installing Gentoo Linux. In the past though I've recompiled the kernel and create an initrd file. In the Gentoo manual they say I need to add whatever modules I want to have loaded with the OS in /etc/modules/autoload.d/[kernel version]. Do I need to specify these files in here or does initrd tae care of it. I remember compiling a 2.6 kernel for White Box Enterprise Linux and when I loaed a lot of modules weren't loaded even though I followed the instructions and added the initrd file. Do I also need to add each modules in the /etc/module/autoload.d/[kernel version] file?

syg00 02-13-2005 02:02 AM

Why use initrd - if you are hand compiling, where's the need. ???.
My understanding is that initrd is for modules needed for boot - say block device drivers. Compile what you need into the kernel - other modules (say wifi, network whatever) can (probably should) go in autoload.d

HGeneAnthony 02-13-2005 03:12 AM

My post wasn't very clear. I've compiled the 2.6 kernel before but I didn't bother during this Gentoo installation. I used their genkernel program which configures it to work like their live CD. I wanted to compile the kernel myself but there's enough things that can go wrong during the install and I'd rather be safe then sorry. After I get everything installed then I can recompile it to my preferences. As far as I know (I might be wrong) you need to create an initrd file if the file system which is used to boot the system is installed as a module rather than part of the kernel. It gets into a scenario where it can't boot the module because it needs the kernel to tell it to read the module and it can't get to the kernel because it needs the module to tell it to load it. That's what I read but I might be wrong. Since I didn't configure it and it created the initrd file I'm assuming it used ext2 as a module.

__J 02-13-2005 03:30 AM

initrd's are for modules that are needed before modules can be loaded into the kernel. Generally, you should always build your filesystem support directly into the kernel (initrd's will work, but this is the easier method). any other modules you need loaded at boot (graphics driver, ethernet card, usb mouse , etc...) but are not required to actually boot the machine should be specified in modules.autoload.

syg00 02-13-2005 03:38 AM

Yes I was going to ask about genkernel - never used it. When I went to Gentoo from RH9, decided I would hand compile - might as well make the whole thing a learning experience ;)

Anyway, to the question - I would expect anything in initrd not to need reloading in autoload. Would expect to see a failure in dmesg actually.
Get subscribed to - it's very well supported.

HGeneAnthony 02-13-2005 04:27 AM

Thank you both for your help. I usually like configuring the kernel but I just want to get the system up and running and I made some small mistakes before which gave me some headaches (ie I created the root password and user account before I went into my new environment and couldn't get in, The next time I thought I did it and couldn't get in so somewhere I messed up). Considering the amount of time it takes to get the point where I install GRUB and reboot both of these issues were major wastes of time. PS. I didn't think of just going back into the livecd, mounting the system and changing it there at the time either.

All times are GMT -5. The time now is 01:34 AM.