Skip to content

apethree/ubuntu-24-rcraid-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMD RC RAID Driver for Linux Kernel 6.14.x - Build & Installation Guide

Overview

This guide documents the fixes and procedures to successfully compile and install the AMD RC RAID driver (version 9.3.2) on Linux Kernel 6.14.x and Ubuntu 24.04/25.04.

What's New in This Guide

This README addresses critical compilation issues encountered with kernel 6.14+ and provides:

  • BTF Compilation Fix - Solution for Unsupported DW_TAG_reference_type errors
  • Updated Makefile - Modified to disable BTF generation for binary blob modules
  • Complete build and installation workflow for kernel 6.14.0-29-generic and newer

Prerequisites

Required Packages

Install these packages before building:

sudo apt update
sudo apt install -y \
    build-essential \
    linux-headers-$(uname -r) \
    dwarves \
    git \
    mokutil \
    openssl

System Requirements

  • Kernel Version: 6.14.0-29-generic or newer
  • Ubuntu Version: 24.04 LTS or 25.04
  • Architecture: x86_64
  • Disk Space: ~500MB for build artifacts

Build Instructions

Step 1: Clone the Repository

cd ~/Downloads
git clone https://github.com/apethree/rcraid-driver-9.3.2-5.x-6.14.git
cd rcraid-driver-9.3.2-5.x-6.14/driver_sdk/src

Note: The kernel 6.14 compatibility patch is already applied in this repository.

Step 2: Clean Previous Builds (if any)

make clean

Step 3: Build the Driver

sudo make

Expected Output:

------------------------------------------------------------
- building for kernel 6.14.0-29-generic
------------------------------------------------------------
make -C /lib/modules/6.14.0-29-generic/build M=/path/to/src CONFIG_DEBUG_INFO_BTF_MODULES= modules
  CC [M]  rc_init.o
  CC [M]  rc_msg.o
  CC [M]  rc_mem_ops.o
  CC [M]  rc_event.o
  CC [M]  rc_config.o
  CC [M]  vers.o
  LD [M]  rcraid.o
  MODPOST Module.symvers
  CC [M]  rcraid.mod.o
  LD [M]  rcraid.ko

Signing module using local certificate
Chosen sha512 for signing
Signing /path/to/rcraid.ko Success

Step 4: Verify Build

ls -lh rcraid.ko
modinfo rcraid.ko

Expected:

  • File size: ~12MB
  • Kernel version: 6.14.0-29-generic
  • Signature: sig_id: PKCS#7, sig_hashalgo: sha256

Module Signing (Secure Boot)

Automatic Signing

The build process automatically creates and signs the module with a local certificate stored in /var/lib/rccert/certs/.

First-Time Setup (if keys don't exist)

If you've never built this driver before, the mk_certs script will:

  1. Generate a 4096-bit RSA signing key
  2. Create a self-signed X.509 certificate
  3. Import the certificate into MOK (Machine Owner Key) database
  4. Sign the rcraid.ko module

You'll be prompted to set a password - remember this! You'll need it during the next reboot to enroll the key.

Verify Key Enrollment

Check if your signing key is already enrolled:

mokutil --test-key /var/lib/rccert/certs/module_signing_key.der

If enrolled: module_signing_key.der is already enrolled If not enrolled: module_signing_key.der is not enrolled

Manual Key Enrollment (if needed)

If the key is not enrolled:

sudo mokutil --import /var/lib/rccert/certs/module_signing_key.der

Enter a password when prompted. On next reboot:

  1. MOK Manager will appear (blue screen)
  2. Select Enroll MOK
  3. Select Continue
  4. Enter the password you just set
  5. Select Reboot

Installation

For Live USB / Pre-Installation

If installing Ubuntu on a RAID array:

# 1. Load the driver in Live environment
sudo insmod rcraid.ko

# 2. Verify RAID disks are visible
lsblk

# 3. Proceed with Ubuntu installation

# 4. Post-install (before reboot)
sudo cp rcraid.ko /target/lib/modules/$(uname -r)/kernel/drivers/scsi/
sudo chroot /target
depmod -a
mkinitramfs -o /boot/initrd.img-$(uname -r) $(uname -r)
exit

# 5. Reboot

For Existing Ubuntu Installation

If Ubuntu is already installed and you're updating the driver:

# 1. Copy module to kernel directory
sudo cp rcraid.ko /lib/modules/$(uname -r)/kernel/drivers/scsi/

# 2. Update module dependencies
sudo depmod -a

# 3. Backup existing initramfs (optional but recommended)
sudo cp /boot/initrd.img-$(uname -r) /boot/initrd.img-$(uname -r).backup

# 4. Rebuild initramfs
sudo mkinitramfs -o /boot/initrd.img-$(uname -r) $(uname -r)

# 5. Load the module (optional - to test before reboot)
sudo modprobe rcraid

# 6. Reboot to use RAID on boot
sudo reboot

Verify Installation

After reboot:

# Check if module is loaded
lsmod | grep rcraid

# Check module info
modinfo rcraid

# Check RAID devices
lsblk
ls /dev/rc*

Updating After Kernel Upgrade

If you upgrade your kernel (e.g., from 6.14.0-29 to 6.14.0-30):

cd ~/Downloads/rcraid-driver-9.3.2-5.x-6.14/driver_sdk/src

# Set new kernel version
export NEW_KVER=$(uname -r)

# Clean and rebuild
sudo make clean
sudo make KVERS=$NEW_KVER

# Install
sudo cp rcraid.ko /lib/modules/$NEW_KVER/kernel/drivers/scsi/
sudo depmod -a $NEW_KVER
sudo mkinitramfs -o /boot/initrd.img-$NEW_KVER $NEW_KVER

# Reboot
sudo reboot

Troubleshooting

Issue: BTF Error Still Occurs

Symptom:

Encountered error while encoding BTF.
make[4]: *** [scripts/Makefile.modfinal:57: rcraid.ko] Error 1

Solution: Verify the Makefile was correctly modified:

grep "CONFIG_DEBUG_INFO_BTF_MODULES=" driver_sdk/src/Makefile

Should show:

$(MAKE) -C $(KDIR) M=$(shell pwd) CONFIG_DEBUG_INFO_BTF_MODULES= modules

If not, manually edit line 100 in driver_sdk/src/Makefile.


Issue: Module Fails to Load - "Required key not available"

Symptom:

insmod: ERROR: could not insert module rcraid.ko: Required key not available

Solution: Your signing key is not enrolled. See Module Signing section above.


Issue: RAID Disks Not Visible

Symptom: RAID arrays don't appear in lsblk or /dev/

Solution:

# Check if module loaded
lsmod | grep rcraid

# Check kernel logs for errors
dmesg | grep -i rcraid

# Try loading manually
sudo modprobe rcraid

# Check PCI devices
lspci | grep -i raid

Quick Reference Commands

# Build
cd rcraid-driver-9.3.2-5.x-6.14/driver_sdk/src
sudo make clean && sudo make

# Install
sudo cp rcraid.ko /lib/modules/$(uname -r)/kernel/drivers/scsi/
sudo depmod -a
sudo mkinitramfs -o /boot/initrd.img-$(uname -r) $(uname -r)

# Load
sudo modprobe rcraid

# Verify
lsmod | grep rcraid
dmesg | grep -i rcraid
lsblk

Build Manually(Very Recommended)

  • 5.x - 6.14 Linux Kernel :
    1. Download Linux Live ISO burn onto your USB.
    2. Modify from /casper/vmlinuz splash quiet --- to /casper/vmlinuz modprobe.blacklist=ahci,nvme break=mount --- in USB:/boot/grub/grub.cfg & loopback.cfg.
    3. Boot from USB. Then open Terminal.
      ubuntu-install1
    4. PreInstall git dwarves linux-header-xxx mokutil build-essential in Package management for your linux distro.
      git clone https://github.com/Bemly/rcraid-driver-9.3.2-5.x-6.14.git
      git clone https://github.com/Bemly/rcraid-patch-932.git
      cd rcraid-driver-9.3.2-5.x-6.14/driver_sdk/src
      patch -p2 < ../../rcraid-patch-932/rcraid-932.patch
      sudo make clean
      sudo make
      sudo insmod rcraid.ko
      ubuntu-install2 ubuntu-install3 ubuntu-install4 ubuntu-install5
    5. Install your Linux distro into Raid Disk. (Dont Reboot)
      ubuntu-install6 ubuntu-install7
    6. PostInstall
      sudo cp /tmp/dd/rcraid.ko /target/lib/modules/`uname -r`/kernel/drivers/scsi/rcraid.ko
      sudo chroot /target # switch chroot view in the following command.
      depmod -a `uname -r`
      mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`
      reboot
      ubuntu-install8
    7. The key may be registered when restarting. Select Enroll Key and enter the password just now to continue and it will take effect.
      mokutil-enroll-key mokutil-enroll-key2 mokutil-enroll-key3 mokutil-enroll-key4
    8. All done!

Update Kernel

Last Updated: October 4, 2025 Tested On: Ubuntu 24.04 LTS, Kernel 6.14.0-29-generic

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •