Operating System - HP-UX
1752729 Members
5875 Online
108789 Solutions
New Discussion юеВ

building kernels by re-using /stand/system file

 
SOLVED
Go to solution
Kevin Dillon
Occasional Advisor

building kernels by re-using /stand/system file

I have 2 K class systems one a 360 the other a 460.
I would like to build kernels on them both so that tey reflect that currently running on the K460.

I was proposing to copy the /stand/system file from the 460 to the 360 and rebuild the kernel based on that file.

s this a valid strategy?
4 REPLIES 4
Shahul
Esteemed Contributor

Re: building kernels by re-using /stand/system file

Hi

Whay U wnt to copy /stand/system from 460 to 360. I don't think it will work. /stand/system file will have the loaded device drivers, dump entry and tunable parameters. These particularly for that machine. I will give U a procedure for rebuilding kernel..Follow this

#cd /stand
#cp vmunix vmunix.old
#cp system system.old
#cd build
#/usr/lbin/system/system_prep -s system

Edit system file and make changes here as per ur require ment. Imeand addition/Deletion of devices. Then
#mk_kernel -s system
For more information see the man page of mk_kernel

Now one new kernel will be created in /stand/buil directory. Copy this to original location
#cd /stan/build
#cp vmunix_test /stand/vmunix
#cp system /stand

Now reboot the system . In case rebuilding was not successfull, Boot thru /stand/vmunix.old and recover kernel.

Best of luck
Shahul
linuxfan
Honored Contributor

Re: building kernels by re-using /stand/system file

Hi Kevin,

Be careful when copying system files between machines? Do they both (K360 and K460 ) have the same drivers/software ?

You can do a quick diff between the system files and check it out.

One of the options is cut and paste only the configurable parameters from the K460 to K360, so this is something i would do

On K360
1. cd /stand/build
2. /usr/lbin/system/system_prep -s /stand/build/system
3. Modify the system file in /stand/build to change all the parameters just like the K460
4. mk_kernel

You did not mention which OS you are running.

If you are running 11.0, at this point you can
5. kmupdate
6. shutdown -ry now

If you are running 10.X you can
5. cd /stand
6. mv system system.prev
7. mv vmunix vmunix.prev
8. cp build/system .
9. cp build/vmunix vmunix
10. shutdown -ry now

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Santosh Nair_1
Honored Contributor
Solution

Re: building kernels by re-using /stand/system file

Kevin,

There are several considerations to keep in mind when doing this. Copying the system file from one machine to the other is generally not a good idea unless the systems are identical, i.e. same hardware and I/O cards installed on both as well as same memory configurations.

You can, however, safely copy the configurable parameters from one system to the other. Usually the parameters are grouped together at the bottom of the file, so it should be a simple matter of cut/paste. A more elaborate approach would be write a simple script which uses kmtune (only on HPUX 11.0) to get parameters from one system and set them on the other. (Remember to save the old system file as system.prev just in case).

Once the parameters are set up, you can run mk_kernel to generate the new kernel and finally move the kernel into place by either running kmupdate or moving the kernel into place, i.e.

mv /stand/vmunix /stand/vmunix.prev
mv /stand/build/vmunix_test /stand/vmunix

then reboot.

Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
Steven E. Protter
Exalted Contributor

Re: building kernels by re-using /stand/system file

I'm adding this "correction" because I have this post bookmarked. 0 Points please.

For 11.00 at least...

#cd /stand
#cp vmunix vmunix.old
#cp system system.old
#cd build

#this is the changed line.
#/usr/lbin/sysadm/system_prep -s system

Edit system file and make changes here as per ur require ment. Imeand addition/Deletion of devices. Then
#mk_kernel -s system
For more information see the man page of mk_kernel

Now one new kernel will be created in /stand/build directory. Copy this to original location
#cd /stand/build
#cp vmunix_test /stand/vmunix
#cp system /stand

I kind of need this to be right because I just used it on a system for work at home.

:-)
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com