Unofficial Asus A7V and Linux ATA100 Quasi-Mini-Howto
by Aaron Cline
last updated 01.27.2001
Per la versione in italiano (trad. a cura di Antonluigi Federico), cliccare qui.
Welcome, I would call this a HOWTO, but I've never written one before and so I don't know if it qualifies. I recently bought a new system with an A7V motherboard and for a while I couldn't figure out how to boot and load Linux off of the Promise ATA 100 onboard controller. I also couldn't find any good help and believe me, I tried. Finally, after reading through multiple newsgroups and many posts I was able to piece together a course of action. In time I was successful and I intent to show you how you can be too. Now, this is just what I did, so your mileage may vary.
First, let me introduce you to my hardware.
Second, I am using RedHat 6.2 and I already have a Win95 partition on the drive (not that it really matters). I have the DVD and the CD-RW on the regular ATA-66 controller. I have read some newsgroup posts saying that it is better to set it up this way.
2. Installing and Booting Linux on Your Promise ATA 100 Controller
2a. Finding Your Promise I/O
Installing Linux to your ATA 100 is really a fairly simple two part process. The first thing you need to do is find out what I/O address your Promise IDE Controller operates at. To start, boot from your linux CD or Bootdisk. The first screen you see has
Welcome to Red Hat Linux 6.2!at the top as asks you whether you would like to perform a graphical, text, or expert install. Hit enter and continue into the graphical install. At the first graphical install screen press Ctrl-Alt-F2 to get to a command prompt. You should see a command prompt that looks like the following. If not, press Alt-F4, or Alt-F3, or Alt-F1 until you find it.
bash#Now, you need to look at the /proc/pci file. Do a "cat /proc/pci | less" and look for some information about a Promise Controller. Somewhere in the output you should see something similar to:
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. (A) I/O at 0x9400 [0x9401]. (B) I/O at 0x9000 [0x9001]. (C) I/O at 0x8800 [0x8801]. (D) I/O at 0x8400 [0x8401]. I/O at 0x8000 [0x8001]. Non-prefetchable 32 bit memory at 0xd5800000 [0xd5800000].
Please note the the letters A, B, C, and D are only for reference. These 4 lines contain the I/O addresses that you will need to make the installation "see" your Promise ATA100 controller. These are the numbers that I have in my /proc/pci. I assume that if you have an Asus A7V with BIOS 1003 that you may have the same numbers. If so you can use this command:
ide2=0x9400, 0x9002 ide3=0x8800, 0x8402If not, I will show you how to derive the LILO command that is right for you.
The format for this ide command is easy and listed below.
ide2=A, B+2 ide3=C, D+2When referencing the variables look at the example. On line A you see the I/O address of 0x9400 (disregard the addresses in the brackets). You plug that into the equation above. Then you grab the line B address and add 2 and so on until you have all 4 variables done. Write this command down because you will need it when you reboot.
2b. Installing and Booting Linux
Now that you have written down this information, you need to reboot from the CD or Bootdisk again. When you get to the initial screen
Welcome to Red Hat Linux 6.2!type your ide commmand at the boot prompt like so:
boot: text ide2=0x9400, 0x9002 ide3=0x8800, 0x8402I have found that the graphical mode does not seem to work very well. I can only assume that it uses a differently configured kernel or something. If you want to try graphical mode you can access it by typing:
boot: vmlinuz ide2=0x9400, 0x9002 ide3=0x8800, 0x8402But do not complain to me if it doesn't work. I only sanction the text mode. :)
This should allow you to continue on with RedHat setup and now it should find any HDD on the ATA 100 controller. You should have no problem installing linux. It is important that you make a bootdisk if you have an Athlon or Duron processor. I'll explain why in a bit. Also, I went ahead and installed Lilo in the MBR and didn't have any problems.
It is important to remember that you will always have to pass your ide command at the LILO prompt unless you add the "append" command to your lilo.conf. When you do your lilo.conf should look like this:
image=/boot/vmlinuz-2.2.14-5.0 label=linux read-only root=/dev/hde9 append="ide2=0x9400, 0x9002 ide3=0x8800, 0x8402"
And as always, whenever you modify your lilo.conf file be sure to run /sbin/lilo as root to reinstall lilo or you may not be able to reboot.
If in fact you do have an Athlon or Duron processor and are using RedHat 6.2, you may not successfully reboot. An error will be given regarding a CPUID Serial Number. This stumped me for awhile before I found the answer. To get around this error this I had to boot from the previous made bootdisk. I then had to pass the following commands to the kernel at the LILO prompt:
linux x86_serial_nr=1 ide2=0x9400, 0x9002 ide3=0x8800, 0x8402The "x86_serial_nr=1" tells the kernel not to look for the CPUID. This should get you to the login prompt, if it does not then you have made and error somewhere or I have steered you wrong (which is more than entirely possible:). If you have an Athlon or Duron then you must create a new kernel that does not look for a CPUID or you will have to use this bootdisk method to boot until you do.
3. Running Linux at Full ATA 100 Speed
I have currently been able to get the 2.4-test10 kernel working well with RedHat 6.2. This new kernel has a Promise driver that I have built into the kernel. This is part of my kernel config.
# # IDE, ATA and ATAPI Block devices # CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_BLK_DEV_IDECD=y CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m CONFIG_BLK_DEV_IDEPCI=y CONFIG_IDEPCI_SHARE_IRQ=y CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_IDEDMA_PCI_AUTO=y CONFIG_BLK_DEV_IDEDMA=y CONFIG_IDEDMA_PCI_WIP=y CONFIG_BLK_DEV_PDC202XX=y CONFIG_BLK_DEV_VIA82CXXX=y CONFIG_IDEDMA_AUTO=y CONFIG_IDEDMA_IVB=y CONFIG_BLK_DEV_IDE_MODES=y
It is important to note that in order to use a 2.4 kernel you must install some new packages. Read ~/Documentation/Changes for the full details. An excerpt follows.
o Gnu C 2.91.66 # gcc --version o Gnu make 3.77 # make --version o binutils 18.104.22.168.25 # ld -v o util-linux 2.10o # kbdrate -v o modutils 2.3.18 # insmod -V o e2fsprogs 1.19 # tune2fs --version o pcmcia-cs 3.1.21 # cardmgr -V o PPP 2.4.0 # pppd --version o isdn4k-utils 3.1beta7 # isdnctrl 2>&1|grep version
This kernel should boot without the ide commands being passed to it. It should also recognize that your HD is running in UDMA5 or UDMA4 mode. I have found a pretty good Hard Drive benchmarking page here. (http://www.linuxhelp.net/guides/davion/hdtweak.phtml)
You will also want to grab the latest hdparm utility here. (http://www.linux-ide.org)
4. Hard Drive Benchmarks
So you may be asking, "Is this all worth it? What kind of performance am I gaining here?". Well, I asked myself pretty much the same question. So I went out to Freshmeat.net and found a little program call Bonnie++ that tests your hard drive pretty thoroughly, or at least I think it does. You can find Bonnie++ here. (http://www.coker.com.au/bonnie++/).
I used the stock 2.4 kernel from www.kernel.org and the 2.2.14-5.0 kernel that comes with RedHat 6.2 for my testing. I'll show you the raw numbers and then try to explain them if I can.
2.4 Version 1.00g ------Sequential Output------ --Sequential Input- --Random- -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP eros 392M 8718 96 31940 15 6951 5 7407 78 19006 7 159.0 0 ------Sequential Create------ --------Random Create-------- -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 853 99 +++++ +++ 19816 99 852 99 +++++ +++ 3959 100
As far as I can understand there are 12 tests. Each one measures two variables. The first variable is amount of work done and the higher value is better. The second value is time taken from the processor and the lower the value the better.2.2.14 Version 1.00g ------Sequential Output------ --Sequential Input- --Random- -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP eros 392M 3526 94 5604 67 2254 52 3002 94 4554 90 127.4 0 ------Sequential Create------ --------Random Create-------- -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 772 99 2089 99 16842 100 894 97 28430 98 3566 100
I have received an email from Michael Monsen stating that he has succeeded in using this method with Mandrake 7.2. He did add that it seemed that the kernel would lock when trying to bring up the USB interface. He has put up a page (http://www.themonsens.org/michaelfamily/a7v_and_mandrake_7.2) to describe his process for you Mandrake users.
TOSKO has written in regarding running the Debian Potato 2.2 and 2.2 Rev2 on the Asus A7V. He said that you get the addresses the same. When you boot into the install use this command:
linux ide2=0x9400, 0x9002 ide3=0x8800, 0x8402instead of the 'text' command.
Near the finish when it asks you about the LILO installation you will see something like this.
1) /dev/hdaHe says that option 2 will not work. 3 will work but you'll always have to boot from disk. You want to chose 1, but before you do that you need to note that /dev/hda is not where your HDD is. He says that to fix this you should immediately open a terminal and make a symbolic link from hda to hde like so:
rm /dev/hdaThen you must also choose the option "Kernel Loader Options" and put the ide statements in it.
ide2=0x9400, 0x9002 ide3=0x8800, 0x8402He says that after this your will have no problem booting.
Please email me if you have any suggestions, comments, or successes. email@example.com
Thanks to those who have read it and thanks to the UDMA-Howto for showing me the ide command.
Thanks to Govardhanen Gopal for his suggestions regarding readability.
Thanks to Antonluigi Federico for traslating this into Italian.
Thanks to Michael Monsen for his information regarding Mandrake 7.2.
Thanks to the man named TOSKO for the Debian Potato info.