Google Site SearchFN Site Search FN Blog Login FN Blog Login
Site Navigation:

Installing Fedora Core 1 to a SATA Hard Disk on the KT600/VT8237 Chipset

by Mike Insch on April 9, 2004 (Updated April 12, 2004)

1. Introduction

This short article is intended to help you install Fedora Core 1 onto a system which has only a SATA Hard Disk, where that HDD is connected to the SATA/RAID controller on the VIA VT8237 South Bridge. This may also apply to users with other VIA SATA/RAID controllers, notably the VT6410, VT6420 and VT6421.

This article has been updated since it's original posting to correct a small typo / thinko in section 6.  If you have looked at this before, and couldn't get the instructions in section 6 to work for you, please try again!

2. Prerequisites

For this to work, you will need

  1. The three Binary CD's for Fedora Core 1
  2. A 'donor' PC with the same architecture as the machine you need to install to (for driver compiles etc)
  3. The VIA SATA Drivers from:

You need to ensure that your 'donor' PC is of the same CPU architecture as the PC you are installing to - for example, if you are installing to an AMD Athlon system, your donor system must also be running an AMD Athlon CPU. If you do not have a donor PC with matching architecture, you will not be able to load the kernel modules from the driver disk you will be creating! See Section 6 for a (nasty) workaround to this.

You will also need the following packages installed on the donor system

  • kernel-2.4.22-1.2115.nptl
  • kernel-source-2.4.22-1.2115.nptl
  • gcc32-3.2.3-6

NOTE: Do not upgrade the kernel on the donor PC to the latest version until after you have finished installation on the new SATA System!

3. Create the Driver Disk

The first step will be to create the driver disk. For this, you will need to be logged in to the donor PC as root. Switch to the first Virtual Console by pressing CTRL+ALT+F1, and log in.

<>For this section, we will assume that root's home directory is /root, and that you have placed the drivers ZIP file into root's home directory. First, extract the drivers:

Now, change into the directory containing the drivers

cd VIA_RAID_Linux_V100/drivers

Before you can continue, some changes need to be made to the the 'Makefile' in the drivers directory. This is because the files are intended for RedHat 9 - without making these changes the compile will fail! Open the Makefile in your favorite editor, and change




Now, a couple of lines below this, add the line

CC = gcc32

Save the modified makefile, and then execute


This will compile the new kernel modules, and should create a new directory called 'driverdisk', with a file called 'viamraid.img'. This needs to be copied to a Floppy disk, so insert a blank floppy disk, and do

dd if=driverdisk/viamraid.img of=/dev/fd0

You now have a suitable driver disk for the installation on the new SATA Hard Disk

4. Install FC1 onto the new SATA Hard Disk

You are now ready to begin the installation on the new SATA Hard Disk. Instert the first of the three FC1 Binary CD's, and start the PC. Just hit Enter at the Boot: prompt.

Skip media verification, and after a few seconds you will be told that no Hard Disks were found. Select 'Yes' to load drivers. A list of detected devices will appear. Select the "Add Driver" option from the list, then press F2.

You will now be prompted to select the source drive for the Driver Disk, select fd0, and hit OK. Insert the Driver Disk you created on the Donor PC, and select OK again. The installer will now scan the Driver Disk, and should return you to the drivers list.

