As time marches on, so does technology. As technology marches on, so must our knowledge. Take, for instance, the moment I was faced with my first Linux installation with an Ultra DMA 100 hard drive! What an experience this turned out to be! Are you laughing? You probably shouldn't be if you plan on installing Linux on one of these systems. Fortunately for you, I've taken the time and gone through the suffering so that I may bring you a bit of good news, a smidge of bad news, and a touch of relief.
The good news is that you can, in fact, install Linux onto Ultra DMA disk drives... and it works very nicely. The bad news is that it takes some time, effort, and the tearing down of your machine. The relief? Well good ol' Jack is gonna show ya just how to make it all good!
First things first
First you need to verify that you are, indeed, running an UDMA system. There are a couple of ways to do so. If you already have Linux installed (and are wanting to upgrade or re-install) you can run the mount command without options like so:
which will report, among other things, what device name your hard drive is labeled. Generally this is going to be something like /dev/hda. What we're looking for is the a in hda. Should this be an e or an f, then more than likely you're running an Ultra DMA drive. Pretty simple, I'd say.
The next method involves taking a peek inside your machine. What you want to do here is look at where your hard drive is plugged into the motherboard. If the connector (on the motherboard) is blue, then you're dealing with UDMA. If the connector is not blue, then more than likely it is IDE. (Yet another simple method of detecting the type of drive you are running.) On my test system the UDMA controller was an on-board UDMA 100 controller.
On to the installation
Okay, before you or I go any further, I'm going to make this very clear: BACK UP YOUR SYSTEM! Any time you are dealing with hardware you run the risk of losing data... your data! Back up everything that you possibly can before you move on to these next steps.
Have you backed up? If not, go back to the previous paragraph and read it one more time, with feeling.
Okay... now we're set. Let's set this puppy to barking!
Return to sender: Address unknown
The first thing you need to do is figure out just where your UDMA control lies. The Linux kernel sees these (IDE and UDMA controllers) as very specific addresses, and you are going to have to tell that kernel where you want it to play.
There's a file within your /proc directory called pci which will serve you up more information than you ever thought you could need. To view this file, run the command:
and you will be greeted with a rather lengthy text file that resembles:
PCI devices found:
Bus 0, device 0, function 0:
Host bridge: VIA Technologies Unknown device (rev 2).
Vendor id=1106. Device id=305.
Medium devsel. Master Capable. No bursts.
Prefetchable 32 bit memory at 0xe4000000 [0xe4000008]
Bus 0, device 1, function 0:
PCI bridge: VIA Technologies Unknown device (rev 0).
Vendor id=1106. Device id=8305.
Medium devsel. Master Capable. No bursts. Min Gnt=8
Now, the above section is NOT what you are looking for. Instead you want to look for the following section:
Bus 0, device 17, function 0:
Unknown mass storage controller: Promise Technology
Unknown device (rev 2).
Vendor id=105a. Device id=d30.
Medium devsel. IRQ 10. Master Capable. Latency=32.
I/O at 0x8400 [0x8401].
I/O at 0x8000 [0x8001].
I/O at 0x7800 [0x7801].
I/O at 0x7400 [0x7401].
I/O at 0x7000 [0x7001].
Non-prefetchable 32 bit memory at 0xdd000000 [0xdd000000].
which is describing the UDMA controller addresses. From this section you want to take the very first address (within the list). In this example, I would take 0x8400 as the address of my first UMDA controller.
Armed with this information, you are now ready to run the installation of Linux on your new UDMA.
Now let's get our install on!
Installation will now be a snap! Make sure the drive is connected to the UDMA controller, put your Linux installation CD in, and at the installation prompt, type:
and the installation will go off as normal.
In place of *x**** you will enter your specific UDMA controller address.
Once you have Linux installed on your pretty UDMA drive you might think you're finished. Well, you're not! Try to boot. Go ahead... make me laugh. It seems like it will boot just fine... to a point. Once the machine attempts to find your hard drive, it will kernel panic, and that's, as my dear mother says, All she wrote!
Once you've rebooted your machine, you will need to pass the same parameters to the now-resident kernel that you did for installation. So, at your boot prompt, type:
Again, in place of *x**** you will enter your specific UDMA controller address. Also note:
For Red Hat 7.0, you have to hit [Ctrl]x to get into text mode at boot.
Now your newly installed Linux OS will boot just fine. But you're not out of the woods just yet. Unless you don't mind typing the above command every time you boot Linux, you will want to add an append statement to your /etc/lilo.conf file.
Open /etc/lilo.conf (as root) in your favorite text editor and add the following line:
See above note.
Once you've added the append statement, you have to re-run lilo with the command:
and, if you don’t have any errors in your editing, you will see which OSs lilo has added and, finally, your prompt.
Now you can safely reboot and, when the LILO: prompt appears, hit [Enter] (or type linux), and Linux will boot as it should.
The benefits of using your UDMA controller with Linux by far outweigh the hassle of getting it to work. The speed alone will make you giddy as a child on Jolt Cola!
Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website jackwallen.com.