murty@solar.m u r t y.n e t
April 26, 2002
Revision History | ||
---|---|---|
Revision 2.0 | 2002-05-10 | Revised by: mr |
Major enhancements | ||
Revision 1.3 | 2002-05-07 | Revised by: jyg |
format fixes | ||
Revision 1.2 | 2002-04-30 | Revised by: mr |
Minor fixes | ||
Revision 1.1 | 2002-04-28 | Revised by: ldl |
Some minor changes and sgml-improvements | ||
Revision 1.0 | 2002-04-26 | Revised by: mr |
Initial Release |
First of all we need a bit of legalese. Recent development shows it is quite important.
This document is copyrighted � 2002 Murty Rompalli and is distributed under the terms of the GNU Free Documentation License and additional terms described below.
This Linux HOWTO document may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies. Commercial redistribution is allowed and encouraged; however, the author would like to be notified of any such distributions.
All translations, derivative works, or aggregate works incorporating this Linux HOWTO document must be covered under this copyright notice. That is, you may not produce a derivative work from this HOWTO document and impose additional restrictions on its distribution. Exceptions to these rules may be granted under certain conditions; please contact the Linux HOWTO coordinator at this address <linux-howto@metalab.unc.edu>.
In short, the author wishes to promote dissemination of this information through as many channels as possible but wish to retain copyright on this HOWTO document, and would like to be notified of any plans to redistribute this HOWTO document.
The newest version of this HOWTO will always be made available on my website http://www.murty.net/ataraid/, or you may contact me directly at <murty at solar . murty . net> to check if there is a newer version.
Currently, this document is available in the following formats:
HTML.
Note that paper sizes vary in the world, A4 and US letter differ significantly. You might also wish to consider using the universal format (8.27x11in; 210x279mm).
Your name here, if you contribute :)
Luc de Louw <luc at delouw.ch> corrected errors in my SGML source.
Joy Y Goodreau <joyg at us.ibm.com> corrected errors in my SGML source.
Feedback is most certainly welcome for this document. Without your submissions and input, this document wouldn't exist. Please send your additions, comments and criticisms to the following email address : <murty at solar. murty . net>.
This section lists what items are required before you start installing on your computer.
Two blank floppies, DOS formatted. On a working linux computer, you can type mkfs.msdos /dev/fd0
Red Hat Linux 7.2 CDs 1 and 2 (3 and 4 contain SRPMS and are not required)
Your computer with working CD, floppy,10/100 ethernet card support
Insert the floppy with the driver tar ball into a working Linux computer and type:
mount /dev/fd0 /mnt/floppy cd /mnt/floppy cp rhsmp-ft12014.tgz /tmp tar xvzf /tmp/rhsmp-ft12014.tgz cd / umount /mnt/floppy |
Label the floppy �Promise FastTrack driver� and set it aside.
![]() | NOTE |
---|---|
If you already have Red Hat Linux 7.2 CDs 1 and 2, skip this step. Otherwise, read this step to learn how you can get them for free. |
Point your browser to the Red Hat Web site: ftp://ftp.redhat.com/pub/redhat/linux/7.2/en/iso/i386/.
Browse and locate enigma-disc1.iso (the first disk of Red Hat 7.2), and save this file to your Windows desktop.
Right-click on the iso image created on your desktop and choose "Record to CD" It will then write the iso image onto your CD-R and create disk-1.
Repeat the procedure for the second iso file named enigma-disc2.iso on ftp.redhat.com/pub.
Test to make sure your CD-Rs are indeed readable. If you click on �My Computer� and click on the CD Writer Drive icon, you should be able to browse the contents of the CD-R.
Label the CD-Rs properly: RH 7.2 disk-1 and RH 7.2 disk-2
Once you have created your CDs, you are ready to begin installing Red Hat 7.2 on your Linux system.
Inside this BIOS, choose "delete array," "define array," and "choose Mirror."
Insert your Red Hat 7.2, disk-1 into your CD-ROM and reboot.
linux noprobe |
![]() | NOTE |
---|---|
Please do not click on �Skip boot disk creation�. If you skip this step and do not create a Boot Floppy disk, you will be very sorry later. |
When the installation is finished, you will see �Congratulations� screen.
cd /mnt/sysimage/lib/modules/2.4.7-10/kernel/drivers/scsi |
Make sure your Driver floppy is mounted. Go into the floppy and type
mv module.cgz /tmp cd /tmp gzip -dc module.cgz | cpio -idumv |
Now, you will see a bunch of directories created under /tmp.
cd /tmp/`uname -r` cp ft.o /mnt/sysimage/lib/modules/`uname -r`/kernel/drivers/scsi |
less /mnt/sysimage/etc/lilo.conf |
/mnt/sysimage/usr/sbin/chroot /mnt/sysimage /sbin/mkinitrd \ --preload jbd \ --preload ext3 \ --preload scsi_mod \ --with ft \ /boot/initrd.img 2.4.7-10 |
If it does not boot, insert your Boot Floppy and reboot and login; And then repair as follows:
If your machine is SMP, you will have to manually create initrdsmp.img, when you boot into Uniprocessor Kernel as shown below, and edit /etc/lilo.conf and then test to see you can boot into SMP system.
When you boot your machine into 2.4.7-10 uniprocessor kernel, type the following to make initrdsmp.img to be used for 2.4.7-10smp kernel:
/sbin/mkinitrd \ --preload jbd \ --preload ext3 \ --preload scsi_mod \ --with ft \ /boot/initrdsmp.img 2.4.7-10smp |
![]() | NOTE |
---|---|
If you are tired of remembering the command to create initrd files, dowload my geninitrd script and keep it handy. |
Adjust your /etc/lilo.conf accordingly for 2.4.7-10smp (the SMP kernel section), type /sbin/lilo and reboot into the SMP kernel. Here is how /etc/lilo.conf should look like.
At this point, you have a working Red Hat 7.2 machine with SMP support, if applicable. If you are happy with the fact that you are running a fake Hardware RAID from Promise FastTrack using SCSI Emulation, then read no further.
Because Promise Driver is a SCSI emulation, it puts a lot of load on CPU(s). Read on if you want to enable true Linux native RAID and get rid of this Promise SCSI emulation.
Go to www.kernel.org and download latest kernel 2.4.18.tar.gz.
Configure your kernel:
cd /usr/src/ tar xvzf linux-2.4.18.tar.gz cd linux # cd to kernel source directory just created by tar cp config.txt .config #(See NOTE below to find out where to get config.txt) make menuconfig |
![]() | NOTE |
---|---|
You can download a working config.txt file HERE. You can, of course, modify this to suit your needs either directly in a text editor or by typing make menuconfig as explained above. It is easy to make mistakes if you are editing .config directly in vi or emacs. Therefore, it is recommended to use Menu Interface by typing make menuconfig. |
Enable all the following in the kernel statically (NOT as modules):
ATA/IDE/MFM/RLL Support --> <*> ATA/IDE/MFM/RLL Support IDE/ATA/ATAPI Block Devices --> <*> Enhanced ATA/IDE/MFM/RLL disk/cdrom/tape/floppy support <*> Include IDE/ATA-2 Disk Support [*] Use multi-mode by default Include IDE/ATAPI CDROM support [*] Generic PCI IDE chipset support [*] Sharing PCI IDE interrupt support [*] Generic PCI Bus master DMA support [*] Use PCI DMA by default when available [*] Intel PIIXn chipset support [*] PIIXn tuning support [*] Promise PDC202{46|62|65|67|68} support [*] Special UDMA Feature [*] Special FastTrack Feature [*] VIA 82CXXX chipset support <*> Support for IDE RAID controllers <*> Support Promise Software RAID (fasttrack) |
After you have enabled static features as shown above, make any more changes that you would like to make to suit your environment.
Save the kernel configuration. It is saved to .config in the current directory. Please back up this file. If you dont do so, you will regret it later. Copy .config file in a blank floppy or in /root
Build and install the kernel like you normally do, by typing:
make dep ; make clean ; make && make install make modules && make modules_install |
Look at /etc/lilo.conf to make sure new lines are added to boot your new kernel 2.4.18. Note that there should not be an initrd= line for this new kernel in /etc/lilo.conf. That is, our new kernel will boot itself without depending on a initrd.img unlike your current 2.4.7-10 kernel.
Now adjust /etc/lilo.conf as follows:
Locate the root=/dev/sdaX line for the new kernel in /etc/lilo.conf. Change this to root=/dev/ataraid/d0pX where X is a number 1 through 16. Save your changes.
Type:
/sbin/lilo |
If you chose any ext2 partitions during installation, you should comment them out in /etc/fstab for now.(Best thing is: Forget ext2 in this whole process)
Remove all floppies and CDs, and reboot by typing:
sync;sync;reboot |
At the LILO prompt, type your new kernel lable corresponding to 2.4.18 Your computer should then boot into your new kernel.
Login and type df -k to make sure you see /dev/ataraid/d0X entries instead of earlier /dev/sdaX entries.
![]() | NOTE |
---|---|
You may see some errors related to mounting swap device at the time of booting into new kernel. These are harmless. You should edit /etc/fstab to change any sdaX entries to ataraid/d0pX entries. |
Now, connect your computer to Internet and download lilo-22.tar.gz (the latest version of lilo program) from the Internet.
Remove the existing lilo on your computer by typing: rpm -e --nodeps lilo
Install new version of lilo as follows:
tar xvzf lilo-22.tar.gz cd lilo-22 # cd to lilo source directory just created by tar ./QuickInst.sh |
Say "Yes" to questions the system will ask you.
Ignore any errors except if /sbin/lilo is not created.
Adjust /etc/lilo.conf as follows:
Replace linear by lba32
Delete line "compact"
Change vga= line to vga=normal
Change boot=/dev/sda line to boot=/dev/ataraid/dN (where N is the partition number on which your root file system exists. Type df -k / to find out your root partition number).
Make sure that default=linux-2.4.18 (where linux-2.4.18 is the label given to boot your new kernel: 2.4.18)
Save changes to the file and type: /sbin/lilo
Reboot the system and cross your fingers.
Here is how the final /etc/lilo.conf should look like.
If everything comes up without any errors, time to celebrate!!
Here are the steps to install non-OS ATA RAID if your RAID chip is from Promise Technology:
linux-new ide2=0x0001,0x0009,9 ide3=0x2000,0x2009,10 ide4=none nousb expert root=/dev/hda3
at boot: prompt at the time of booting your Linux computer, then Append Line is the string
ide2=0x0001,0x0009,9 ide3=0x2000,0x2009,10 ide4=none.
Similarly, if your /etc/lilo.conf has the following section, your Append Line is
ide2=0x9400,0x9002 ide3=0x8800,0x8402.
image=/boot/vmlinuz-2.4.9-10 label=linuxold read-only root=/dev/hde9 append="nousb ide2=0x9400,0x9002 ide3=0x8800,0x8402" initrd="initrd.img" |
For the purpose of understanding better, lets say that your ide devices are as follows:
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 0x9400 [0x9401]. I/O at 0x9000 [0x9001]. I/O at 0x8800 [0x8801]. I/O at 0x8400 [0x8401]. I/O at 0x8000 [0x8001]. Non-prefetchable 32 bit memory at 0xd5800000 [0xd5800000]. |
IRQ1 = 10 IRQ2 = 10 IO1 = 0x9400 IO2 = 0x9000 IO3 = 0x8800 IO4 = 0x8400 |
ideX=IO1,IO2+0x0002,IRQ1 ideY=IO3,IO4+0x0002,IRQ2 where ideX and ideY are the two IDE ports of Promise card our free disks are using. |
In our example, the above Append Line will become:
ide2=0x9400,0x9002,10 ide3=0x8800,0x8402,10
boot: linux ide2=0x9400,0x9002,10 ide3=0x8800,0x8402,10 |
image=/boot/vmlinuz-2.2.18 label=linux read-only root=/dev/hda1 append="ide2=0x9400,0x9002,10 ide3=0x8800,0x8402,10" |
# Begin Code for booting my brand new kernel: 2.4.19 image=/boot/vmlinuz-2.4.19 label=linux-new read-only root=/dev/ataraid/d0p12 # End Code for booting my brand new kernel: 2.4.19 |
Now lets discuss the actual process of upgrading kernel in the following four cases:
Promise Technology (ft) Driver with non-OS data on RAID mirror
Linux Native (ataraid) Driver with non-OS data on RAID mirror
You are stuck with the default kernel 2.4.7-10 and you cannot and should not upgrade kernel either by compiling or by automatic update programs such as up2date or rpm utility. If you really really want to upgrade kernel then do so but do not use raid. You can add Append Line to the /etc/lilo.conf as explained in Section 7.2 and do not load ataraid module (or do not compile your new kernel with ataraid feature built-in). By doing this, you are upgrading kernel to new version and sacrificing RAID feature because you are using Promise Technology card as a simple IDE extension card.
If Promise Technology releases new version of their ft driver for 2.4.19 in future, you can then upgrade your kernel first to 2.4.19 (using up2date or rpm but not by manually compiling) and place their new version of ft.o file in /lib/modules/kernel-2.4.19. You will also have to put initrd-2.4.19 in /boot and append initrd= line to the new kernel section in /etc/lilo.conf. If your Linux machine uses Promise Technology driver, your OS is on RAID mirror and Promise Technology did not release any new versions for new kernel versions, please do not fool around with your current kernel. If you do fool around, remember that you can seriously damage your computer and not be able to boot or retrieve your data.
Unless Promise Technology releases appropriate drivers for new kernel version, please do not attempt kernel upgrade in any method. You are stuck with 2.4.7-10 kernel. You may be required to add Append Line as discussed in Section 7.2 to boot your computer in some cases.
cp .config /root/config-2.4.19.txt (Back up config file in a safe place)
make dep ; make clean ; make && make install (Install new kernel)
make modules && make modules_install (Install new kernel modules)
/sbin/lilo -R linux-new (Tell LILO to treat linux-new as default boot kernel just for one time only)
To upgrade kernel in this case, follow same procedure as explained in previous section (Linux Native (ataraid) Driver with OS on RAID mirror). If you experience problems, you may be required to add an additional line, Append Line, to your /etc/lilo.conf. To find out what your Append Line is, see Section 7.2.
Similar to previous case, do not attempt to upgrade kernel by any automatic method (up2date or rpm utility). Manually compile and your install your new kernel as explained in the previous section.
Determine your Append Line. See Section 7.2 for help with this
Modify /etc/lilo.conf to include append="Append Line" in your current kernel boot section. Again see Section 7.2 for details.
Type /sbin/lilo and reboot
Now you should see your hard disks seperately and you can use them. If you previously had partitions on the RAID mirror, you will see partitions accordingly on each of the two member disks. You will also see the data that you previously stored on the RAID mirror.
For more information, please check the following resources
LhD Product Page at http://lhd.datapower.com/db/dispproduct.cgi?DISP?2751. You can also go to LhD Main Page and search for �Promise FastTrack�.
ATA RAID help document by RedHat, Inc. You can also join their ataraid mailing list, or atleast search the mailing list archive.
Promise Technology's support web site at http://support.promise.com. Also check out this page.
Promise FastTrack help for Linux Mandrake is available at http://www.magic-lamp.org.
#!/bin/bash # # makehowto by Murty Rompalli # (c) All Rights Reserved # Free for non commercial use. All other uses must be authorized explicitly # by the creator. Contact me for more info. murty@solar.m u r t y.net # function maketut() { echo;echo Creating Tutorial Files ... jade \ -t sgml \ -d /usr/lib/sgml/stylesheets/nwalsh-modular/html/ldp.dsl\#html \ $1.sgml } function makehtml { echo;echo Creating html file: $1.html ... jade \ -t sgml \ -d /usr/lib/sgml/stylesheets/nwalsh-modular/html/docbook.dsl \ -V nochunks \ $1.sgml > $1.html } function maketxt { if [ -f $1.html ] then echo;echo Creating text file: $1.txt ... lynx -dump $1.html > $1.txt else echo;echo $1.html not found, creating ... makehtml $1 maketxt $1 fi } function makepdf { [ -f $1.ps ] && gzip $1.ps if [ -f $1.ps.gz ] then echo;echo Creating pdf file: $1.pdf ... gzip -dc $1.ps.gz | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$1.pdf - else echo;echo $1.ps.gz not found creating ... makeps $1 makepdf $1 fi } function maketex { echo;echo Creating TeX file $1.tex ... jade \ -t tex \ -d /usr/lib/sgml/stylesheets/cygnus-both.dsl\#print \ $1.sgml gzip $1.tex echo $1.tex gzipped to $1.tex.gz } function makedvi { echo;echo Creating DVI file $1.dvi ... db2dvi $1.sgml >/dev/null 2>&1 echo See $1.log for errors gzip $1.dvi echo $1.dvi gzipped to $1.dvi.gz } function makeps { echo;echo Creating PS file $1.ps ... db2ps $1.sgml >/dev/null 2>&1 echo See $1.log for errors gzip $1.ps echo $1.ps gzipped to $1.ps.gz } #### Begin Main Program echo " makehowto utility for generating HOWTO from SGML file. (c) Murty Rompalli " [ x$1 = x ] && echo "Error. Usage: $0 abc.sgml '{tut|html|pdf|tex|dvi|ps|all}' Option 'all' is default if sgml file is the only option supplied. Options: ------- tut Make complete tutorial, i.e., generate necessary html files html Make a printable single HTML file pdf Make a PDF file tex Make a TeX source file, gzipped dvi Make a DVI file, gzipped ps Make a PostScript file, gzipped all Generate all possible formats. " && exit file="`echo $1|sed 's/\.sgml$//'`" [ x$file = x ] && echo Error. Usage: $0 abc.sgml '{tut|html|tex|dvi|ps|all}' && exit [ -f $file.sgml ] || { echo Error. $file.sgml does not exist exit } [ -r $file.sgml ] || { echo Error. $file.sgml not readable exit } if [ x$2 = x ] then action=all else action=$2 fi case $action in tut|tutorial) maketut $file ;; html|htm) makehtml $file ;; tex|latex) maketex $file ;; dvi) makedvi $file ;; ps) makeps $file ;; text|txt) maketxt $file ;; pdf) makepdf $file ;; all) maketut $file makehtml $file maketex $file makedvi $file makeps $file maketxt $file makepdf $file ;; *) echo error ;; esac \rm -f $file.aux \rm -f $file.tex \rm -f $file.dvi echo;echo makehowto: Finished echo You can review $file.log and delete it. echo Thank you for using makehowto. echo |
You can also just type ./makehowto ataraid.sgml pdf, for example, if you just want create PDF version. Just type ./makehowto to get more help on using the script. Click here to download this makehowto script.