Installing Linux on the Compaq Original Smart Array Controller



Identifying a Compaq Original Smart Array Controller

A Compaq Original Smart Array Controller can be identified because it will have one of the following numbers on it:

Vendor IDDevice IDNameSpare #Assembly #Option #
110e2040Smart Array Controller (EISA)142130-001002969-001142055-001
110e2040Smart Array Controller (EISA)181132-001003596-001 /
003596-002  
142055-001

This document only applies to the above mentioned controllers – the Compaq Original EISA Smart Array Controller. The steps mentioned here are not necessary when using the Compaq Smart-2/E, 2/P, 2/DH, and newer Compaq Smart Array Controllers.

Again, these steps are only needed when using the Compaq Original Smart Array Controller (listed in the table above) as your boot controller.


If you have any comments, questions, or improvements then please drop me a line. Click here to find out how to contact me: contact.html.


If you have the Smart-2/E controller then please refer to the Smart-2/E instructions located at smart2e.html.


If you wish to learn more about the differences between static drivers and modular drivers then go to lindrivers.html. This lindrivers.html document discusses when to use smart2=0x6000 and when to use eisa=0x6000.



Configuring the Compaq Original Smart Array Controller

Note: The Compaq Original Smart Array Controller is configured in SCU, while all other Compaq array controllers are configured by using the ACU (Array Configuration Utility).

Once in the SCU utility, make the following choices:

  1. Review or Modify Hardware Settings
  2. Step 3: View or edit details
  3. Now configure the Compaq Original Smart Array Controller.
  4. You will then find the Compaq Original Smart Array Controller in the listing. You configure the controller by selecting the logical drives, adding physical drives to them, and setting the raid level.

    Once you have configured the Compaq Original Smart Array Controller, exit this utility through the following steps:

  5. press F10 (<DONE=F10>)
  6. Step 5: Save and exit
  7. Save the configuration and restart the computer


Installing Linux on a Original Smart Array Controller

  • Make sure you have no live data in the system.
  • Run System Erase (Warning, this wipes out all data).
  • Reconfigure either using a recent SmartStart or the latest version of SCU (System Configuration Utility).
  • In SCU choose Linux or Unixware 2 as the “installed OS”
  • Configure the Original Smart Array Controller in SCU.
  • Save changes and exit from SCU.
  • Boot back to SCU and choose to install the System Partition Utilities (copy in SCU and DIAGS if you have diags, I wouldn’t copy in any of the other choices).
  • Boot to the cdrom if you have an IDE cdrom drive. If you have a SCSI cdrom drive, then you must use a boot diskette. If performing a cdrom install, then you may boot from /images/boot.img, if performing a network install, then boot from /images/bootnet.img.
  • Usually on EISA based systems, it is necessary to specify the amount of memory installed. It is also necessary to specify the addresses of any EISA devices as it appears that Linux usually doesn’t find them on its own. Here is a sample line specifying memory. We won’t specify the EISA original Smart at this time because at this time is only for drivers that are built in statically.
  •     linux text expert mem=24M
    
  • After you boot to the boot floppy and key in your boot string as shown above, you then will come to a screen prompting you for a driver modules diskette. Select Cancel on this screen.
  • You will next be at a screen stating that the system doesn’t have any special drivers loaded. Choose to add a SCSI driver, then choose the smart2. You will need to specify the optional parameters since this is an EISA controller. The slot number you have the original Smart controller installed in is the address. If it is in slot #3, then the address is 0x3000, slot 1 is 0x1000, and slot 5 is 0x5000, and so on. Since you are loading cpqarray (smart2 driver) as a module, you will use the eisa= notation as follows:
  • eisa=0x1000
    
  • Load any other drivers you need.
  • Configure the system as normal. One note about partitioning: create a /boot of 30MB just after the Compaq System Partition. Make sure /boot is a primary partition. Mark /boot active. Install LILO to /boot partition (“first sector of the boot partition”) rather than the MBR. You will also need a swap partition and a root partition and any other partitions you wish to create.
  • At the very last screen you will see a “Congratulations” screen stating you are at the end of the install. At this point you have 3 choices to get a kernel with cpqarray linked in statically into position.
    1. Copy in a staticaly linked kernel from the floppy and put it in place.
    2. Go to the bash screen and build one on this system now.
    3. If you pass up this screen and you reboot the system, you can use the third option which is “Recovery Method” discussed in detail later in this document. This involves following the same proceedures as the original installation, stop once you get the Smart2 driver loaded, switch to the bash screen, create your device nodes to access the array, mount the hard drive, copy in the kernel.
  • Choose one of the above 3 methods to finish the install.


