Driver Disk

From Leo's Notes
Last edited on 14 February 2022, at 18:25.

Red Hat based Linux distributions using dracut allows for driver disks to be loaded during so that the installer is able to load properly on a system. Typically, you'll need to use a driver disk for a deprecated RAID/SAS controller.

Using a driver disk[edit | edit source]

A driver disk is a ISO or disk image that contains a kernel module package that Dracut is able to find and install as part of the boot process.

Locating an appropriate driver[edit | edit source]

If you have an older server that requires a driver that's been dropped, you can most likely find it from ElRepo's DUD repo that is appropriate for your distro version. For example, for RHEL8:

Creating your own driver[edit | edit source]

If you don't see a driver disk appropriate for your hardware, you may need to create your own.

Using DKMS, you can build a driver disk file with the dkms mkdriverdisk command. For example: dkms mkdriverdisk -d redhat -m qla2x00

Alternatively, if you have the .rpm package containing the driver, you can point inst.dd to the RPM file directly.

If you need to create your own driver disk image:

## Create a blank, 20MB image
# dd if=/dev/zero of=driverdisk.img bs=1M count=20

## Format the image with ext2
# mkfs -t ext2 -q driverdisk.img
## mount it and copy the files over
# mount -o loop driverdisk.img /mnt/driverdisk
## copy drivers to /mnt/driverdisk, then run
# umount /mnt/tmp

Using a driver disk with Anaconda[edit | edit source]

To use a driver disk, append inst.dd=location to the kernel arguments by hitting tab while on the grub menu. inst.dd supports network locations via HTTP, FTP, or NFS, and also a local device. For example: inst.dd=http://url/driver.iso, inst.dd=nfs:server/export, inst.dd=/dev/sdb

If you intend to use a removeable device such as a USB stick, floppy, or an iDRAC virtual device, you will need copy the contents of the ISO file into a vfat formatted partition. Eg:

# dd if=/dev/zero of=driver.img bs=1M count=1
# mkfs.vfat driver.img      # Note: mkfs.vfat is provided by dosfstools
# mount -o loop driver.img /mnt
# cp -r /iso-contents/* /mnt
# umount /mnt

Loading a driver disk after Anaconda has started[edit | edit source]

Enter a shell and install the rpm manually using rpm -ivh dd-some-driver.rpm. If you get any dependency issues with the kernel, try using the --nodeps argument as well. Once the package is installed, try to load the module with insmod driver. Don't use modprobe since it might not activate the driver.

If your driver is needed by Anaconda (such as storage), you'll need to restart Anaconda by running systemctl restart anaconda.service.

Be aware however, that Dracut won't include this missing driver into your initrd after installation if you load it manually like this. You'll likely need to rebuild initrd after the installation is complete to include this driver.

Troubleshooting[edit | edit source]

Debugging issues[edit | edit source]

If for some reason Anaconda doesn't start after specifying a driver disk, you can have systemd log to the console to help troubleshoot the issue by appending the following to the kernel arguments:

systemd.log_target=console systemd.log_level=debug

Disks don't appear after modprobe[edit | edit source]

Try to use insmod instead. When I tried loading a module with modprobe, it didn't seem to activate the hardware and the devices didn't show up.

See also[edit | edit source]