I bought several HP DL360 G4p from Server Monkey to use as test machines for OpenStack. Unfortunately, the HP SmartArray 6i SCSI RAID controller that is installed in these machines is not supported by the RHEL 7.

The cciss driver required for the controller is still part of the main kernel, it’s just not shipped as part of RHEL 7. Luckily, the folks over at ELRepo have packaged it as a rpm for RHEL 7. Therefore, it’s just a simple matter of creating a driver disk and passing that into my PXE boot configuration.

The process for creating a custom driver disk is not very well documented, but I was able to figure it out with help from a ServerFault post and the Anaconda documentation.

First, a file listing from the cciss driver disk I created:

[root@galadriel driver-disk.dd]# find .
.
./.rundepmod
./rhdd3
./lib
./lib/modules
./lib/modules/3.10.0-123.el7.x86_64
./lib/modules/3.10.0-123.el7.x86_64/extra
./lib/modules/3.10.0-123.el7.x86_64/extra/cciss
./lib/modules/3.10.0-123.el7.x86_64/extra/cciss/cciss.ko
./rpms
./rpms/x86_64
./rpms/x86_64/kmod-cciss-3.6.26-1.el7.elrepo.x86_64.rpm
./rpms/x86_64/repodata
./rpms/x86_64/repodata/81edea4e4e681ecaf9bd2d69f892fa4a6e5f41446fa3901c0e3d87811e97924d-other.sqlite.bz2
./rpms/x86_64/repodata/b129d7b9d5a16636ed6994d497dcf231bd284d911741b76ce23c0f81fbb57eef-other.xml.gz
./rpms/x86_64/repodata/7c42124667dc18342f5c2b3a9eca1a7a1eb0a746244c72952fd4cd76c0146fd3-filelists.sqlite.bz2
./rpms/x86_64/repodata/07cf2140f7d4cfe78d4060c613df0b796188ba4c8930f66e7caceeaa5ed15dca-filelists.xml.gz
./rpms/x86_64/repodata/b5069256f906462e578f10f143b96685d96a64ec975a9808144250a9f13858c9-primary.sqlite.bz2
./rpms/x86_64/repodata/04e91716ec87e592b2324e488337155b83e46cb1d42eef776fe01581fefe8f45-primary.xml.gz
./rpms/x86_64/repodata/repomd.xml

.rundepmod is just an empty file. It instructs early boot processes to run depmod so that the Kernel modules in the driver disk are included in the module dependency map.

rhdd3 contains a one line description of what’s on the driver disk. Mine just has: “cciss drivers from ElRepo”

The lib directory is used as an overlay for the initial ramdisk for use in early boot. For drivers that don’t need to be loaded at boot, this directory can be skipped. However, if the driver isn’t needed in early boot (i.e. loaded before Anaconda starts)…why do you need this driver disk?

To populate the lib directory, I installed the kmod-cciss package on a working RHEL server, and then copied the .ko modules to the filetree I’m using to construct my driver disk.

[root@galadriel driver-disk.dd]# tar cvf - /lib/modules/3.10.0-123.el7.x86_64/extra/cciss | tar xvf -
tar: Removing leading `/' from member names
/lib/modules/3.10.0-123.el7.x86_64/extra/cciss/
/lib/modules/3.10.0-123.el7.x86_64/extra/cciss/cciss.ko
lib/modules/3.10.0-123.el7.x86_64/extra/cciss/
lib/modules/3.10.0-123.el7.x86_64/extra/cciss/cciss.ko

The final bit is the repository. I just downloaded the rpm from ELRepo, and used the createrepo command.

[root@galadriel driver-disk.dd]# mkdir -p ./rpms/x86_64
[root@galadriel driver-disk.dd]# cd ./rpms/x86_64
[root@galadriel x86_64]# curl -O http://mirror.symnds.com/distributions/elrepo/elrepo/el7/x86_64/RPMS/kmod-cciss-3.6.26-1.el7.elrepo.x86_64.rpm
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 45528 100 45528 0 0 70041 0 --:--:-- --:--:-- --:--:-- 70043
[root@galadriel x86_64]# createrepo .
Spawning worker 0 with 1 pkgs
Spawning worker 1 with 0 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete

With all these bits in place, I created an ISO, and served it up via http.

[root@galadriel driver-disk.dd]# mkisofs -V OEMDRV -r . | cat > /var/www/html/cciss.iso
I: -input-charset not specified, using utf-8 (detected in locale settings)
Total translation table size: 0
Total rockridge attributes bytes: 3256
Total directory bytes: 16384
Path table size(bytes): 128
Max brk space used 23000
273 extents written (0 MB)

I’m PXE booting all these hosts, so in order to use my newly created driver disk, I had to add the inst.dd parameter to my boot parameters:

label linux
menu label ^Install system text
menu default
kernel rhel7/vmlinuz
append initrd=rhel7/initrd.img ip=dhcp inst.text inst.repo=nfs:172.31.0.21:/export/media/rhel7-amd64 inst.dd=http://172.31.0.21/cciss.iso

Next time I booted up the servers, Anaconda downloaded and mounted the ISO, and installed the disks.

This is, of course, completely non-supported, but I don’t really care because these are my personal lab machines.