LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   what is difference between /etc/modules and /etc/initramfs-tools/modules ? (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-difference-between-etc-modules-and-etc-initramfs-tools-modules-4175462725/)

masuch 05-20-2013 01:52 PM

what is difference between /etc/modules and /etc/initramfs-tools/modules ?
 
Hi,

Could please somebody explain me or put some URL here what is the difference between /etc/modules and /etc/initramfs-tools/modules in Ubuntu | Debian (like debian distribution) ?
In which booting time within the booting process is which applied ?

thank you,
kind regards,
M.

fortran 05-22-2013 12:47 AM

/etc/modules : kernel modules to load at boot time
This file is used - if new hardware is added after installation and the hardware requires a kernel module, the system must be configured to load the proper kernel module for the new hardware.

/etc/initramfs-tools/modules : List of modules that you want to include in your initramfs.
But when you include, you should run following command to make sure changes take effect.
Code:

sudo update-initramfs
Read this for initramfs.
http://www.linuxfromscratch.org/blfs...initramfs.html

TB0ne 05-24-2013 09:16 AM

Quote:

Originally Posted by fortran (Post 4956271)
/etc/modules : kernel modules to load at boot time
This file is used - if new hardware is added after installation and the hardware requires a kernel module, the system must be configured to load the proper kernel module for the new hardware.

Sorry, that's misleading. If new hardware is installed, most modern systems use udev to AUTOMATICALLY load kernel modules to accommodate the new hardware. In certain cases, you would want to use /etc/modules to define aliases or set certain device-specific options for a device. The man pages for Debian are pretty clear about such things:
http://wiki.debian.org/Modules
Quote:

/etc/initramfs-tools/modules : List of modules that you want to include in your initramfs.
But when you include, you should run following command to make sure changes take effect.
Code:

sudo update-initramfs
Read this for initramfs.
http://www.linuxfromscratch.org/blfs...initramfs.html
...and that link is for Linux from scratch, which is NOT what the OP asked about (Debian/Ubuntu). Again, the Debian wiki has lots:
http://wiki.debian.org/initramfs

And just running "update-initramfs" could cause problems, because that utility manages ALL the initramfs images, not just one. You need to specify if you want to update, etc. The man page can tell you about that command:
http://man.flashnux.com/en/debian/6/...itramfs.8.html

bloodstreetboy 05-25-2013 12:55 AM

Quote:

Originally Posted by masuch (Post 4955089)
Could please somebody explain me or put some URL here what is the difference between /etc/modules and /etc/initramfs-tools/modules in Ubuntu | Debian (like debian distribution) ?

If you read the commented lines in the files, you did not need to post this question here.
See what do the both files say.
I have taken these lines from ubuntu 13.04 the latest distribution
file /etc/modules says
Code:

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

file /etc/initrams-tools/modules says
Code:

# List of modules that you want to include in your initramfs.
# They will be loaded at boot time in the order below.
#
# Syntax:  module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod

That is clear enough to define their meaning and working.

masuch 05-29-2013 05:50 AM

Quote:

Originally Posted by TB0ne (Post 4958170)
Sorry, that's misleading. If new hardware is installed, most modern systems use udev to AUTOMATICALLY load kernel modules to accommodate the new hardware. In certain cases, you would want to use /etc/modules to define aliases or set certain device-specific options for a device. The man pages for Debian are pretty clear about such things:
http://wiki.debian.org/Modules

...and that link is for Linux from scratch, which is NOT what the OP asked about (Debian/Ubuntu). Again, the Debian wiki has lots:
http://wiki.debian.org/initramfs

And just running "update-initramfs" could cause problems, because that utility manages ALL the initramfs images, not just one. You need to specify if you want to update, etc. The man page can tell you about that command:
http://man.flashnux.com/en/debian/6/...itramfs.8.html


Thanks for URLs - helped me a lot.


All times are GMT -5. The time now is 03:28 AM.