Select RAID Controller, VIA Technologies from the list of drivers, and hit OK. You should now be returned to the list of detected devices, and you should see the RAID Controller listed. (If you don't, then see Section 6 for information of how to work around this)

From here, just select Done, and carry out your installation as normal

5. After Installation

The newest FC1 Kernel (2.4.22-1.2174.nptl) actually contains support for this SATA controller built-in. To upgrade to the newest kernel (and other components), finish the installation and complete the "firstboot" configuration. When you see the Graphical Logon screen, press CTRL+ALT+F1 to switch to the first Virtual Terminal, then log in as root.

Once you are logged in, do

telinit 3

To shut down X, and go to runlevel 3. Once this is complete, you may need to log in again. Now, you need to change the /etc/modules.conf file, change

alias scsi_hostadapter viamraid


alias scsi_hostadapter sata_via

NOTE: Do Not Reboot after this change is made until the new kernel is installed - if you do, the system won't be able to load the modules needed to access the SATA controller, so your filesystems won't be accessable!

Now, update the system to the newest packages by running

yum -y update

This may take some time, especially if you have installed everything, or if you have a slow internet connection - grab a coffee, watch some TV, come back later!!

Once the updates are complete, the new kernel will be the default, reboot

shutdown -r now

During the restart, Kudzu will pop up and tell you that it has found a "new" VIA SATA controller - select configure, and continue the boot as normal.

That's all there is to it - you now have a current copy of FC1 up an running on a SATA only system. Enjoy...

6. What if the driver doesn't load?

OK, you created the Driver Disk, but the driver didn't load. I had this problem, but I think that is because my donor PC was an Intel P-III, and the PC I was installing to was an AMD Athlon.

I did manage to work around this problem, but the work-around is not for the faint of heart, nor is it for the novice user! WARNING: The workaround contains some severe Bad-Joo-Joo(TM), and requires the use of a Hex Editor to change the generated module files. If you are not sure about what you are doing, STOP HERE - you may be better to wait for FC2 to be released!

If you are still reading this, then you must be desperate, so here we go.

On the install system, switch to VC3 (CTRL+ALT+F3), you will see various messages, however you are interested in the messages about Unresolved Symbols. There should be two, one referring to scsi_register_Rxxxxxxxx, and one to scsi_unregister_Rxxxxxxxx, where the xxxxxxxx is a handy hex string. Take a note of these, and move to your donor PC.

If it's not installed already, install the hexedit package (as root), like this:

yum -y install hexedit

Now, this is your last chance to back out before things get ugly! If you are sure you want to continue, then you need to change into the driverdisk directory

cd /root/VIA_RAID_Linux_V100/drivers/driverdisk

First, take a copy of the viamraid.o-2.4.22-1.2115.nptl file, since you will need it again later

cp viamraid.o-2.4.22-1.2115.nptl viamraid.o-2.4.22-1.2115.nptl.ORIG

Now, open up the file viamraid.o-2.4.22-1.2115.nptl in hexedit, like this:

hexedit viamraid.o-2.4.22-1.2115.nptl

Now, press TAB to switch to the ASCII column, then press CTRL+S for search, enter scsi_register_R as the search term and hit Enter. The cursor will move to the match. You may need to scroll down a couple of lines to see the entire string. You will see that the hex digits after the 'R' are different to those you have noted down - change these to match the ones noted down from the machine you are installing to.

Move back to the top of the file, and repeat the search, this time for scsi_unregister_R, and replace the hex digits there as appropriate as well.

Now, press CTRL+X to save and exit. You now have a module that will load in the installation kernel. (I told you this was an ugly bad-joo-joo(TM) workaround!!)

You need to rebuild the driver disk now, so insert the floppy, and follow through this series of commands:

losetup /dev/loop1 ./viamraid.img
mount /dev/loop1 ./mountpoint
rm -f ./mountpoint/modules.cgz
cd workdir
cp ../viamraid.o-2.4.22-1.2115.nptl ./2.4.22-1.2115.nptl/viamraid.o
find -name "*.o" -type f | cpio -o --format=crc | gzip -9 > ../mountpoint/modules.cgz
cd ..
gzip -9 viamraid.o-2.4.22-1.2115.nptl.ORIG
cp viamraid.o-2.4.22-1.2115.nptl.ORIG.gz ./mountpoint
umount /dev/loop1
losetup -d /dev/loop1
dd if=viamraid.o of=/dev/fd0

This will put the required files onto the floppy disk, including a copy of the original module, which you will need later on...

Follow the installation as described in section 4 - the module should load this time! When you get to the reboot at the end of the install, put FC1 CD1 back into your CD Drive, and boot from the CD. Enter linux rescue at the Boot: prompt to start the rescue system. You will need to load the driver from the driver floppy again.

Once the rescue system is running, do

chroot /mnt/sysimage
cd /root
mount /dev/fd0 /mnt
cp /mnt/viamraid.o-2.4.22-1.2115.nptl.ORIG.gz .
gzip -d viamraid.o-2.4.22-1.2115.nptl.ORIG.gz
cp viamraid.o-2.4.22-1.2115.nptl.ORIG /lib/modules/2.4.22-1.2115.nptl/updates/viamraid.o

Remove the Driver Disk, and the CD. The system should now boot correctly. Follow through the firstboot procedure, then the steps in section 5. That should get you up and running

I know it's an ugly hack, but it worked for me...

7. Thanks

My thanks goes to the users on the #fedora IRC channel, and on the fedora-list mailing list who helped with my initial queries about how to get this working. Without their pointers and information, I would still be looking at an expensive paperweight, rather than a working FC1 system - and this HOWTO would not have been possible!

8. Mini FAQ

Q1 Why didn't you include copies of the driver disk you created to save me this hassle?
A1 Because the driver disks are architecture dependant, and I can't build for all the architectures. Also, my personal philosophy on Linux (and most other things in life) is that you will learn much more by doing than by having things done for you. If you are using cutting-edge stuff like the VT8237, then you probably know enough to follow the instructions in this HOWTO without any problems.

Q2 Isn't it dangerous to edit compiled module files?
A2 Yes! If you change these files incorrectly, you could end up with an unstable system, or worse, corrupt data - and in very extreme cases, with damaged hardware. If you are unsure, wait for Fedora Core 2, which (should) support this controller "out of the box"

Q3 There has to be a better way of updating the modules than using a Hex Editor!
A3 Possibly - I was in a hurry when I did this on my own system, and it seems to have worked A-OK for me.  If you can think of a better, simpler or more elegant way of reaching the same results, please drop me an E-Mail and I will update this article with details.

9. Copyright and Disclaimer

This document is Copyright (C) 2004 Mike Insch. Permission to copy is granted to any user, for any purpose, so long as the this notice remails in tact.

No responsibility will be taken for any damage or loss caused by following the instructions outlined in this document - You're on your own!