LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Modules for SATA devices for kernel 2.8.26 (https://www.linuxquestions.org/questions/linux-kernel-70/modules-for-sata-devices-for-kernel-2-8-26-a-700473/)

sreeharsha.t 01-28-2009 06:24 AM

Modules for SATA devices for kernel 2.8.26
 
Hi all,

I am trying to compile kernel 2.8.28 minimistically to work on a machine which has a SATA drive with out using any initrd image. I have compiled some SATA device driver modules into the kernel but when I boot from grub with the new kernel, it is not able to detect my harddisk and gives a kernel panic 'unable to mount root filesystem' error. The same kernel image boots up when tried on a machine with PATA harddisk.

So I guess I am missing some needed SATA modules in the new kernel...

i selected the following device drivers under
--- Serial ATA (prod) and Parallel ATA (experimental) drivers
[*] SATA Port Multiplier support

<*> AHCI SATA support

<*> Silicon Image 3124/3132 SATA support
[*] ATA SFF support

<*> Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support


and In the File systems section
I have included everything under ext2 and ext3 file systems.. My hard disk is formatted with ext3 filesystem..and my motherboard is an intel chipset..

Am i missing anything here? If so, what modules should I need to include in the kernel?

Quakeboy02 01-28-2009 11:01 PM

I believe you mean 2.6.28. Right?

Have you ever managed to compile a working kernel before? If yes, was it this same kernel? There is one step that needs to be taken before reinstalling the same kernel: you have to remove /lib/module/<kernel version>. Usually it's best to just rename it until you reboot into the new one, like so:
Code:

sudo mv /lib/modules/`uname -r` /lib/modules/`uname -r`.bak
Note that those are backquotes, not single quotes.

If you haven't managed to make a working kernel before, then please get that part of it working, before you try to make changes.

What distro are you using? That might help us. Did you start with the .config from your old kernel? If not, try again, using that. Also, in the .config file, the CONFIG_ATA module must be set to "*".

sreeharsha.t 01-28-2009 11:24 PM

Hi Quakeboy02,

My bad.. I mistakenly referred to kernel 2.8.28..(which doesnt exist as of now..)and what you guessed is correct.Its 2.6.28..

I am using RHEL 5, I am not compiling this new kernel for upgrading my existing kernel. I want to build a minimal kernel which is required to run on a machine which has SATA hard disk.
I didnt start compiling the kernel from the old .config file of my existing kernel as I dont want all the modules into this new kernel, I want to make it as minimal as possible by using some utils from busybox.
I tested this newly compilied kernel on a machine which has a PATA hard disk and it worked fine. but, the same gives a kernel panic on a machine which has SATA hard disk and the reason being no partitions on the hard disk found even after including some SATA device drivers(Both machines are of same architecture-i686)

I have CONFIG_ATA set to * in the new .config which I have used for the compilation.
this is some excerpt from my .config file

# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_SRP is not set
# CONFIG_SCSI_DH is not set

CONFIG_ATA=y
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_SATA_PMP=y
CONFIG_SATA_AHCI=y
CONFIG_SATA_SIL24=y
CONFIG_ATA_SFF=y
# CONFIG_SATA_SVW is not set
CONFIG_ATA_PIIX=y

# CONFIG_SATA_MV is not set
# CONFIG_SATA_NV is not set
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SX4 is not set
# CONFIG_SATA_SIL is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_PATA_ALI is not set
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
# CONFIG_PATA_CS5535 is not set
# CONFIG_PATA_CS5536 is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
# CONFIG_ATA_GENERIC is not set
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_MARVELL is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_OLDPIIX is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_NS87415 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RZ1000 is not set
# CONFIG_PATA_SC1200 is not set
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set
# CONFIG_PATA_SCH is not set
# CONFIG_MD is not set
# CONFIG_FUSION is not set


Do I have to include any more modules?

Quakeboy02 01-29-2009 12:34 AM

Quote:

Originally Posted by sreeharsha.t (Post 3424758)
I am using RHEL 5

Just to let you know, I'm a Debian user, so if I say anything that is just plain dumb when applied to RHEL, please let me know. :)

Quote:

I am not compiling this new kernel for upgrading my existing kernel.
My question was meant to find out if you've ever successfully compiled a kernel, and to see whether you were using a config that actually works on this machine with this kernel, to start with. Sometimes it's easier to subtract than it is to figure out what to add.

So, you could either do it that way, or we can try to figure out which things to add back. We could start with a diff of the running config and this new one, but that's probably going to be pretty large. Maybe you could do the diff and grep on ATA to narrow it down? (ATA not SATA just to be sure you're not using a PATA driver currently.) Also, do an "lspci -v" and look for the kernel module that controls your disk controller. But, my preference would be to get you running using your existing config and then work backwards. It's pretty easy to use "make xconfig" and uncheck boxes to make it minimal.

I think that has it covered for now. It's 1:30 AM, so I may not get back to this till tomorrow.

sreeharsha.t 01-29-2009 09:46 AM

Hey, Thanks a lot.. :)

Quote:

Originally Posted by Quakeboy02 (Post 3424801)
Sometimes it's easier to subtract than it is to figure out what to add.

So, you could either do it that way, or we can try to figure out which things to add back. We could start with a diff of the running config and this new one, but that's probably going to be pretty large. Maybe you could do the diff and grep on ATA to narrow it down?

I went this way and included everything under SATA in the kernel.. and it worked! :)
Now.. I will subtract those SATA modules half at a time to see which one fits it.

Quakeboy02 01-29-2009 12:29 PM

If you will run the following command, it should tell you which module controls each bit of hardware. Just look for your disk controllers.
Code:

lspci -v


All times are GMT -5. The time now is 09:05 PM.