LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   How could I compile the driver for SATA manually? (https://www.linuxquestions.org/questions/debian-26/how-could-i-compile-the-driver-for-sata-manually-662807/)

aixilin 08-14-2008 01:17 PM

How could I compile the driver for SATA manually?
 
When I upgrade the kernel to new version 2.6.24, I get errors like :


"Alert:/dev/sda1 doesn't exist. Dropping to a shell."

Then the screen show me Body-box tool.


I think the reason is I use the old config file to configure the new kernel. So it can not find drivers for SATA.


I add libata,sata_via,ata_piix,sd_mod,scsi_mod to /etc/modules and restart.

It still has same problem.


Then I add libata,sata_via,ata_piix,sd_mod,scsi_mod to /etc/mkinitrd/modules, and do :

mkinitrd -o /boot/initrd.img.2.6.24-custom 2.6.24-custom

It show me there is no libata and sata_via,etc..

So I think I need install these modules manually.


I go to /usr/src/drivers/

I find above module's source file...


How could I compile the driver for SATA???

bwayson 08-14-2008 02:59 PM

You're making good progress. The drivers may already be compiled. Look in a location similar to /lib/modules/2.6.24/kernel/drivers/ata/ for files similar to sata_via.ko.

I think you probably need to figure out how to include the necessary sata driver in your initrd. I'm not a mkinitrd expert, so start with "man mkinitrd". Unless you overwrite the initrd file that etch installed (after you have made a backup copy), you will need to modify /boot/grub/menu.lst (if your bootloader is grub) or /etc/lilo.conf (if your bootloader is lilo) to tell the bootloader to load your custom initrd file and not etch's standard one. Good luck -- you are doing well.

Quakeboy02 08-14-2008 03:25 PM

This thread is a dupe. I believe I've finally figured it out and answered in the other thread.

aixilin 08-15-2008 07:40 AM

Quote:

Originally Posted by bwayson (Post 3247764)
You're making good progress. The drivers may already be compiled. Look in a location similar to /lib/modules/2.6.24/kernel/drivers/ata/ for files similar to sata_via.ko.

I think you probably need to figure out how to include the necessary sata driver in your initrd. I'm not a mkinitrd expert, so start with "man mkinitrd". Unless you overwrite the initrd file that etch installed (after you have made a backup copy), you will need to modify /boot/grub/menu.lst (if your bootloader is grub) or /etc/lilo.conf (if your bootloader is lilo) to tell the bootloader to load your custom initrd file and not etch's standard one. Good luck -- you are doing well.

To solve this problem , one method is compile it manually, another method is change .config file before "menuconfig"

I still don't know how to compile the module and let the kernel find it correctly.
So I just can try second method..

Many tks to Quakeboy02. He told me the solution for this problem.
The problem is driver's name is changed in 2.6.2*.
For example , the CONFIG_SCSI_ATA in config-2.6.8 was changed to CONFIG_ATA in config-2.6.24.
Before I use old configure file ,I should rename the modules which were needed by SATA.


Tks for you reply..

aixilin 08-15-2008 07:40 AM

Quote:

Originally Posted by Quakeboy02 (Post 3247797)
This thread is a dupe. I believe I've finally figured it out and answered in the other thread.


Yes, sorry for redo it here..

Appricate for your answers..

I get it now...


All times are GMT -5. The time now is 10:54 PM.