View previous topic :: View next topic |
Author |
Message |
Geralt Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 14 Jun 2008 Posts: 150
|
Posted: Sat Jan 17, 2009 11:36 am Post subject: Using modules vs. monoholitic kernel |
|
|
Hi,
which one do you favor and why?
Until recently I've got a monoholitic kernel, because I know what drivers and subsystems I need, so it made sense to build everything into the kernel and I don't have to waste time at boot-up when the genkernel-package's initramfs' script is loading most of them anyway.
But up to today I've had several times where I either was missing a driver (dcdbas for example, needed it to access bios settings) or wished I could just rebuild and re-install the driver at load-time.
So how do you handle it? I'm considering switching some drivers back to modules. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
szczerb Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Sat Jan 17, 2009 12:39 pm Post subject: |
|
|
I have everything I can built it - it's easier this way. I have fuse as a module (fusesmb needs it to be a module) and snd_hda_intel (it needs a parameter so I think there's no other way then a module...) and everything that need's to be reloaded after hibernation (iwl3945 and sdhci).
(sdhci forced sdhci_pci and ricoh_mmc to be modules aswell) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Naib Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/10548223558c42f2887453.jpg)
Joined: 21 May 2004 Posts: 6069 Location: Removed by Neddy
|
Posted: Sat Jan 17, 2009 1:14 pm Post subject: |
|
|
I prefer have monolithic JUST for what is needed for init to kick off then everything as modules.
Having virtually everything as modules helps in a number of ways
1) I can help others since they go "Oh I have this hardware what module do I need" my lsmod will be of use to them
2) IF I have forgotten something (eg UDF for reading DVD's) I can just go into the kernel config and build that and modprobe it. IF you go for a monolithic you need to reboot
Basically I use to like Monolithic but I was running into more issues (eg rebuild and reboot) then I have in going for a vritually all modular _________________ #define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0; |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54830 Location: 56N 3W
|
Posted: Sat Jan 17, 2009 2:49 pm Post subject: |
|
|
I use monolithic on my server, with module loading disabled as it removes an attack vector.
Everywhere else I'm with Naib.
Modules also make it easier to pass parameters, as you can use modprobe -r <module> to do trial and error.
Contrast that with passing parameters to a monolithic kernel. That needs a reboot. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Paczesiowa Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 06 Mar 2006 Posts: 593 Location: Oborniki Śląskie, Poland
|
Posted: Sat Jan 17, 2009 4:19 pm Post subject: |
|
|
szczerb wrote: | I have everything I can built it - it's easier this way. I have fuse as a module (fusesmb needs it to be a module) and snd_hda_intel (it needs a parameter so I think there's no other way then a module...) |
my fusesmb works with fuse builtin. as for snd_hda_intel, read first page of /usr/src/linux/Documentation/kernel-parameters.txt |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pdw_hu Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 02 Jun 2008 Posts: 200 Location: Budapest, Hungary
|
Posted: Sat Jan 17, 2009 4:38 pm Post subject: |
|
|
Mostly I modularize all the stuff i rarely use. FireWire, Bluetooth, some filesystems, UDF, etc. I also blacklist them as i never used firewire (but might need it one day). Everything else is in the kernel... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
szczerb Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Sat Jan 17, 2009 5:11 pm Post subject: |
|
|
Paczesiowa so it could've been ntfs-3g that needed it - in docs for one of those I found that fuse should be a module so I just enabled it and didn't even check if it works otherwise. Thanks a lot for the parameters info - didn't know ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
RedSquirrel Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/4933508174bb8cb567caaa.gif)
Joined: 22 Apr 2008 Posts: 336
|
Posted: Sat Jan 17, 2009 5:25 pm Post subject: |
|
|
There is a FAQ entry for this topic.
My kernel is monolithic. I like having everything packed into a neat little bundle. It is pretty small and boot time is acceptable. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Paczesiowa Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 06 Mar 2006 Posts: 593 Location: Oborniki Śląskie, Poland
|
Posted: Sat Jan 17, 2009 6:46 pm Post subject: |
|
|
szczerb wrote: | it could've been ntfs-3g that needed it |
ntfs-3g also works with fusesmb compiled-in. and sshfs, and rarfs and many other fuse filesystems I use. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
szczerb Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Sat Jan 17, 2009 7:22 pm Post subject: |
|
|
Good to know - maybe some older version needed it this way...I don't really remember where and when I read this ;] |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
sundialsvc4 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 10 Nov 2005 Posts: 436
|
Posted: Sun Jan 18, 2009 3:30 am Post subject: |
|
|
I build-in to each kernel all of the hardware-support that I know is required for a particular machine's "permanent" hardware. (You can usually determine this by starting Knoppix or somesuch, then noticing what drivers it has auto-selected...)
Then, I use modules for anything that is either removable, or optional. For example, I might need any one of several crypto-algorithms for different VPN connections, but I won't need all of them at once. I don't need driver support for my USB-attached camera except when that camera is actually attached, and so on.
Because my Linux configuration is very specific to the hardware on which it runs, and to precisely what I'm using a system for, all of my systems can go from full power-off to fully operational in much less than one minute. There is no "hardware discovery," and no cruft. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|