The Problem after installing on an Original Smart

After Linux is installed on a Compaq Original Smart Array Controller and the first reboot is made, you will notice that the system will display a message similar to the following:

Found 1 controller(s)
cpqarray: Finding drives on ida0 (SMART)
cpqarray ida/c0d0: blksz=512 nr_blks=16434495
  ida/c0d0: unknown partition table
autodetecting RAID arrays
autorun ...
... autorun DONE.
VFS: Cannot open root device 48:08
Kernel panic: VFS: Unable to mount root fs on 48:08
cpqarray: Completion of 0c850000 ignored

What has been found to happen is that during the install the array gets initialized a couple of times while loading the driver for the array (cpqarray) and then later when you fdisk the drive. The installer is able to create partitions and continue on with the rest of the installation and install Linux. If you examine the install process closely, you will notice that when the cpqarray driver first loads you get the same “unknown partition table” message, but by the time you get to fdisk and finish with fdisk, that error doesn’t occur until you reboot.


How to work around this issue:

There are many ways to work around this issue. The main point is to build a kernel with the cpqarray driver built in statically and get it into the system. You can build this kernel:
1) before the install (on another Linux system)
2) during the install (on this system)
3) after the install using recovery mode on this system.

No matter where/how you build the kernel, there are a couple of ways to get the kernel into the correct position. These places are during install (at the very end of the install) or after the installation using a recovery method.


Note: Cpqarray needs PCI support enabled:

When you build your new kernel with cpqarray built in statically, you will more than likely need to keep PCI support enabled. Even though this is an EISA controller, I have had reports that the lack of PCI support in the kernel prevented the cpqarray driver from working correctly.

Thanks to Andrew E. for catching this one.


Getting a kernel with cpqarray built in statically in place during the install just before the reboot:

During Install 1) Go to the BASH# prompt:
When you get to the last screen that says “congratulations, press enter to reboot”, this is the correct time to put in the new Linux kernel. Now press Alt+F2 (or CTRL+ALT+F2 if you are in the GUI). Now you will get a BASH# prompt.

During Install 2) Run “chroot” on the mount point of your filesystem:
If you run “mount”, you will notice your hard drives are mounted to some directory (usually /mnt/sysimage). We need to run chroot, so do the following command: “/mnt/sysimage/usr/sbin/chroot /mnt/sysimage” (of course, don’t use the quotes). The chroot program isn’t easily available in the installer program, so we just reach into our own filesystem and run it from the /usr/sbin directory. Running chroot will make things simpler for the following commands. Using the chroot program in this situation will put us in a mode very similar to what is called “Single User Maintenance Mode”. Chroot is run from the usr/sbin directory, so since you are in /mnt/sysimage already, just type usr/sbin/chroot /mnt/sysimage.

During Install 3) Set up the environment a little better, run “su -“:
By running “su -” (don’t use the quotes), this will set up your pathing to make things even easier. You will notice that the prompt will change. You will also notice that running the “mount” command will not show all the previous mounts, it will be mostly empty.

During Install 4) Bring in the new kernel / build the new kernel:

Now it is time to bring in the kernel or build the kernel, depending on the method you choose.

During Install 4A) Bringing in the kernel from floppy:
If you have a kernel already created and it is on the floppy, then you should be able to do a mount /mnt/floppy, then copy the kernel (vmlinuz) into /boot, edit /etc/lilo.conf to point to the kernel, then run /sbin/lilo. Then work your way back out, “cd /”, “umount /mnt/floppy”, follow steps 5-10 to finish backing your way out of the system.
See Notes About Configuring /etc/lilo.conf later in this document.

