Promise SATA Tx2Plus on Linux


Home Page | Comments | Articles | Faq | Documents | Search | Archive | Tales from the Machine Room | Contribute
Important: Read this! I had the (mis)fortune of having this controller, so I started fooling around to install it on my system. This is the account about how I did it.

I used Slackware 9.1 as distribution, I guess it can be done with every distribution if you have the possibility of loading a driver from a floppy before starting the real installation.

note: I assume that you want to install Linux on the SATA disk and keep it as the only disk on your system, booting from it, if you just want to add it as a spare disk to your IDE system you don't need this document. Just load the driver and mount your disk.

The Controller The Tx2 is a SATA controller that can control 2 SATA disks and 2 Ultra ATA disks, the controller came with 2 SATA cables (that I almost threw away thinking they were a couple of plastic stripes).

The driver are available on Promise's web site for SuSE, RedHat, Mandrake and as source code for other distributions.

Required software First of all, you need a working system, a system with the kernel sources, the controller driver and possibly the same kernel version you want to install on the new disk.

Since the controller have to work before you can do something with it, if you want to boot from that controller, you need to have a system that can boot from a SCSI controller. Check your BIOS settings.

If your system can't boot from a non-IDE disk, then it's time to shop for another motherboard.

Another thing, is that you need RAM disk and Initial ramdisk support in the kernel.

The boring theory The following is reported in many documents and how-tos, is here only to make things complete.

How do you boot from a device? Well, first of all, the BIOS call the controller and read a (small) bit of code from the boot records, this bit of code should be able to start reading a bigger bit of code using a physical pointer to a device, the second bit of code is supposed to be the kernel, that unfold itself in memory and start working his magic.

If the kernel is able to access the hardware, everything is supposed to work.

But what if the kernel require an extra driver?

Well, you need a ramdisk then.

The idea is to have the kernel load a compressed images of a root partition that contains the driver and the various bits required to load the driver, then mount the image in memory, load the driver, discard the image and go on with other stuff.

Now, this is the theory, let's see the practic.

How to make a boot image To prepare the boot image you can go two ways: you can use a script called 'mkinitrd' or you can do that by hand.

I'm lazy, so I used the script. The problem is that the script was designed for BSD (I think) and doesn't work very well on Linux, so I had to hack the code a little bit.

Actually the hacking of the code was because the script uses mktemp with a -d switch that ain't supported under Linux, so I had to remove the file created by mktemp and make a directory instead.

You can get the modified script here.

Attention: the mkinitrd package contains more software and not only the script itself, so, if you don't already have it, get and install the whole package, do not just get the script from here.

Addendum: Slack 10 ships with an already corrected mkinitrd, so it works out-of-the-box.

To make the image you need the driver (dho!) and a statically compiled version of insmod. Check if you have such static version, I had problems because my 'static' version wasn't static... so, if your /sbin/insmod.static is 6 Kb or such, get the source code for binutils and recompile it statically.

Once done, you can use

mkinitrd --with pdc-ultra imagename `uname -r`

to buid the image named imagename.

If your kernel doesn't have scsi support compiled built-in, you have to add --preload scsi_mod --preload sd_mod to load the required SCSI modules.

Another important thing is that you need a directory /initrd in your root partition on the disk, otherwise you'll receive errors when the system try to unload the 'fake' root partition.

Configure the boot loader When you have your image is matter to configure your boot loader, for LILO is just a matter of adding initrd=imagename in the configuration file and run lilo -v to install it.

Now, if everything is correct, you should be able to reboot your machine and boot directly from the SATA disk.


Comments

Max length of comments: 1000 chars.

nessun commento.

Add a comment (max 1000 chars)

Comment from:
Comment:


Author Davide Bianchi, works as Unix/Linux administrator for a "network security" company of Haarlem.
Contacts: mail: davide AT onlyforfun.net , ICQ: 268751033, Jabber: davideyeahsure AT gmail.com Skype: davideyahsure

Contribuire Volete contribuire? Leggete come!

Copyright This site is made by me with blood, sweat and gunpowder, if you want to republish or redistribute any part of it, please drop me (or the author of the article if is not me) a mail.

This site was composed with VIM, now is composed with VIM and the (in)famous CMS FdT.

This site isn't optimized for vision with any specific browser, nor it requires special fonts or resolution.
You're free to see it as you wish.
Web Interoperability Pleadge is this a valid html document?

Last Update: 04/12/2008