preparing kernel for hba mode

proliant-hbamode | proliant-hbamode-kernel | proliant-hbamode-slackware | proliant-ssacli

descr

we want to boot from usb, not the smart array controller which we are going to tune

problem is, the huge.s kernel doesn’t include the usb mass storage driver. instead, it usually gets loaded by the installer ramdisk.

so even if you wanted to rescue-mount the usb stick from huge.s, that woudln’t work. one would need to use a ramdisk similar to the installer’s rc.usb script. here’s how it goes if you want to look at it.

cd /tftpboot/slackware150/isolinux/
mkdir initrd/
cd initrd/
xz -dc ../initrd.img | cpio -id
cat etc/rc.d/rc.usb

this is why, here, instead, we build a kernel with both, the HP Smart Array patch for hba mode and the usb mass storage drivers

the resulting kernel is available here: https://lab.nethence.com/nunux/hbamode-and-mass-storage/

kernel build

cd /usr/src/

git clone https://github.com/im-0/hpsahba.git
cp -f hpsahba/kernel/5.18-patchset-v2/*.patch ./

wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.18.19.tar.gz

#rm -rf linux-5.18.19/
tar xzf linux-5.18.19.tar.gz
cd linux-5.18.19/

for patch in ../*-scsi-hpsa-*.patch; do echo $patch; done; unset patch
for patch in ../*-scsi-hpsa-*.patch; do patch -p1 < $patch; done; unset patch

# see also https://lab.nethence.com/confdiff/
cp -f /boot/config-huge-5.15.193.x64 .config

need to enable usb mass storage in view to boot from memory stick as a drive

sed -nr 's/^(CONFIG_USB_STORAGE.*)=m/\1=y/p' .config
sed -ri 's/^(CONFIG_USB_STORAGE.*)=m/\1=y/' .config
grep CONFIG_SCSI= .config
grep CONFIG_BLK_DEV_SD= .config

echo CONFIG_USB_UHCI_HCD=y >> .config
echo CONFIG_USB_EHCI_HCD=y >> .config
echo CONFIG_USB_XHCI_HCD=y >> .config

make it easier to handle the kernel feature through a module for once

grep CONFIG_SCSI_HPSA .config
echo CONFIG_SCSI_HPSA=m >> .config

make olddefconfig
echo $MAKEFLAGS

echo CONFIG_X86_X32=n >> .config
make olddefconfig

time nice make

nice make modules_install
HOME | GUIDES | PLAYBOOKS | LECTURES | LAB | CONTACT | HTML | CSS
Licensed as MIT