Operating System - HP-UX
1836643 Members
1630 Online
110102 Solutions
New Discussion

Re: Adding drivers to the kernel?

 
Gavin Davies
Advisor

Adding drivers to the kernel?

Hi,

Anyone know how to manually add drivers to the kernel (Going through SAM I get the message - no namelist).

I am asking this because I had to install a new basic kernel from the core OS disk, and this doesn't contain the drivers that I previously had. This means I can't Telnet to the box.

Cheers,
Gavin
12 REPLIES 12
Vincenzo Restuccia
Honored Contributor

Re: Adding drivers to the kernel?

SAM->Kernel configuration -> Drivers -> select a driver -> Action add driver

View log of SAM and see the command.
Gavin Davies
Advisor

Re: Adding drivers to the kernel?

When I select kernel configuration, I get the message - no namelist.

Therefore I can't get any further in adding a new driver. Is there a way of doing this manually (i.e without using SAM).

Cheers
Bill McNAMARA_1
Honored Contributor

Re: Adding drivers to the kernel?

Have a look at the /usr/sbin/km* commands

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x29ac14a24fd1d4118fef0090279cd0f9!0,00.html

I'm currently investigating this related to another post last week, if I have any success I'll post back.

Later,
Bill
It works for me (tm)
James R. Ferguson
Acclaimed Contributor

Re: Adding drivers to the kernel?

Hi Gavin:

Edit /stand/system and add the driver(s) you need. Document #rcfaxkernel002 has the procedures for rebuilding the kernel on either 10.20 or 11.x.

...JRF...
Gavin Davies
Advisor

Re: Adding drivers to the kernel?

Where is the #rcfaxkernel002 document?

Just an addition to this:

When using SAM - I can click on Kernel configuration, but when I select Drivers, I get the message:

Internal error: The kernel discovery tool used by SAM failed. Kernel changes cannot be made by SAM. The standard error output of the command is shown below:
getkinfo: Unable to read the kernel file "stand/vmunix"


Thanks
KapilRaj
Honored Contributor

Re: Adding drivers to the kernel?

hi,

cp /stand/system /stand/system.bak
cp /stand/vmunix /stand/vmunix.bak
vi /etc/system
insert the driver name in it
:wq! (save & come out)
mk_kernel /stand/system
This command will create a kernel named vmunix_test
mv /stand/vmunix_test /stand/vmunix
reboot

Good luck,

kaps

Nothing is impossible
KapilRaj
Honored Contributor

Re: Adding drivers to the kernel?

Hi,

one more thing all the drivers are available in

/usr/conf/master.d hv a look and find out what all are needed . Can you tell me which machine do you own ?. I mean a brief H/W configuration i may be able to suggest you some drivers

kaps
Nothing is impossible
Gavin Davies
Advisor

Re: Adding drivers to the kernel?

It is a HP9000/715 running HPUX11.0
James R. Ferguson
Acclaimed Contributor

Re: Adding drivers to the kernel?

Hi Gavin:

The document (#rcfaxkernel002) is a Knowledge Base document. Make sure that you are logged into the ITRC; click Maintenance and Support -> Search Technical Knowledge Base; Choose Search by DocID and enter the ID. For expediency, here's the guts of the document:

/begin/

10.X

1. Change directories to /stand/build.
cd /stand/build

2. Create a new system file from the running kernel.
/usr/lbin/sysadm/system_prep -s /stand/build/system

3. Edit the kernel with the planned changes.
vi /stand/build/system

4. Build the new kernel.
/usr/sbin/mk_kernel -s /stand/build/system

5. Move the old system and vmunix files so if anything goes wrong, the system
can be booted from the old kernel.
mv /stand/system /stand/system.prev
mv /stand/build/system /stand/system
mv /stand/vmunix /stand/vmunix.prev
mv /stand/build/vmunix_test /stand/vmunix

6. Reboot the system off the new kernel.
shutdown -r


11.X

1. Change directories to /stand/build.
cd /stand/build

2. Create a new system file from the running kernel.
/usr/lbin/sysadm/system_prep -s /stand/build/system

3. Edit the kernel with the planned changes.
vi /stand/build/system

4. Build the new kernel.
/usr/sbin/mk_kernel -s /stand/build/system

5. Move the old system and vmunix files so if anything goes wrong, the system
can be booted from the old kernel.
mv /stand/system /stand/system.prev
mv /stand/vmunix /stand/vmunix.prev
mv /stand/dlkm /stand/dlkm.vmunix.prev

6. Move the new system file and new kernel into place, ready to be used when rebooting the system.
mv /stand/build/system /stand/system
kmupdate /stand/build/vmunix_test

7. Reboot the system off the new kernel.
shutdown -r

/end/

...JRF...
Gavin Davies
Advisor

Re: Adding drivers to the kernel?

Also, when I try to do:

/usr/lbin/sysadm/system_prep -v -s system

I get the message:

get_sysfile: nlist64 to /stand/vmunix failed, errno = 0.
ERROR: The extraction of a system file from "/stand/vmunix" failed. Verify that "/stand/vmunix" is a properly built kernel file before trying again. The return value from "get_sysfile" was: 2
The "get_sysfile" command expects to find a system file embedded in the kernel file "/stand/vmunix"

etc.


And the system file that is produced is of 0k
Thanks
Gavin Davies
Advisor

Re: Adding drivers to the kernel?

Still couldn't find the document that you mentioned.

Cheers
Gavin Davies
Advisor

Re: Adding drivers to the kernel?

Problem solved now by doing the following:

Because my kernel was only a basic one from the core OS disk it didn't contain any drivers. Instead of reinstalling everything (patches) I copied a kernel over from a similiar machine. However I still couldn't use SAM to configure the kernel, so I extracted the system file from vmunix using:
/usr/lbin/sysadm/system_grep -s system
I had to add the following line to this file:
ntty 400
and also the following line to the inetconf.sec file in /var/adm:
telnet allow
I then rebuilt the kernel using mk_kernel, rebooted, and everything worked.

Thanks for all the help everyone.