|
|
Subscribe / Log in / New account

First version of kmod released

First version of kmod released

Posted Dec 16, 2011 0:58 UTC (Fri) by linusw (subscriber, #40300)
In reply to: First version of kmod released by dlang
Parent article: First version of kmod released

Actually the magic around distribution use of modules baffles me. Bootloader boots, loads a kernel - maybe with an attached initramfs maybe with a separate initrd - executes linuxrc or so from initramfs/initrd, then load a hoard of modules (file systems), probe for some (storage devices), then mount the real rootfs with the new drivers, switch root, run init (systemd) then load even more modules. That intermediate step with a initramfs/initrd isn't really used on anything tailored, can we ever get rid of it, or make it easy for endusers to compile a kernel with her file systems and storage devices already built-in so as to skip this step?


to post comments

First version of kmod released

Posted Dec 16, 2011 1:11 UTC (Fri) by dlang (guest, #313) [Link] (4 responses)

if you compile your own kernel with all the drivers built-in you can usually just boot that without any initramfs/initrd

however some distros are making this harder to do (thus the comments from some kernel devs about particular distros being very bad for kernel development because they make it hard to just use a plain kernel)

First version of kmod released

Posted Dec 16, 2011 3:20 UTC (Fri) by gsbarbieri (guest, #10537) [Link] (3 responses)

Note that although core modules are better to be builtin, eliminating the need for initramfs (filesystem, main system buses, eventually network), you really don't want to have all possible USB and similar by default. God, how many times do you plug in your camera that need special drivers?

Then completely disabling module support is bad, in this case you still have udev looking for modalias and trying to resolve it. If you have it builtin or no drivers it may evaluate to empty list, currently there is no way to know it and udev worker process execute "modprobe -b ALIAS"... It will in turn execute fork, exec, linker, load of multiple index files, lookup and then exit.

With libkmod udev will be able to load the index once and do in-process resolution of alias before doing any action.

First version of kmod released

Posted Dec 16, 2011 4:09 UTC (Fri) by nybble41 (subscriber, #55106) [Link]

Even if you don't use modules at all, you may still need an initramfs if user-mode setup is required to access the root filesystem. Examples include root-on-LVM, encrypted root (dm-crypt), and some varieties of network-mounted root filesystems. Any of these options can sensibly be used in a server configuration.

First version of kmod released

Posted Dec 16, 2011 4:59 UTC (Fri) by dlang (guest, #313) [Link] (1 responses)

most cameras now show up as a mass storage device and so they don't need special drivers.

this didn't use to be the case.

But again, I was saying that servers seldom need modules, how frequently are you plugging random USB devices into servers?

I have been running with module support completely disabled on my servers for many years. I haven't run in to any problems with it.

First version of kmod released

Posted Dec 16, 2011 5:43 UTC (Fri) by mjg59 (subscriber, #23239) [Link]

If you know every piece of hardware that will ever be connected to your server then you can certainly build a kernel that will handle it without modules. If you're paying for support from a commercial distribution vendor then you'll probably end up forfeiting a bunch of that support by not running the kernel they provide, but if that's what you want then nobody's going to tell you not to.

First version of kmod released

Posted Dec 16, 2011 4:48 UTC (Fri) by josh (subscriber, #17465) [Link]

Distributions which ship compiled packages (as opposed to distributions like Gentoo which build from source) want to ship a minimum number of compiled kernel packages which work for everyone. They don't want to build in every possible driver that might prove necessary to mount the root filesystem, which could include every disk driver, every network driver, every filesystem, every network filesystem, every RAID/LVM/crypto module, and so on. That would make for a huge kernel.

On your individual system, you could certainly build in the drivers needed to mount your root filesystem, though you'll probably still want modules for the myriad USB devices you might choose to plug in. However, you'll need an initramfs if you want any of the following:

- Root filesystem mounted by filesystem UUID or label rather than hardcoded partition name.
- Root filesystem using LVM, RAID, encryption, or any combination thereof.
- Root filesystem on a network filesystem other than NFS.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds