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.
cd /tftpboot/slackware150/isolinux/ mkdir initrd/ cd initrd/ xz -dc ../initrd.img | cpio -id cat etc/rc.d/rc.usb
this is why, here, we build a kernel with both, the HP Smart Array patch for hba mode and the usb mass storage drivers
you’ve got a choice here, –either– you boot from usb stick1 (sda) to install slackware on usb stick2 (sdb) and then fix lilo to point root partition to sda2 instead of sdb2, after putting the right kernel in place –or– you use pxe and lilo will be fine already (since the installer will find a single usb stick as sda.
label slackware150 install console
kernel slackware150/kernels/huge.s/bzImage
append initrd=slackware150/isolinux/initrd.img vga=791
label slackware150 mount sda2 console
kernel vmlinuz.hbamode
append root=/dev/sda2 ro vga=791
so the only thing you will have to do is put the custom kernel and modules in place, and re-run lilo while pointing at it.
cd /tftpboot/ mkdir usb_stick/ touch usb_stick/NOT_MOUNTED fsck.ext4 /dev/sdb2 mount /dev/sdb2 usb_stick/ cp vmlinuz.hbamode usb_stick/boot/ cp vmlinuz.hbamode.config usb_stick/boot/ tar xzf vmlinuz.hbamode.5.18.19.tar.gz -C usb_stick/lib/modules/ vi usb_stick/etc/lilo.conf image = /boot/vmlinuz.hbamode root = /dev/sda2 label = hbamode read-only
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 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 grep CONFIG_SCSI_HPSA .config 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 olddefconfig ../build-light.bash
and deliver it e.g. on the pxe server
/tftpboot/vmlinuz.hbamode