# Reloading the kernel without rebooting?



## mix_room (Oct 5, 2011)

In linux there is kexec which can reload the kernel without requiring a reboot. AFAIK there is something similar in Solaris. 
Is this feature available in FreeBSD?


----------



## vermaden (Oct 5, 2011)

There is no similar thing in Solaris, neither in FreeBSD.


----------



## Crivens (Oct 5, 2011)

I remember NetBSD having a /dev/reload driver which would reboot using a kernel image written to it. But when it comes to rebooting the kernel without the userland taking notice, that is something that I only heard of from some serious big iron. 

Having such a thing in FreeBSD would be great, I think, but not easily done. You can have something like that using [cmd=]cryopid[/cmd] in linux, but porting that to FreeBSD is not straightforward (I tried).


----------



## mix_room (Oct 6, 2011)

vermaden said:
			
		

> There is no similar thing in Solaris, neither in FreeBSD.



http://dlc.sun.com/osol/docs/content/SYSADV1/ghsbc.html

Not the same, but similar. FWIW that was the feature I had in mind, might not do the same job as kexec though.


----------



## SirDice (Oct 6, 2011)

What's wrong with the occasional reboot?


----------



## vermaden (Oct 6, 2011)

SirDice said:
			
		

> What's wrong with the occasional reboot?



On FreeBSD, nothing, it does not happen quite often, do not know about Linux


----------



## mix_room (Oct 6, 2011)

SirDice said:
			
		

> What's wrong with the occasional reboot?



Nothing at all. The topic just came up for discussion in another conversation I had. Wanted to know if it was possible. I have no problem rebooting once every half-year or so.


----------



## wblock@ (Oct 6, 2011)

There's Ksplice.  And now with Oracle buying them, I probably won't ever be seeing what that's like.


----------



## fluca1978 (Oct 6, 2011)

As far as I understand this is a feature supported at the processor level. But my question is: what is the purpose? Sometimes reboots are required just to re-initialize devices (e.g., a locked dvd) and having a kernel to restart from zero without having to set up devices is, in my opinion, quite dangerous. 
Can anybody explain me what is the application of such a feature apart for software developers?


----------



## gkontos (Oct 6, 2011)

fluca1978 said:
			
		

> Can anybody explain me what is the application of such a feature apart for software developers?



Availability mainly. A reboot will cause service interruption therefore features like this "minimize" this kind of problem. 

IMHO this is BS. If someone really needs high availability then there are many ways to achieve it. After all, occasional reboots are always good since they show us if a system can reboot or not.

I used to work in a large corp (I will not mention the name) where they were afraid to shutdown the mainframe during DR tests because they didn't know if it will boot again


----------