During Install 4B) Building a kernel on this system:
If you choose to build a kernel on this system instead of bringing it in from the floppy, then these are the steps to complete: Hopefully you selected “kernel development” during installation, if not then you may or may not be able to put them in at this time – you may need to either restart the install or move on to the “After Installation” instructions. Since you’re here, go ahead and try to build a kernel, you’ll know if you are able to continue or not. Brief instructions for building a kernel are listed later in this document. After the kernel build is done and everything (/etc/lilo.conf) looks good, then lets back out of the system – follow steps 5-10.
See Notes About Configuring /etc/lilo.conf later in this document.

During Install 5) “exit” (exit from su -)
During Install 6) “mount” (you should note that you still don’t see all the mounts)
During Install 7) “exit” (exit from chroot)
During Install 8) “mount” (you should now see all the other mounts you had before)
During Install 9) “cd /” (this will make sure you’re not in a mounted filesystem)
During Install 10) switch back to the last screen of the installer by pressing ALT+F1 (or CTRL+ALT+F7 if you were running the GUI install), Press enter on the last screen of the installer program, the installer will then unmount any partitions it mounted and then the system should reboot, be sure to remove all floppies and cdroms.



Getting a kernel with cpqarray built in statically in place after the install is complete by using recovery mode on this system:

After the install is complete and the system has rebooted you will need to use some sort of recovery method. There are a couple of ways of doing this.

1) Use the original install media.
2) Use the boot.img floppy (install floppy) with the statically linked kernel replacing vmlinuz on that boot floppy.


Using the original install media to gain access to the system in order to create a kernel with cpqlinux built in statically:

After Install 1) Boot up on original media: Boot back to the install media. We will go through some of the same steps you went through when installing the system:

After Install 2) Load the SCSI driver as you did before: load the SCSI as you did before (usually by giving eisa=0x1000 as an option to the smart2 module, 0x1000 must match your slot number, for ex: 0x2000 is slot #2).

After Install 3) Get your BASH# prompt: Once your SCSI driver is loaded, then we need to get to the “2nd stage install”. This 2nd stage install is when we gain access to the BASH# prompt. Immediately after the “2nd stage installer” section you should be faced with a RedHat Welcome screen. Now you should have access to the BASH# prompt, go to the BASH# prompt by pressing ALT+F2 (or CTRL+ALT+F2 if in the GUI).

After Install 4) Create the main device node: Do the following:

mkdir /adir
mknod /adir/c0d0 b 72 0

After Install 5) Get a partition listing: Do “fdisk -l /adir/c0d0”. If you don’t see your partitions listed, then fdisk /adir/c0d0, don’t make any changes, and exit fdisk, as follows: “fdisk /adir/c0d0”, “w”, “q”. Then check again if you have your partitions listed. If not, another trick to get the partitions listed is to do an “rmmod cpqarray”, “insmod cpqarray” until all your partitions show up; however, the fdisk trick should be faster (thanks to Mike Phillips).

After Install 6) Create device nodes for the other partitions you have: Once you list your partitions, decide which ones you specified for what (which one is /boot, /, /var, /usr, et. al.). And let’s create device nodes for them.

mknod /adir/c0d0p1 b 72 1
mknod /adir/c0d0p6 b 72 6
mknod /adir/c0d0p7 b 72 7
mknod /adir/c0d0p8 b 72 8

After Install 7) Mount your partitions: Now lets mount our partitions. You must mount the “root” partition first, then the others. Hopefully you know which partitions are which filesystem, otherwise you’ll have to play the guessing game.

mkdir /bdir
mount /adir/c0d0p6 /bdir       (mount root partition first, here
                                c0d0p6 is my root partition in
                                this example)
mount /adir/c0d0p1 /bdir/boot  (in this example c0d0p1 is /boot)
mount /adir/c0d0p7 /bdir/var   (in this example c0d0p7 is /var)
mount /adir/c0d0p8 /bdir/usr   (in this example c0d0p8 is /usr)

mount                          (run mount all by itself to see
                                that your partitions are actually
                                loaded - you should get listing
                                for each of the partitions you
                                mounted.)

If you are unable to mount any of your hard drive partitions, then do the fdisk trick mentioned in step #5. Run fdisk on /adir/c0d0 or /adir/sda, then type “w” which will write changes and exit (don’t make any changes in fdisk when you do this). This will cause the system to reinitialize something which will bring all your partitions online. Then start back at step #7 to mount your partitions again.

