OpenWrt Forum Archive

Topic: SATA HDD x86

The content of this topic has been archived on 5 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

I am trying to add an extra hard disk (to use as a NAS) to my x86-generic router, but I still have not luck. I use the latest SVN trunk.

It is an Samsung SATA HDD connected to a VIA VT8237 southbridge. It does not show up as /dev/hdb, /dev/sd* or whatever, even if I add extra packages defined under Kernel Modules -> Block Devices.

Also, if I add kmod-ata-via-sata (as module or compiled), it still does not show up. Even compiled as a package, I can“t find the opkg package kmod-ata-via-sata.

I tried kernel 2.6.30 and 2.6.28, but without luck. Is there something more I have to do? The BIOS does show the hard drive and Ubuntu 9.04 runs perfectly from a SATA disk.

Thanks in advance,
Basil

(Last edited by basilfx on 14 Sep 2009, 21:13)

I finally fixed my problem.

This is how I did it:
* 'make menuconfig' -> disable all kernel block modules
* kernel boot parameters -> root=/dev/sdb2 instead of root=/dev/hda2 (my CF module is /dev/sdb)
* 'make kernel_menuconfig' -> Device Drivers -> Block Devices
* disable 'ATA/ATAPI/MFM/RLL support'
* Enable 'Device / Serial ATA (prod) and Parallel ATA (experimental) drivers" and "Device Drivers / SCSI device support'
* Under previous option, enable SATA drivers for VIA PATA and VIA SATA (can be configured when selecting latest option). Make sure you compile this as build-in!
* Under SCSI support, enable Generic Disk Support (to enable /dev/sd* numbering).

If you can boot your firmware, then everything succeeded. The standard kmod-* modules do not enable /dev/sd* and since it is compiled as a module, it does not load before mounting rootfs. By disabeling the old IDE driver (and thus disable /dev/hd*) and switch to the new one, I could acces my extra harddisk.

(Last edited by basilfx on 16 Sep 2009, 10:48)

Out of interest - what platform are you running on: motherboard, cpu, etc

thx!!

The discussion might have continued from here.