Operating System - HP-UX
1834927 Members
2606 Online
110071 Solutions
New Discussion

Re: Kernel Change - Reboot Later

 
brian_31
Super Advisor

Kernel Change - Reboot Later

I have two questions on kernel change

1. I want to make changes on the kernel (using SAM) and then reboot later(may be weekend). I know this is possible, but when i am done with the changes it says (are u sure and it also says the system will reboot). i do not want to reboot now. Can i select "do not move the kernel into place" and reboot later?

2. suppose i want to make some more changes after i select "do not move the kernel into place" how would i do it?

Thanks

brian
6 REPLIES 6
Sandman!
Honored Contributor

Re: Kernel Change - Reboot Later

Brian,

If you want to stage changes to the kernel and defer rebooting to a later time, I would suggest using the command line tools instead of SAM as they give you greater control. What server and OS are you using?

~cheers
Marvin Strong
Honored Contributor

Re: Kernel Change - Reboot Later

well you can make the kernel manually without using sam.

cd /stand/build
cp ../system system
/usr/lbin/sysadm/system_prep -s system
vi system and make your changes
mk_kernel -s system

Then move these into place and reboot later.

mv /stand/system /stand/system.prev
mv /stand/vmunix /stand/vmunix.prev
mv /stand/build/system /stand
mv /stand/build/vmunix_test /stand/vmunix
shutdown -r now
Sundar_7
Honored Contributor

Re: Kernel Change - Reboot Later

Brian,

I would not move the kernel using the mv command.

Assuming you are running 11.11, the followign is the process for rebduiling the kernel

# cd /stand/build
# /usr/lbin/sysadm/system_prep -s system
# kmtune -s = -S system
# mk_kernel -s system

Now if you wanna move the kernel manually, the command kmupdate should be used

# kmupdate

This will create a .update_ux file in the /stand directory which is referred upon shutdown time.

Sundar.
Learn What to do ,How to do and more importantly When to do ?
Steven E. Protter
Exalted Contributor

Re: Kernel Change - Reboot Later

Shalom brian,

Even with sam you can choose not to boot.

But the best practice is to do everything, including kmupdate and then not boot the system until planned.

This does risk an accidental or power caused boot to mess things up, but its a perfectly legitimate practice.

SEP
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
Bill Hassell
Honored Contributor

Re: Kernel Change - Reboot Later

If I rememeber right, SAM had a bug where it would reboot anyway even if you said to build the kernel and NOT reboot -- it may be fixed by now but I would not trust this choice on a production machine. Note also that if you replace the vmunix file, several commands will start failing, like ipcs. Some commands depend on looking inside the kernel as well as looking into the vmunix file and they must match. Use the comand line interface and leave the new kernel file as is until you reboot.


Bill Hassell, sysadmin
Sandman!
Honored Contributor

Re: Kernel Change - Reboot Later

Follow the steps listed by Marvin, with one exception. Replace the "mv" with "cp" as some of the commands like ipcs, lanscan, lanadmin etc. will fail if they can't lookup the kernel. Don't attempt to move the new kernel and the system file manually, instead use "/usr/sbin/kmupdate" for this i.e.

replace the commands below...
# mv /stand/system /stand/system.prev
# mv /stand/vmunix /stand/vmunix.prev

...with
# cp /stand/system /stand/system.prev
# cp /stand/vmunix /stand/vmunix.prev
# cp -R /stand/dlkm /stand/dlkm.prev

and the ones below...
# mv /stand/build/system /stand
# mv /stand/build/vmunix_test /stand/vmunix

...with
# kmupdate

~cheers