,QVWDOODWLRQ DQG &RQILJXUDWLRQ *XLGH IRU /LQX[ DQG $SDFKH :HE 6HUYHU RQ &RPSDT 3URVLJQLD DQG 3UR/LDQW 6HUYHUV
69
ECG513/0399
[root@tlaloc] mkswap /dev/ida/c0d0p2
This assumes that /dev/ida/c0d0p2 is a swap partition created on the RAID device.
Once partitions are formatted, they can be set up to boot Linux. First, the Linux system must be
archive-copied to the array controller device. The easiest thing to do is to copy the entire system
from the root to a single partition controlled by the array controller. Since it is necessary to mount
the array controller device to do this, it is useful to do archive copies of each directory
subordinate to the root individually:
[root@tlaloc chstewart]# mkdir /array
[root@tlaloc chstewart]# mount –t ext2 /dev/ida/c0d0p1 /array
[root@tlaloc chstewart]# cp –a /root /array
[root@tlaloc chstewart]# cp –a /etc /array
[root@tlaloc chstewart]# cp –a /usr /array
Continue coping each directory subordinate to /, except for /proc and the mount point for the
array controller, to the array controller device. Be sure to create the /array/proc directory so that
the proc file system has a mount point when booting directly to the SMART Array Controller.
Next, edit the /etc/fstab file that has been copied to the array controller (i.e. /array/etc/fstab) so
that the swap space and file systems are mounted appropriately. A sample /etc/fstab file follows:
/dev/ida/c0d0p1 / ext2 defaults 1 1
/dev/ida/c0d0p2 swap swap defaults 0 0
/dev/fd0 /mnt/floppy ext2 noauto 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,ro 0 0
none /proc proc defaults 0 0
Finally, add a LILO entry for the array controller in /etc/lilo.conf. To boot off of the array
controller, one should update the boot and root entries appropriately to reflect the new boot
device. One this is complete, build and install the patched version of LILO that is array-
controller-aware, and run the new version of LILO. LILO sources are available at
ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/
. The patch to enable it to recognize the array
controller device is available at
www.insync.net/~frantzc/lilo.patch
. Since no boot records have
previously been written to the boot sector of the array device, it will be possible to use lilo-21 for
this step regardless of the LILO version which shipped with your Linux distribution.
To patch LILO, obtain the sources and patch from the above-listed sites. Copy them both to
/usr/src. Then, unpack the LILO sources as follows:
[root@tlaloc] cd /usr/src
[root@tlaloc] tar xzf lilo-21.tar.gz
[root@tlaloc] patch –p0 < lilo.patch
[root@tlaloc] cd lilo
[root@tlaloc] make; make install
A sample /etc/lilo.conf file follows. It assumes that /array/boot/bzImage-2.2.5 is the kernel image
that will boot from the array controller. It also assumes that /dev/ida/c0d0p1 is the bootable
partition on the array controller. It also tells LILO to install itself on the Master Boot Record.