Professional Web Applications Themes

How to find needed modules for rebuilding kernel - FreeBSD

In rebuilding a kernel, how do you know exactly what modules you need? The Handbook is a good start, and a lot of them are obvious (i.e. if I have no SCSI disks, disable all SCSI modules). Others aren't so easy, particularly serial devices, and the pseudo devices. How can I find out exactly what I need to enable, so I can make the kernel as tight as possible?...

  1. #1

    Default How to find needed modules for rebuilding kernel

    In rebuilding a kernel, how do you know exactly what modules you need?
    The Handbook is a good start, and a lot of them are obvious (i.e. if
    I have no SCSI disks, disable all SCSI modules). Others aren't so
    easy, particularly serial devices, and the pseudo devices. How can I
    find out exactly what I need to enable, so I can make the kernel as
    tight as possible?
    Pat Guest

  2. #2

    Default Re: How to find needed modules for rebuilding kernel

    On Thursday 31 March 2005 19:43, Pat Maddox wrote: 

    Modules are not your concern, they get built anyway (or mostly .. not sure but
    probably not each and every possible module gets built). The idea is that if
    you for example need support for a new soundcard, you can just load the
    module (loader.conf) without needing to recompile the kernel. On an IDE/ATA
    system I generally turn down the scsi delay (I always do) and remove:

    - all scsi raid cards and support
    - all ethernet cards, both pci/isa and usb except the one(s) I have (most can
    be loaded as a module also); beware whether it needs mii too
    - from the pseudo devices ppp/tun/slip as I'm connected via ethernet (cable)
    sometimes I disable ipv6 and gif/faith, sometimes I don't
    - all CPUs except the one you actually have (performance!)

    I also remove most scsi support but beware that cdrecord (atapicam) requires
    the basic scsi devices, as does umass (camera's, cf fards, usb scanners, ..).

    Generally unless you need to _add_ something to your kernel you don't really
    need to stray from GENERIC at all. If you want to have a kernel at least
    tuned for your CPU and without a lot of stuff you don't have anyway, do the
    above). But depending on the purpose of the box you can strip out quite a
    lot. Check NOTES, both in /usr/src/sys/conf and /usr/src/sys/<yourarch>/conf.
    (on FreeBSD4 that is LINT).

    Also most if not all drivers and devices have manual pages and from the
    synopsis you can see which other devices or options come with them.

    HTH,

    Dan

    Danny Guest

  3. #3

    Default Re: How to find needed modules for rebuilding kernel

    Thanks for the info. My terminology is off...apparently what I really
    meant is I'm wondering what drivers I need to compile into the kernel.
    I've done what you've suggested - removed SCSI support, all of the
    NIC drivers besides the one I need, etc. I'm just wondering how I can
    find out EXACTLY what I need in there, so I can have as little as
    possible. It's a server, so it has a pretty narrow purpose, and I'd
    like to keep the kernel as small and fast as I can.


    On Fri, 1 Apr 2005 00:31:36 +0200, Danny Pansters <com> wrote: 
    >
    > Modules are not your concern, they get built anyway (or mostly .. not sure but
    > probably not each and every possible module gets built). The idea is that if
    > you for example need support for a new soundcard, you can just load the
    > module (loader.conf) without needing to recompile the kernel. On an IDE/ATA
    > system I generally turn down the scsi delay (I always do) and remove:
    >
    > - all scsi raid cards and support
    > - all ethernet cards, both pci/isa and usb except the one(s) I have (most can
    > be loaded as a module also); beware whether it needs mii too
    > - from the pseudo devices ppp/tun/slip as I'm connected via ethernet (cable)
    > sometimes I disable ipv6 and gif/faith, sometimes I don't
    > - all CPUs except the one you actually have (performance!)
    >
    > I also remove most scsi support but beware that cdrecord (atapicam) requires
    > the basic scsi devices, as does umass (camera's, cf fards, usb scanners, ..).
    >
    > Generally unless you need to _add_ something to your kernel you don't really
    > need to stray from GENERIC at all. If you want to have a kernel at least
    > tuned for your CPU and without a lot of stuff you don't have anyway, do the
    > above). But depending on the purpose of the box you can strip out quite a
    > lot. Check NOTES, both in /usr/src/sys/conf and /usr/src/sys/<yourarch>/conf.
    > (on FreeBSD4 that is LINT).
    >
    > Also most if not all drivers and devices have manual pages and from the
    > synopsis you can see which other devices or options come with them.
    >
    > HTH,
    >
    > Dan
    >
    > _______________________________________________
    > org mailing list
    > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    > To unsubscribe, send any mail to "org"
    >[/ref]
    Pat Guest

  4. #4

    Default Re: How to find needed modules for rebuilding kernel

    On Friday 01 April 2005 00:45, Pat Maddox wrote: 

    Surely it's not going to run out of memory or disk space any time soon with a
    few kB more or less for the kernel.

    Like I said there _is_ doentation ranging from abundant to sparce to terse
    to the plain source. The latter is to be taken literally... some things are
    only doented in the sources, if you're lucky in a line of normal text in a
    header file (e.g. with device drivers). Reading NOTES would be a start.

    But I'd like to caution you not to put too much efford in this. The point is
    you only need to go that far if really needed, and I'm quite sure it's not.
    It would hardly matter. If you want to do it the hard way, well then see the
    above for the hard way :)

    You might be more interested in tuning(7) and the various device.hints to get
    the most out of your hardware. The "smallest size/footprint kernel" used to
    be a common issue when people had small drives, little RAM and had to use
    floppies. Also, if you want a server that runs well, invest some time into
    the configuration of your services. Things like maximum files, maximum forks,
    timeouts, ... Much more likely to appear as troublemakers than a somewhat
    overweight kernel.

    Dan
    Danny Guest

Similar Threads

  1. nforce kernel modules
    By gerard in forum Debian
    Replies: 13
    Last Post: August 13th, 01:10 AM
  2. Kernel 2.6.0. Dealing with modules
    By Marino Fernandez in forum Debian
    Replies: 1
    Last Post: July 21st, 02:50 AM
  3. Rebuilding the kernel - establishing the default settings
    By Sean in forum Linux Setup, Configuration & Administration
    Replies: 1
    Last Post: July 4th, 10:23 PM
  4. Kernel Modules
    By Abrasive in forum Debian
    Replies: 0
    Last Post: July 3rd, 07:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139