LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Building an initrd - how to find correct module name? (https://www.linuxquestions.org/questions/slackware-14/building-an-initrd-how-to-find-correct-module-name-732672/)

Yalla-One 06-13-2009 06:26 AM

Building an initrd - how to find correct module name?
 
I decided to finally give up building my own custom kernels on my relative's machines and go for the generic slackware kernels (less maintenance).

In the past I have just built the filesystem and underlaying disk drives statically into the kernel, but now that I'll be using an initrd I need to identify the module name. This causes some unexpected trouble.

When building, I have just built Device Drivers -> Serial ATA -> AHCI SATA support.

The AHCI SATA driver's symbol is according to "help": SATA_AHCI and it depends on ATA && PCI.

However, running mkinitrd and asking for modules sata_ahci:ata:pci doesn't work at all - no such modules.

I've googled all the wrong things to figure out how to map symbol name to module name and suspect it's a tiny, silly thing I'm completely missing. Any pointers would be *GREATLY* appreciated!

Just for reference, the controller is the following, from lspci:
Code:

00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA AHCI Controller (rev 02)

I figured the last one will do...

Thanks in advance for any insight!

-y1

H_TeXMeX_H 06-13-2009 06:32 AM

If you do 'lspci -vv' that will give you the module it's using, for example:

Code:

00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA AHCI Controller (rev 02) (prog-if 01 [AHCI 1.0])
        Subsystem: Intel Corporation Unknown device 5044
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 21
        Region 0: I/O ports at 3428 [size=8]
        Region 1: I/O ports at 3434 [size=4]
        Region 2: I/O ports at 3420 [size=8]
        Region 3: I/O ports at 3430 [size=4]
        Region 4: I/O ports at 3020 [size=32]
        Region 5: Memory at 93225000 (32-bit, non-prefetchable) [size=2K]
        Capabilities: <access denied>
        Kernel driver in use: ahci

So, here 'ahci' is the module.

mRgOBLIN 06-13-2009 06:35 AM

http://www.slackware.com/~alien/tool...d_generator.sh

Also part of current
slackware-current/source/a/mkinitrd/mkinitrd_command_generator.sh

Yalla-One 06-13-2009 06:44 AM

Thanks! ahci seems to be correct! Now how do I figure out what the kernel module names that this depends on ? doesn't it depend on ata and others, as shown in kernel make's help, or is including ahci and reiserfs enough?

As for the mkinitrd-generator, it only suggests USB devices on this system, for some weird reason. No ahci or similar..

Thanks!

H_TeXMeX_H 06-13-2009 06:50 AM

I think ahci and reiserfs should be enough to get it to boot.

Yalla-One 06-13-2009 06:52 AM

hmm - module ahci not found :-( Back to square one I'm afraid...

Code:

[718] root@rex:~#mkinitrd -c -k 2.6.27.7-smp -f reiserfs -r /dev/sda3 -m ahci:reiserfs -l no-latin1 -o /boot/initrd.gz
OK: /lib/modules/2.6.27.7-smp/kernel/fs/reiserfs/reiserfs.ko added.
3561 blocks

it only adds reiserfs, not ahci, and when I try modprobe ahci, it says no such module.

This is when I've booted the -huge kernel in order to build the initrd for the generic one.

H_TeXMeX_H 06-13-2009 07:34 AM

Maybe it's built-in, check:

Code:

bash-3.1$ zcat /proc/config.gz | grep AHCI
CONFIG_SATA_AHCI=y

it's built-in for me, and I'm pretty sure it's built into the generic kernels:
ftp://ftp.slackware.at/slackware-12....neric-2.6.27.7

Yalla-One 06-13-2009 03:28 PM

silly me, it's built into the generic kernel... now works like a charm... duh...

Thanks much!

However, just out of sheer curiousity - one question remains - how do I figure out the name of the module from the "help" section in `make menuconfig` - anyone? ;-)

-y1


All times are GMT -5. The time now is 03:30 PM.