The Guessing Game:

If you don’t know which partitions are which filesystem then you need to play the guessing game to find out. It’s not really very difficult at all to find out which partition is which filesystem. Here are the steps:

  • Use fdisk -l to get a listing of the existing partitions
    • fdisk -l /adir/c0d0
  • Identify the partitions marked as type “Linux”
  • One at a time go through these partitions by doing the following:
    • mount the partition to /bdir
      • mount /adir/c0d0p1 /bdir
    • check for the presense of /bdir/etc/fstab on that partition
      • ls -l /bdir/etc/fstab
    • if /bdir/etc/fstab exists, then you’ve found your “root” partition – leave this partition mounted and go to “Once Your Root Partition is Found”. If /bdir/etc/fstab doesn’t exist, then the partition you mounted is not your “root” partition – unmount that partition and try the next one:
      • umount /bdir
      • restart the guessing game, this time choose a different partition. Continue this until you have found your “root” partition.

Once Your Root Partition is Found:

Once your “root” partition is found and you have it mounted on /bdir, you can see where your other partitions go by looking at the /bdir/etc/fstab file. Just cat /bdir/etc/fstab to the screen:

cat /bdir/etc/fstab

then mount the partitions you need. Remember when mounting these partitions to keep them relative to the /bdir directory. So when mounting /boot, you will mount it to /bdir/boot. When mounting /usr, you will mount it to /bdir/usr. You won’t really need to mount your /home directory during this recovery method.

After Install 8) chroot to your filesystem: “/bdir/usr/sbin/chroot /bdir”

After Install 9) Set up the environment a little better, run “su -“:
By running “su -” (don’t use the quotes), this will set up your pathing to make things even easier. You will notice that the prompt will change. You will also notice that running the “mount” command will not show all the previous mounts, it will be mostly empty.

After Install 10) Bring in the new kernel / build the new kernel:

Now it is time to bring in the kernel or build the kernel, depending on the method you choose.

After Install 10A) Bringing in the kernel from floppy:
If you have a kernel already created and it is on the floppy, then you should be able to do a mount /mnt/floppy, then copy the kernel (vmlinuz) into /boot, edit /etc/lilo.conf to point to the kernel, then run /sbin/lilo. (Note: if you cannot mount the floppy disk, you may be required to bring the kernel in on an ext2 formatted floppy instead of an msdos formatted floppy). Then work your way back out, “cd /”, “umount /mnt/floppy”, follow steps 11-16 to finish backing your way out of the system.
See Notes About Configuring /etc/lilo.conf later in this document.

After Install 10B) Building a kernel on this system:
If you choose to build a kernel on this system instead of bringing it in from the floppy, then these are the steps to complete: Hopefully you selected “kernel development” during installation, if not then you’ll need to install those packages at this time – refer to How to compile linux kernel for information on which packages are required as well as instructions for building a kernel. Later in this document are brief version for building a kernel. After the kernel build is done and everything (/etc/lilo.conf) looks good, then lets back out of the system – follow steps 11-16.
See Notes About Configuring /etc/lilo.conf later in this document.

After Install 11) “exit” (exit from su -)
After Install 12) “mount” (you should note that you still don’t see all the mounts)
After Install 13) “exit” (exit from chroot)
After Install 14) “mount” (you should now see all the other mounts you had before)
After Install 15) “cd /” (this will make sure you’re not in a mounted filesystem)

For the Recovery Method we will not continue with the rest of the install because that would undo what we just did.

After Install 16) unmount our filesystems:
“umount /bdir/usr”
“umount /bdir/var”
“umount /bdir/boot”
“umount /bdir”
Make sure to unmount all the partitions pointing to your hard drive (/adir/c0d0px entries). Don’t worry with the other mount points that are not partitions on your drive.
“mount” Run mount again to make sure all your hard drive partitions are now unmounted.

After Install 17) Reboot:
After verifying all partitions are unmounted, then reboot:
CTRL+ALT+DEL
be sure to remove all floppies and cdroms.


Using a modified boot.img floppy (install floppy) to gain access to the system in order to copy in a kernel with cpqlinux built in statically:

