# (Adaptec) driver loading in /boot/loader.conf is ignored



## Tom++ (Dec 27, 2014)

Hello

I have built FreeBSD 9.3 x64 without the ahd(4) driver and can manually load the Adaptec driver by calling: `kldload pmspcv` and I get access to all connected disks.

To automatically load this driver during the boot sequence, I copied it to /boot/kernel/pmspcv.ko and added it to /boot/loader.conf and set:

```
pmspcv_load="YES"
```
Unfortunately, nothing happens: `dmesg` displays nothing - it looks like the system does not try to load this driver at all. But I can load it by calling `kldload pmspcv`.

Therefore I have the following questions:

Can I embed the .ko driver while building the system so that I do not have to add it after the installation?

Is there a way to enable more logging Information to see what happens while /boot/loader.conf is processed? (I already enabled verbose.)

Is there any reason for the problem that the boot process ignores this "external" driver? (and does not even print a warning?)
Thanks a lot for any hint!
Kind regards,
Thomas


----------



## junovitch@ (Jan 5, 2015)

From hier(7)


> /boot/     programs and configuration files used during operating system bootstrap
> ...
> modules/   third-party loadable kernel modules; see kldstat(8)



Does it work if you put it in the directory for third party modules?   It might not be parsing the addition because it can't find it in the expected location.  Not 100% sure on this, but I think that would probably help during upgrades too since the /boot/modules directory might not be touched during upgrades.


----------



## Tom++ (Jan 5, 2015)

Hi junovitch

Thank you very much for your answer! It was almost the solution 

Adaptec has a driver installation description AND a script to install the driver - and I followed both of them, because the install script did not work.
Because of your answer I searched for the driver file and got the following listing:
/boot/modules/pmspcv.ko
/boot/kernel/pmspcv.ko
/boot/kernel/pmspcv64.ko


That was too much... therefore I tried different combinations and this solution loads the driver perfectly:
/boot/kernel/pmspcv.ko


Because it's hard to find 16 Port Host Bus Adapters in the FreeBSD compatibility list (most readers do not know what kind of hardware is behind a product name):
is there any interest for my Adaptec 71605H stability test?

If yes: are there any predefined tests which I should run?

(I am using the original Adaptec drivers which are declared for FreeBSD 9.0, 9.1 and 9.2. Because the Driver Source Code is identical for
9.0, 9.1 and 9.2 I just tried the driver for 9.3 and it looks stable until now.)

Thank you *very* much for your help!
Kind regards,
Tom


----------



## junovitch@ (Jan 5, 2015)

Excellent.  Just to be clear, the install script installed 3 files and removing two of them was required so that only /boot/kernel/pmspcv.ko was remaining was the fix?  That isn't what I would expect.  However if that fixed it, you never know who may come along searching for an answer to the same question in the future so it helps to leave things clear.


----------



## Tom++ (Jan 11, 2015)

Hi junovitch

To answer your question,


junovitch said:


> Just to be clear, the install script installed 3 files and removing two of them was required so that only /boot/kernel/pmspcv.ko was remaining was the fix?


I tried to reproduce my problems...

There are the source-files in pms9x-amd64.tgz and the +POST-INSTALL script has this command:
`cp /usr/src/sys/pms/freebsd/driver/ini/src/pmspcv.ko /boot/modules`
» This will not work. The driver File must be here: /boot/kernel/pmspcv.ko. This was the only solution which worked on my computer.


The Adaptec Manual adaptec_hba_iug_4_2014.pdf writes:


> 13. Install the driver package:
> `pkg_add /mnt/pms-<platform_name>.tgz`



This will call the command described in 1. above and will therefore not work, too.
Unfortunately, I can no longer find the description which uses this driver: pmspcv64.ko. It's possible that it was my idea to test it or I used a description in another forum.

Therefore I can summarize, it looks like there is working driver installation description from Adaptec for FreeBSD 9.x & 10.x. It's sad, because Adaptec was really a great Manufacturer.

It's even worse, because until now, Adaptec 71605H works great with FreeBSD 9.3 and FreeNAS 9.3.

Kind regards,
Tom


----------

