What do the configuration options in initramfs.conf mean?
The following wall of text exists in the initramfs-tools/initramfs.conf
Code:
# How does "try and guess which modules to load" work? Does netboot include "most" (add the base modules...) and more, or is it a different set of modules? Does most actually mean 'all'? Only include modules from the 'additional modules' list.. where is this list? These options are very unclear, if anyone could please elaborate, go into detail about them, or link me to a FAQ (or man page? Neither of which I could find..) I'd appreciate it. Thanks. |
Quote:
The 'most' flag will not be all modules (since there are plenty of modules for peripheral devices that have no relevance to the boot). It is just all the modules that might be required for the boot (eg acpi driver modules in case the boot is a resume, block devices since they might contain the boot filesystem, etc). The purpose of the 'netboot' flag is to leave out any of the storage devices (eg ide, scsi etc), since the intention here is to boot the system via the network, so none of these block devices will be required. Instead of block devices, it will include the network drivers. The 'list' flag text is referring to the module list inside /etc/initramfs-tools/modules (see the man page for mkinitramfs). The idea of this is that you can build a minimal initramfs that is customized for a particular system (with only the modules that are really needed). I don't know how the dep flag works. |
Thanks for your answer.
I looked at the scripts for mkinitramfs with my minimal scripting knowledge and I came across these lines: Code:
for d in bin conf/conf.d etc lib modules sbin scripts ${MODULESDIR}; do And then, for the three other cases, it uses dep_add_modules, auto_add_modules, and auto_add_modules PARAMETER. While I do have only a minimal knowledge of bash scripting, I can usually figure things out from their context, whereas here I'm stumped - there are no such functions defined in the same script file, these are not programs.. I don't know where they're referenced, I don't know anything about them. What is this? I try to find the implementations for these but I don't know where to start. |
I may have been a little hasty in asking my question. A quick search
on Google brought me to /initramfs-tools/hook-functions where I found the definitions of all these functions. |
Quote:
This is different to the case where the 'list' flag is specified, because then you are trying to build a minimal initramfs, and will probably specify a number of modules in the file. Arguably the file is being used for two different purposes, depending on the flag. For the hook functions, have a look in /usr/share/initramfs-tools/hook-functions. |
All times are GMT -5. The time now is 12:02 AM. |