HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how recompile kernel
Operating System - HP-UX
1837920
Members
2600
Online
110124
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2004 08:53 AM
01-26-2004 08:53 AM
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2004 08:58 AM
01-26-2004 08:58 AM
Solution
Hi Jairo,
Are you planning to make modifications to any of the kernel parameters?. If so,
#cp /stand/system /stand/system.old
#/usr/lbin/sysadm/system_prep -s /stand/system
#vi /stand/system
(make modifications if needed)
#mk_kernel -o /stand/vmunix
#kmupdate
#shutdown -r now (no reboot)
This should compile the kernel for you.
-Sri
Are you planning to make modifications to any of the kernel parameters?. If so,
#cp /stand/system /stand/system.old
#/usr/lbin/sysadm/system_prep -s /stand/system
#vi /stand/system
(make modifications if needed)
#mk_kernel -o /stand/vmunix
#kmupdate
#shutdown -r now (no reboot)
This should compile the kernel for you.
-Sri
You may be disappointed if you fail, but you are doomed if you don't try
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2004 09:02 AM
01-26-2004 09:02 AM
Re: how recompile kernel
Hi,
I would use sam to recompile a kernel. If you like to know how it is done manually:
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90742/B2355-90742_top.html&con=/hpux/onlinedocs/B2355-90742/00/00/32-con.html&toc=/hpux/onlinedocs/B2355-90742/00/00/32-toc.html&searchterms=kernel&queryid=20040126-150108
It states:
Steps to Reconfigure the Kernel
You can use SAM or HP-UX commands to reconfigure the kernel.
To use SAM to reconfigure the kernel, log in as the superuser, ensure you are logged on to the machine for which you are regenerating the kernel, and start SAM. Select the "Kernel Configuration" menu item; use SAM's online help if needed. Generally, SAM is simpler and faster to use than the equivalent HP-UX commands.
To use HP-UX commands to reconfigure the kernel:
Log in as superuser on the machine for which a new kernel is being generated. You can log in remotely from another location by using the /usr/bin/rlogin command.
Change directory to the build environment (/stand/build). There, execute a system preparation script, system_prep. system_prep writes a system file based on your current kernel in the current directory. (That is, it creates /stand/build/system.) The -v provides verbose explanation as the script executes.
cd /stand/build
/usr/lbin/sysadm/system_prep -v -s system
Use the kmsystem command to view the kernel modules that were already selected for the next kernel build:
/usr/sbin/kmsystem -S /stand/build/system
Add absent kernel modules (like device drivers) using the kmsystem command. The -c Y option specifies the module name to be configured into the system:
/usr/sbin/kmsystem -S /stand/build/system \
-c Y driver-name
--------------------------------------------------------------------------------
Direct edits to the HP-UX system description files no longer work as in previous releases. Direct edits have no supported kernel configuration interface and are likely to introduce configuration errors. Instead, use the commands kmsystem and kmtune. These commands are new for Release 11.0; consult kmsystem(1M) and kmtune(1M) in the HP-UX Reference .
--------------------------------------------------------------------------------
Build the new kernel by invoking the mk_kernel command:
/usr/sbin/mk_kernel -s /stand/build/system
This builds a new kernel ready for testing: /stand/build/vmunix_test and the associated kernel components.
Save the old system file by moving it. Then move the new system file into place.
mv /stand/system /stand/system.prev
mv /stand/build/system /stand/system
Prepare for rebooting by invoking the kmupdate command. This sets a flag that tells the system to use the new kernel when it restarts.
/usr/sbin/kmupdate
Notify users that the system will be shut down. You can use the
/usr/sbin/wall command and/or the interactivate capabilities of the /usr/sbin/shutdown command to broadcast a message to users before the system goes down. For details, see wall(1M) , shutdown(1M) , and Shutting Down Systems.
--------------------------------------------------------------------------------
You only need to do the next steps if you are changing hardware, such as adding new peripherals. If you are simply changing a kernel parameter, reboot the system to active the new kernel with shutdown -r.
--------------------------------------------------------------------------------
Bring the system to a halt using the shutdown command.
Turn off the power to all peripheral devices and then to the SPU.
Install the hardware or remove interface cards or peripheral devices. Refer to the documents shipped with the products being installed and to Configuring HP-UX for Peripherals for specific instructions.
Turn on the power to all peripheral devices. Wait for them to become "ready", then turn on power to the SPU. The system will attempt to boot the new kernel.
If the New Kernel Fails to Boot
If the new kernel fails to boot, boot the system from the backup kernel (/stand/vmunix.prev) and repeat the process of creating a new kernel. See Booting From an Alternate Kernel for information on rebooting from a backup kernel.
HTH,
Gideon
I would use sam to recompile a kernel. If you like to know how it is done manually:
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90742/B2355-90742_top.html&con=/hpux/onlinedocs/B2355-90742/00/00/32-con.html&toc=/hpux/onlinedocs/B2355-90742/00/00/32-toc.html&searchterms=kernel&queryid=20040126-150108
It states:
Steps to Reconfigure the Kernel
You can use SAM or HP-UX commands to reconfigure the kernel.
To use SAM to reconfigure the kernel, log in as the superuser, ensure you are logged on to the machine for which you are regenerating the kernel, and start SAM. Select the "Kernel Configuration" menu item; use SAM's online help if needed. Generally, SAM is simpler and faster to use than the equivalent HP-UX commands.
To use HP-UX commands to reconfigure the kernel:
Log in as superuser on the machine for which a new kernel is being generated. You can log in remotely from another location by using the /usr/bin/rlogin command.
Change directory to the build environment (/stand/build). There, execute a system preparation script, system_prep. system_prep writes a system file based on your current kernel in the current directory. (That is, it creates /stand/build/system.) The -v provides verbose explanation as the script executes.
cd /stand/build
/usr/lbin/sysadm/system_prep -v -s system
Use the kmsystem command to view the kernel modules that were already selected for the next kernel build:
/usr/sbin/kmsystem -S /stand/build/system
Add absent kernel modules (like device drivers) using the kmsystem command. The -c Y option specifies the module name to be configured into the system:
/usr/sbin/kmsystem -S /stand/build/system \
-c Y driver-name
--------------------------------------------------------------------------------
Direct edits to the HP-UX system description files no longer work as in previous releases. Direct edits have no supported kernel configuration interface and are likely to introduce configuration errors. Instead, use the commands kmsystem and kmtune. These commands are new for Release 11.0; consult kmsystem(1M) and kmtune(1M) in the HP-UX Reference .
--------------------------------------------------------------------------------
Build the new kernel by invoking the mk_kernel command:
/usr/sbin/mk_kernel -s /stand/build/system
This builds a new kernel ready for testing: /stand/build/vmunix_test and the associated kernel components.
Save the old system file by moving it. Then move the new system file into place.
mv /stand/system /stand/system.prev
mv /stand/build/system /stand/system
Prepare for rebooting by invoking the kmupdate command. This sets a flag that tells the system to use the new kernel when it restarts.
/usr/sbin/kmupdate
Notify users that the system will be shut down. You can use the
/usr/sbin/wall command and/or the interactivate capabilities of the /usr/sbin/shutdown command to broadcast a message to users before the system goes down. For details, see wall(1M) , shutdown(1M) , and Shutting Down Systems.
--------------------------------------------------------------------------------
You only need to do the next steps if you are changing hardware, such as adding new peripherals. If you are simply changing a kernel parameter, reboot the system to active the new kernel with shutdown -r.
--------------------------------------------------------------------------------
Bring the system to a halt using the shutdown command.
Turn off the power to all peripheral devices and then to the SPU.
Install the hardware or remove interface cards or peripheral devices. Refer to the documents shipped with the products being installed and to Configuring HP-UX for Peripherals for specific instructions.
Turn on the power to all peripheral devices. Wait for them to become "ready", then turn on power to the SPU. The system will attempt to boot the new kernel.
If the New Kernel Fails to Boot
If the new kernel fails to boot, boot the system from the backup kernel (/stand/vmunix.prev) and repeat the process of creating a new kernel. See Booting From an Alternate Kernel for information on rebooting from a backup kernel.
HTH,
Gideon
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP