You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

If you own a motherboard with the Promise PDC20378 FastTrack 374 SATA/RAID controller you probably know the same frustration as me. Part of the problem with the PDC20378 and Linux is the fact that the PDC20378 has both SATA and PATA ports in the same device. The standard Linux implementation for ATA devices does not support a device with some SATA and some PATA ports. Devices are either SATA or PATA (not BOTH). Add to that the fact that Linux does not understand the RAID array metadata for the PDC20378. Here are some of the issues with the PDC20378.

Promise has a proprietary RAID driver only for kernel version 2.4

Linux only has an SATA driver (PATA port not supported)

The Linux developers have no definite plans for PATA support on the PDC20378

The few patches for PATA support are not for the "standard" kernel sources (only modified distros)

I have found a number of things that can provide solutions to some of these problems. For one thing, I reverse engineered the UBUNTU patch for PATA support and created a patch for the "standard" 2.6.17 version of the Linux kernel. I had to do that to support my RAID 0+1 configuration. I have two of my hard disks on the PATA port of my PDC20378

The whole patch appears at the end of this post.

Here are some solutions to using the PDC20378 in various configurations.

For the "standard" Linux kernel version 2.4 you can support one of these configurations.

If you can find a distro patched for PATA support you can support these additional configurations.

Two SATA disks and/or two PATA disks

Any kind of Linux software RAID on SATA and/or PATA

With kernel version 2.4 you have basically three different choices of drivers. If you want to use the "fake simulated hardware RAID" implemented in the BIOS and Windows driver, you can download the proprietary "ft3xx" driver from the Promise web site. The "ft3xx" driver supports SATA and/or PATA, but ONLY in a RAID configuration. You can download a driver for Suse Linux, or the partial sources to compile your own. You can use the "standard" Linux driver, called "sata_proimse" that only supports two SATA drives (no PATA) in a non-RAID configuration. You can possibly find an older patched version of "sata_promise" in a 2.4 distro such as UBUNTU, FC or GENTOO that supports the PATA drives in addition to SATA. You can use the Linux software RAID with the "sata_promise" driver.

Assuming you decide to use the "ft3xx" driver, the process is quite involved. I posted a previous thread here about how to do that. Basically you have to compile and test the "ft3xx" driver using the partial sources from Promise. You probably need a normal hard disk on some other controller to do that. You have to create an "initrd" image that loads the "ft3xx" driver, since the driver will ONLY build as a module, not as part of the kernel.

The "sata_promise" driver is part of the "standard" Linux distro, but Linux only officially supports two SATA drives. You can easily build that driver in the normal way. The "sata_proimse" driver does not understand the "hardware RAID" sets, created by the BIOS and accessed by the Windows RAID driver for the PDC20378. Of course you can use the Linux software RAID, treating the PDC20378 as a "normal" SATA controller.

If you can find a version of 2.4 that has the appropriate patch, you can build that driver and have PATA drives along with the SATA drives. I use the "ft3xx" driver with version 2.4 and didn't try to find or develop a patch for that version of "sata_promise".

For version 2.6 of the kernel, your options are more limited. Promise has made no effort to update the "ft3xx" driver for 2.6 and has made no promise either. I looked at the effort involved in updating their driver and concluded that it was considerable, and might not even be possible. Promise does not provide all of the sources, only some of the sources.

Here are the possibilities with the "standard" Linux kernel version 2.6

Two SATA disks using the standard Linux "sata_promise" driver

RAID 0 or RAID 1 on SATA (NOT RAID 0+1) using "dmraid"

Any kind of Linux software RAID on SATA using "sata_promise"

If you use the patch for PATA support you have these additional possibilities for 2.6

Two SATA disks and/or two PATA disks

RAID 0, RAID 1, or RAID 0+1 using "dmraid"

I happen to use the Slackware distro that is essentially the unmodified Linux kernel. Since no "standard" Linux kernel release supports PATA in the "sata_promise" driver, I could not access my PATA drives, and could not access the mirror drives for my RAID 0+1 configuration. That's why I finally updated the patch for the driver. I chose 2.6.17 because it was the last stable release and is working well for me. 2.6.18 has not yet been officially released (that I know of). NOTE: No known plans for the "standard" 2.6.18 to support PATA on the PDC20378.

To use the "fake hardware RAID" provided by the BIOS and Windows RAID driver you need the "dmraid" utility. The "dmraid" program is essentially a RAID set detection and disk mapping program. It works in conjunction with the device-mapper in Linux to map the correct areas of the RAID volumes to "mapped" devices and partitions in "/dev/mapper".
You can download the "dmraid" program from http://people.redhat.com/~heinzm/sw/dmraid/

I don't claim to have invented the PATA patch for the "sata_proimse" driver. Someone else was kind enough to do that, and others ported it to a few distros. What I did was edit the standard 2.6.17 version of "sata_proimse" and create the appropriate patch. The real question is, "Will this change ever be put in the standard Linux kernel?". So far that doesn't appear promising.

Here is the PATA patch.
WARNING: I have done limited testing to verify correct operation in my configuration (both read and write). Use at your own risk. This patch is not officially supported but I will try to help if anyone has problems. I recommend starting by mounting any filesystems in read-only mode and checking carefully for problems.

I am trying to apply the patch to a vanilla 2.6.17.9 kernel. I have downloaded the kernel from kernel.org and have created a bz2 file from your patch. Then i cd to the kernel source dir and use the command: