You are not logged in.

#1 2020-09-28 12:27:50

snap.ve
Member
Registered: 2020-04-02
Posts: 76

[SOLVED] Modules for mkinitcpio

Hello everyone! I have a simple question about mkinitcpio.conf Earlier, about a year ago, I had to write the usb_storage flag to the modules parameter to load the operating system from a flash drive. Now if I build the bootloader without this flag, the system boots anyway. The question is, why is this flag even needed if the system automatically loads the module anyway?

Last edited by snap.ve (2020-09-28 13:19:17)

Offline

#2 2020-09-28 12:46:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: [SOLVED] Modules for mkinitcpio

snap.ve wrote:

The question is, why is this flag even needed if the system automatically loads the module anyway?

What do you mean?  You just confirmed that it is not needed ... so asking why it is needed doesn't make much sense.

Do you mean why was it formerly needed?  Either because your hardware was different (e.g., / was on a usb drive ... or at least a device that was connected over usb bus even if internal), or the kernel's handling of your hardware has changed.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2020-09-28 12:58:35

snap.ve
Member
Registered: 2020-04-02
Posts: 76

Re: [SOLVED] Modules for mkinitcpio

Trilby wrote:
snap.ve wrote:

The question is, why is this flag even needed if the system automatically loads the module anyway?

What do you mean?  You just confirmed that it is not needed ... so asking why it is needed doesn't make much sense.

Do you mean why was it formerly needed?  Either because your hardware was different (e.g., / was on a usb drive ... or at least a device that was connected over usb bus even if internal), or the kernel's handling of your hardware has changed.

I mean, why is this parameter available for use if the kernel itself understands that the distribution is loaded from a usb hard drive or flash drive. What's the point of this?

Last edited by snap.ve (2020-09-28 13:01:04)

Offline

#4 2020-09-28 13:08:10

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,560

Re: [SOLVED] Modules for mkinitcpio

This sounds like it stems from a lack of understanding of what a kernel module is. Start your research there.

Offline

#5 2020-09-28 13:09:00

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 1,988
Website

Re: [SOLVED] Modules for mkinitcpio

It's not a parameter. It's the name of a kernel module - in this particular case for a driver.
As to why this driver exists, see [1] and the output of

modinfo usb_storage

.
If the driver is loaded automatically on your system, that's fine and probably caused by some dependecy or autodetect function of the kernel.
If you don't want to rely on this automatism to work, you can include the module's name in the MODULES array of mkinitcpio.conf to make sure, that it's loaded during the initramfs phase.

[1] https://www.linuxtopia.org/online_books … re244.html

Edit: Ninja'd by Scimmia

Last edited by schard (2020-09-28 13:09:33)


macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }

Offline

#6 2020-09-28 13:18:57

snap.ve
Member
Registered: 2020-04-02
Posts: 76

Re: [SOLVED] Modules for mkinitcpio

schard wrote:

It's not a parameter. It's the name of a kernel module - in this particular case for a driver.
As to why this driver exists, see [1] and the output of

modinfo usb_storage

.
If the driver is loaded automatically on your system, that's fine and probably caused by some dependecy or autodetect function of the kernel.
If you don't want to rely on this automatism to work, you can include the module's name in the MODULES array of mkinitcpio.conf to make sure, that it's loaded during the initramfs phase.

[1] https://www.linuxtopia.org/online_books … re244.html

Edit: Ninja'd by Scimmia

Thank you for the detailed answer

Offline

Board footer

Powered by FluxBB