Table of Contents

Install Rocky Linux 9 (RHEL 9) on SCSI disk

Not sure if that qualifies as «retrocomputing», but it's indeed a kind of retro-enterprise autism I'm into. I have a couple of SCSI controllers (parallel SCSI, I mean, not SAS), both being of the LSI 53c1020/53c1030 variants. After Debian Trixie gave me a hard time using 32-bit PCI hardware because of DMAR issues, I've decided to try Rocky Linux 9 on that old host (i7-3770, 16 GB, Asus P8H61 LX2 2.0.) However, Rocky refused to use the LSI SCSI controller, which uses the mptspi driver. This article shows how to bamboozle Rocky and get it to install to and load from a SCSI drive.

Installation

Upon loading the installer, launch a terminal, become root and do as follows:

snippet.bash
modprobe mptspi

dmesg will complain about unmaintained modules, yada, yada (I just hope you won't use that on production.) But, in my case, it didn't automatically bind to the card, which in my case has the PCI ID 1000:0030. If your install also doesn't pick you card up as well, you can force mptspi to look the card up:

snippet.bash
echo "1000 0030" > /sys/bus/pci/drivers/mptspi/new_id

Theoretically, you also would have to do a echo xxxx:xx:xx.x > /sys/bus/pci/drivers/mptspi/bind (those x's being your card's PCI address), but I didn't need to. After issuing the first echo command, the driver bound to the card and the SCSI drive was detected.

After that, you can follow the installation as per usual.

Post-install

Upon quitting the installer, the computer restarts automatically. If you just go with the flow, it won't get past initrd, since it will suffer from the same issue the live ISO did. To remedy this, you can either use the dracut shell or launch a root shell before closing the installer. I've opted to do it the hard way, i.e. on dracut's shell.

Repeat the modprobe and the echo steps of the past section.

snippet.bash
mkdir -p /mnt
mount /dev/sd<XY> /mnt # check `dmesg` to get the partition names
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
mount -o bind /proc /mnt/proc
chroot /mnt

That will take you into a shell inside your fresh installation. Use you preferential editor (vi or nano, perhaps) to create the following files:

mptspi
install mptspi /sbin/modprobe --ignore-install mptspi; echo "1000 0030" > /sys/bus/pci/drivers/mptspi/new_id

What this does is to load the module upon boot and then to define a custom command to be called when the module is being loaded. --ignore-install flag prevents recursive loop, since this modprobe would call back the install line. The echo part is the same as we did before, but is now called right after the module is loaded.

Now, we need to regenerate initrd. On Rocky Linux, we do it via dracut CLI utility:

snippet.bash
dracut -f -v

The new initrd image will now contain those files we edited before and thus loading the driver as per usual.

Exit the chroot and restart the machine (or close the installer.)

Now, Rocky Linux should boot as expected.

Epilogue

This is not something widely supported. Rocky's upstream RHEL 9 will be supported on mainstream until 2032 and on extended support up until 2034. Rocky Linux 10 downright refused to boot on this machine. Thus it stands to reason that this kind of configuration using such a legacy PCI device hung up by a PCIe-to-PCI bridge will likely be less and less supported. TBH, it is quite a miracle it is still supported.

But, for now, if you want use old drives you have lying around or just, like me, create a cursed thing, Rocky allows you to do so on a relatively modern environment. In theory, Debian should also be able to do it, but you'll probably need to turn off some IOMMU-related stuff, since those legacy PCI devices and typical PCI bridges can't really deal cleanly with DMAR.

In my case, this cursed setup will probably be used as sort of a imaging station, to access and image my SCSI drives used on my other retro-rigs. But if it was the sole intention, I'd probably put the rootfs on a SSD.