[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Upon boot, many strange and useless modules are loaded



mody@quick.cz said on Wed, Jul 30, 2003 at 12:15:19PM +0200:
> On Tue, Jul 29, 2003 at 08:09:34PM -0400, Greg Folkert wrote:
> > In /etc/modutil/aliases put in:
> 
> <...>
> 
> > If you don't need any of them... uncomment all of them.
> > 
> > Then run "update-modules"
> 
> Hmm, didn't help. :-( uncommented all but piix, run update-modules,
> rebooted, but there are still many unused modules still loaded.

If you're using the default Debian kernel, it loads all of the modules from the
initrd, before it even mounts root.

If you want to see what's going on, run:

mount -oloop /initrd.img /mnt

and look in /mnt.  It's a cramfs, which is read-only.  The loadmodules script
shows you all of the modules that are loaded on boot.

If you want to change this stuff, you need to do this:

mkdir /tmp/initrd
cp -a /mnt/* /tmp/initrd
edit scripts in /tmp/initrd as needed.
mkcramfs /tmp/initrd /boot/initrd.img-2.4.21-3-686-mine
Change the /initrd.img symlink to point to /boot/initrd.img-2.4.21-3-686-mine
Run lilo.
Reboot.

I do this to force the loading of hardware RAID modules on boot, but you can
remove the IDE modules this way also.

M

Attachment: pgpSfqGkZe9_0.pgp
Description: PGP signature


Reply to: