some problem confusing me, need help! - Linux

This is a discussion on some problem confusing me, need help! - Linux ; 1. after a typical linux distribution(for example, slackware)installed, are some device driver compile into the kernel, others loaded as module when the system start up? 2.how can the device driver module loaded into the system at start up? does it ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: some problem confusing me, need help!

  1. some problem confusing me, need help!

    1. after a typical linux distribution(for example,
    slackware)installed, are some
    device driver compile into the kernel, others loaded as module
    when the system start up?

    2.how can the device driver module loaded into the system
    at start up?
    does it loaded through a script, are there some command( for example,
    insmod XXX) in some rc.d file?


    English is not native language, hope my sentence does not confusing
    you.

    thanks for any information

    grass



  2. Re: some problem confusing me, need help!

    grass wrote:
    > 1. after a typical linux distribution(for example,
    > slackware)installed, are some
    > device driver compile into the kernel, others loaded as module
    > when the system start up?


    Yes. Only those drivers that are needed to load additional drivers (I'm
    deliberately vague here) have to be compiled into the kernel. Usually,
    some "convenience" drivers (e.g. those that access the keyboard and
    display) are also compiled into the kernel as are some drivers for
    veryvery low hardware components, e.g. ACPI and some specific CPU features.

    >
    > 2.how can the device driver module loaded into the system
    > at start up?
    > does it loaded through a script, are there some command( for example,
    > insmod XXX) in some rc.d file?


    Yes. Usually the startup code (grub/lilo) uses the BIOS (which must be
    able to access the boot device) to load the linux kernel and the
    "initial RAM disk" (initrd) image into memory.
    The kernel then uses this image as an initial root file system. There is
    (usually, I haven't checked *all* distributions ;-) a script in the
    initial RAM disk which calls "insmod" for those drivers that are
    required to access the root disk drive (e.g. the SCSI disk driver
    "sd_mod", the SCSI mid-layer "scsi_mod", and a SCSI device driver, e.g.
    "aic7xxx"). To do this, the kernel has to have the driver for the RAM
    disk compiled in as well as the driver for the file system within the
    initrd (see my remark about being deliberatly vague above).
    Once the drivers for the initial root file system (i.e. the device
    drivers mentioned above as well as the filesystem driver, e.g. ext2 or
    ext3) are loaded and ready, the kernel mounts the real root file system,
    switches from the initial RAM disk image to the real root file system
    and frees the memory occupied by the initial RAM disk.

    Only those drivers are included into the initrd which are required to
    access the root device, plus those utilities that are needed to set
    everything up (it gets messy if you want to have an iSCSI root device
    ;-). This initrd is, therefore, built according to your hardware.

    If you have an initial RAM disk (check /boot for "initrd..." files), you
    can have a look at the contents yourself. This can be either a
    (compressed) filesystem of some kind (ext2, minix, ...) or a
    (compressed) CPIO archive. You need to uncompress the contents, then
    either mount it using a loop device or extract the contents to some
    directory.

    > English is not native language, hope my sentence does not confusing
    > you.


    Most of us probably have more problems expressing a problem in your
    language than you have in English ;-)

    Josef
    --
    These are my personal views and not those of Fujitsu Siemens Computers!
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize (T. Pratchett)
    Company Details: http://www.fujitsu-siemens.com/imprint.html

  3. Re: some problem confusing me, need help!

    thanks Josef !


    grass

+ Reply to Thread