# map back a specific kernel module to its option in nconfig

## graysky

/lib/modules/2.6.39/kernel/drivers/scsi/scsi_mod.ko

/lib/modules/2.6.39/kernel/drivers/ata/libata.ko

/lib/modules/2.6.39/kernel/drivers/ata/libahci.ko

/lib/modules/2.6.39/kernel/drivers/ata/ahci.ko

/lib/modules/2.6.39/kernel/drivers/scsi/sd_mod.ko

There are 5 modules that I want to build into my kernel (i.e. not have them as modules).  Does anyone have an idea how I can locate the corresponding options for them in the nconfig?  Searching (F :Cool:  doesn't give me what I need.  Example:

Searching for "SCSI_MOD" gives:

Symbol: SCSI_MOD [=m]

Type  : tristate

But it doesn't tell me where I need to go in the nconfig to locate that specific option.  Searching on others such as "libata" or "LIBATA" gives nothing.  I am reluctant to simply edit the config directly with vim because I know that some of these options may and likely will cause other options to be required as well.

Thanks!

----------

## Veldrin

you want the following options: CONFIG_SCSI, CONFIG_ATA, CONFIG_SATA_AHCI, CONFIG_ATA_SSF, CONFIG_BLK_DEV_SD.

Don't ask how I found them - I just know my way around in the kernel, and the options you wanted are pretty common.

V.

----------

## graysky

Thanks... are you recommending that I edit the config file or locate these from within the nconfig?

----------

## Veldrin

I would suggest yo use menuconfig (cd /usr/src/linux && make menuconfig)

you can either search for them (by omitting config_) or just use the map below.

```
Device Drivers  --->

    SCSI device support  --->

        -*- SCSI device support

        <*> SCSI generic support

    <*> Serial ATA and Parallel ATA drivers  --->

        [*]   ATA ACPI Support

        [*]   ATA SFF support 
```

V.

----------

## graysky

Thanks!

EDIT: dammit, I'm trying to boot without a ramdisk image.  I have compiled in everything for filesystems and SATA drivers (I think) but I still get the following then some kernel panic warnings.  Is there an easy method to tell what I'm missing?

```
VFS: unable to mount root fs on unknown block (0,0)
```

----------

## Veldrin

check if your chipset is built in below Serial ATA and Parallel ATA drivers.

alternativly, use debian hcl - just past lspci -n there, and it gives you an idea which modules need to be built in. 

and don't worry - it is just debain sponsored, but works for other distros as well.

V.

----------

## graysky

Nice!  Compiling now.

```
PCI ID   Works?   Vendor   Device   Driver   Kernel

80862e20   Yes   Intel Corporation   4 Series Chipset DRAM Controller   intel-agp   

80862e21      Intel Corporation   4 Series Chipset PCI Express Root Port      

80863a37      Intel Corporation   82801JI (ICH10 Family) USB UHCI Controller #4      

80863a38      Intel Corporation   82801JI (ICH10 Family) USB UHCI Controller #5      

80863a39      Intel Corporation   82801JI (ICH10 Family) USB UHCI Controller #6      

80863a3c      Intel Corporation   82801JI (ICH10 Family) USB2 EHCI Controller #2      

80863a3e   Yes   Intel Corporation   82801JI (ICH10 Family) HD Audio Controller   snd-hda-intel   

80863a40      Intel Corporation   82801JI (ICH10 Family) PCI Express Root Port 1      

80863a46      Intel Corporation   82801JI (ICH10 Family) PCI Express Root Port 4      

80863a48      Intel Corporation   82801JI (ICH10 Family) PCI Express Root Port 5      

80863a4a      Intel Corporation   82801JI (ICH10 Family) PCI Express Root Port 6      

80863a34      Intel Corporation   82801JI (ICH10 Family) USB UHCI Controller #1      

80863a35      Intel Corporation   82801JI (ICH10 Family) USB UHCI Controller #2      

80863a36      Intel Corporation   82801JI (ICH10 Family) USB UHCI Controller #3      

80863a3a      Intel Corporation   82801JI (ICH10 Family) USB2 EHCI Controller #1      

8086244e   Yes   Intel Corporation   82801 PCI Bridge   i810_rng   

80863a16   Yes   Intel Corporation   82801JIR (ICH10R) LPC Interface Controller   iTCO_wdt   v2.6.28-

80863a22   Yes   Intel Corporation   82801JI (ICH10 Family) SATA AHCI Controller   ahci   v2.6.31-

80863a30   Yes   Intel Corporation   82801JI (ICH10 Family) SMBus Controller   i2c-i801   v2.6.25-

10de06e4      nVidia Corporation   G98 [GeForce 8400 GS]      

197b2363   Yes   JMicron Technology Corp.   JMB362/JMB363 Serial ATA Controller   jmicron   

197b2363   Yes   JMicron Technology Corp.   JMB362/JMB363 Serial ATA Controller   jmicron   

10ec8168   Yes   Realtek Semiconductor Co., Ltd.   RTL8111/8168B PCI Express Gigabit Ethernet controller   r8169   v2.6.25-

104c8024      Texas Instruments   TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)
```

----------

## Veldrin

ah - a jmicron controller...

----------

## graysky

 *Veldrin wrote:*   

> ah - a jmicron controller...

 

It's there but nothing is hooked up to it... perhaps I can leave it out or as a M.

----------

## graysky

Nope... still get the kernel panic at boot :/

----------

## Veldrin

can you post the error? Is it the same as above?

do you have you root fs built into the kernel?

----------

## graysky

Yeah, the error as the same as above.  I have ext4 and ext3 built in (root fs is ext4 and /boot is ext3).

----------

## Veldrin

are you using a option real_root= in your kernel line? if so, change it to root=, real_root is for initrd only.

V.

----------

## graysky

@v - nope...

```
menuentry 'Linux vmlinuz26-ck' --class gnu-linux --class gnu --class os {

        load_video

        insmod part_gpt

        insmod ext2

        set root='(hd0,gpt5)'

        search --no-floppy --fs-uuid --set=root 0fc7ed20-0b1e-4e26-860c-6e63dd3a35ea

        echo    'Loading Linux vmlinuz26-ck ...'

        linux   /vmlinuz26-ck root=/dev/disk/by-uuid/6f90540d-6153-48e3-a5e7-58f09b65c5cf ro quiet vga=775

}
```

----------

## graysky

Turns out I have been doing this correctly all along:I found out my problem: grub2 uses uuids that are different from what is listed in ls -l /dev/disk/by-uuid/  Is this a bug in upstream?  If I replace the uuid that grub2 generated for my root disk with /dev/sdb1 I boot just fine.  When I inspect my /boot/grub/grub.cfg the uuids listed there are correct, however, when I read the error message grub2 gives, every uuid it shows as a "correct" one is different from the output of ls -l /dev/disk/by-uuid/.

```
VFS: Cannot open root device "disk/by-uuid/xxx"

Please append a correct "root=" boot optionl here are the available partitions:

...

...

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
```

WTF?

----------

## Veldrin

use root=UUID=xxx

where xxx is your partitions UUID.

and that is the same way grub used uuid for boot devices.

V.

----------