Modified Installer Boot Disk 1) Basically you create a kernel on another Linux system with cpqarray built in statically.
Modified Installer Boot Disk 2) Create the install floppy from the /images/boot.img file which is located on the RedHat cdrom.
Modified Installer Boot Disk 3) Take the new kernel with cpqarray built in statically and replace the vmlinuz on the install floppy.
Modified Installer Boot Disk 4) Boot your system with the new floppy, at the boot: prompt you will need to pass the parameters “smart2=0x1000” (Replace 0x1000 with the correct slot # your controller is in, for ex: 0x5000 is slot #5), you may also want to specify the amount of memory you have (for ex: linux smart2=0x1000 mem=48M).
Modified Installer Boot Disk 5) Get to the BASH# prompt, this usually means getting to the “Welcome to the RedHat Installer” screen.
Remember to use ALT+F2 (or CTRL+ALT+F2 if in the GUI) to get to the BASH# prompt.
Modified Installer Boot Disk 6) Now, with the kernel you have built and placed on the floppy, you can continue with the above instructions and copy in the kernel from the floppy.
Continue with step number: “After Install 4)“.



Notes about building a kernel:

I have really cleaned up and streamlined Compile kernel guide. Please refer the same for instructions on building a new kernel.
After building your new kernel don’t forget to double check that /etc/lilo.conf points to the correct partitions and that it points to the correct filenames located in /boot.
See Notes About Configuring /etc/lilo.conf later in this document.


Notes About Building a kernel with cpqarray built in statically on another system:

I would take another Linux box with the same version of Linux and build the kernel, copy that kernel to the boot floppy (images/boot.img) replacing the kernel on the floppy. This kernel could then be used to install Linux, then at the end of the install, just before the reboot, copy that kernel into /boot, edit/etc/lilo.conf, and run /sbin/lilo. One word of note, if you don’t add in msdos filesystem support when building your static kernel, then you need to bring the kernel in from an ext2 floppy – the /images/boot.img floppy is an msdos floppy.



Notes About Configuring /etc/lilo.conf:

You must add an entry for the original smart into /etc/lilo.conf so it will know what slot# the controller is in. The notation is 0x1000 for slot #1, 0x2000 for slot #2, … 0x5000 for slot #5 and so on. The format for the smart2 parameter is smart2=0x1000.

Note about eisa=0x2000: The format of the parameter eisa=0x2000 is only used when loading cpqarray as a module. This value should not be keyed in at the boot: prompt (smart2= should be used at the boot: prompt), nor should eisa= go on the append line in /etc/lilo.conf (smart2= should go on the append line in /etc/lilo.conf ONLY if cpqarray is built in statically). On systems that have a different array controller (the Smart-2/E is the just about the only controller this applies to), they may use the eisa= format ONLY in the /etc/conf.modules (or /etc/modules.conf) OR when performing an insmod.

Since you are using the original Eisa Smart Array controller, then you will more than likely have to specify the memory in your system since Linux will probably not detect more than 16M on its own. The format for the memory is mem=xxxM or mem=xxxxxxk. I prefer the shorter format since in some releases of the kernel there was a limit on the number of characters you could pass in an append statement.

So to summarize what to do in /etc/lilo.conf, you would need an append line that goes between read-only and root= and it would look somewhat like the following (make changes in memory size and slot # of the array to match your system):
append=”smart2=0x3000 mem=48M”

Here is a sample /etc/lilo.conf so you can see how it should fit in:

[root@localhost /root]# cat /etc/lilo.conf
boot=/dev/ida/c0d0p1
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=linux

image=/boot/vmlinuz-2.2.14-5.0smp
	label=linux
	initrd=/boot/initrd-2.2.14-5.0smp.img
	read-only
	append="smart2=0x1000 mem=96M"
	root=/dev/ida/c0d0p6

image=/boot/vmlinuz-2.2.14-5.0
	label=linux-up
	initrd=/boot/initrd-2.2.14-5.0.img
	read-only
	append="smart2=0x1000 mem=96M"
	root=/dev/ida/c0d0p6

What all do I need to enable in the kernel in order to build cpqarray in statically?

Under Block devices you will find an entry for Smart2 (it should be almost the last item on the page). Turn this item on “statically” by changing it’s selector to a “Y”, or put a mark in the “Y” column depending on which config utility you are using to configure the kernel.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.