# [SOLVED] Kernel can't see my hard drives

## elegos

Hello there!

I've asked for help in the italian forum, but no one seems to have the answere to my problem...

I've compiled the Kernel (x86_64) just emerging the gentoo-source and using "genkernel --menuconfig all" command, in order to enable the support for my Intel PRO/Wireless 3945ABG WiFi Card. (tried also only with "genkernel all").

The problem is on the startup:

```
>> Activating mdev

ls: : No such file or directory

>> Determining root device...

/init: /init: 453: blkid: not found

!! Could not find the root block device: UUID=3db5ba52-3de9-486e-8e68-6a9c995bd9ac is not a valid root device
```

This with the real_root as UUID:

```
title           Gentoo 2008.0 beta 2

root            (hd0,4)

kernel          /boot/kernel-genkernel-x86_64-2.6.24-gentoo-r8 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=UUID=3db5ba52-3de9-486e-8e68-6a9c995bd9ac udev

initrd          /boot/initramfs-genkernel-x86_64-2.6.24-gentoo-r8
```

Changing it to /dev/sda5 (where Gentoo is installed) something changes, but I'm still stuck at that step:

```
>> Determining root device...

!! Block device /dev/sda5 is not a valid root device...

!! Could not find the root block device in .
```

This time real_root as /dev/sdXN:

```
title           Gentoo 2008.0 beta 2

root            (hd0,4)

kernel          /boot/kernel-genkernel-x86_64-2.6.24-gentoo-r8 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda5 udev

initrd          /boot/initramfs-genkernel-x86_64-2.6.24-gentoo-r8
```

What can I do? It seems that the kernel isn't recognizing my Hard Disk! (even if I can start i.e. Ubuntu, both 32 and 64bit).

Typing shell, then "ls /dev | grep sd" nothing returns me. typing "ls /dev | grep hd" the shell finds hda, wich btw isn't a valid root device to mount to /newchroot...

Can someone please help me?

Thanks

P.S.

Here is "lspci | grep SATA":

```
00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03)
```

Last edited by elegos on Mon May 26, 2008 9:31 pm; edited 1 time in total

----------

## dnadesign

Hi, you need to check if your new kernel has modules for your ATA/SATA interface. I'm about 95% certain that it hasn't (had a similar issue). Check your chipset manufacturer and add the necessary modules to the kernel.

----------

## elegos

is this what I need? And so, how can I find a patch and include it into the kernel?

from lshw (on Ubuntu 32bit)

```
        *-storage

             description: SATA controller

             product: 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller

             vendor: Intel Corporation

             physical id: 1f.2

             bus info: pci@0000:00:1f.2

             logical name: scsi0

             version: 03

             width: 32 bits

             clock: 66MHz

             capabilities: storage msi pm ahci_1.0 bus_master cap_list emulated

             configuration: driver=ahci latency=0 module=ahci

           *-disk

                description: ATA Disk

                product: FUJITSU MHW2160B

                vendor: Fujitsu

                physical id: 0.0.0

                bus info: scsi@0:0.0.0

                logical name: /dev/sda

                version: 891F

                serial: K10NT772HMH9

                size: 149GiB (160GB)

                capabilities: partitioned partitioned:dos

                configuration: ansiversion=5 signature=7c98417e
```

Thanks  :Smile: 

----------

## dnadesign

You don't need a patch. You just need to mark the right options in your kernel config before compiling.

Here is what I have in my kernel:

Device drivers -> Serial ATA (prod) and Parallel ATA (experimental) drivers

 - AHCI SATA support

 - Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support

 - Intel PATA MPIIX support

Device drivers -> ATA/ATAPI/MFM/RLL support

 - Intel PIIXn chipsets support

I have them built into the kernel, leave others as they are.

For the future notice: use genkernel --menuconfig --no-mrproper all to keep your current config.

----------

## elegos

I only want to say: thank you, that was the one missing  :Smile: 

I think it can be considered a bug, since the x86 config file has that set by default (gentoo 32bit worked fine)

THANK YOU!

----------

## dnadesign

For future uses.  :Smile: 

If you want to maintain your current config when upgrading the kernel:

1. Emerge to new gentoo-sources

2. Copy the /etc/kernels/kernel-config-YOUR_CURRENT_KERNEL_VERSION into /etc/kernels/kernel-config-YOUR_NEW_KERNEL_VERSION

3. Change the directory into /usr/src/linux

4. Run genkernel --no-mrproper --menuconfig all

Thanks to this, when upgrading your kernel to a newer version, you'll retain your current kernel configuration and be able to make some adjustments.  :Smile: 

If you only want to make adjustments to your current kernel config, then do only step 4.

Good luck & enjoy your Gentoo.  :Smile: 

----------

