You are not logged in.

#1 2005-08-23 07:50:57

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Load new kernel without reboot?

I know, silly question. But is there a way, after a kernel upgrade, to unload the old kernel and load the new one without a reboot?

Offline

#2 2005-08-23 08:40:50

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Load new kernel without reboot?

No.

Offline

#3 2005-08-23 15:08:42

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Load new kernel without reboot?

Ah, I see that there is a misunderstanding here... let me explain.  The kernel, for all intents and purposes, *is* your computer.  The kernel controls how data gets to and from the disk, how programs are run, how things display on your monitor, how audio data gets to your sound card, and how the text you type gets to the screen.  Without a kernel your system is a rock.

Therefore, if you unload the kernel in order to reload another one, your system becomes said rock... the only way to start this process is to have it loaded by a boot loader (grub, lilo, ntldr, ...), therefore, you must reboot.

Offline

#4 2005-08-23 15:50:28

paranoos
Member
From: thornhill.on.ca
Registered: 2004-07-22
Posts: 442

Re: Load new kernel without reboot?

i've heard of a project to reload a new kernel. not sure what it's called, i think i heard about it on slashdot some time ago. basically, it's for servers that can't afford to go down, but need an upgrade.

so there kinda sorta is a way to do this as far as i know. but... i would think it takes just as long as a reboot, so why bother?

Offline

#5 2005-08-23 15:56:56

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Load new kernel without reboot?

paranoos wrote:

i've heard of a project to reload a new kernel. not sure what it's called, i think i heard about it on slashdot some time ago. basically, it's for servers that can't afford to go down, but need an upgrade.

so there kinda sorta is a way to do this as far as i know. but... i would think it takes just as long as a reboot, so why bother?

It'd be possible, but it'd require running the machine under a minimal kernel upon which the linux kernel is layered... basically something like a constantly running bootloader...

Offline

#6 2005-08-23 16:48:43

kth5
Member
Registered: 2004-04-29
Posts: 657
Website

Re: Load new kernel without reboot?

phrakture wrote:
paranoos wrote:

i've heard of a project to reload a new kernel. not sure what it's called, i think i heard about it on slashdot some time ago. basically, it's for servers that can't afford to go down, but need an upgrade.

so there kinda sorta is a way to do this as far as i know. but... i would think it takes just as long as a reboot, so why bother?

It'd be possible, but it'd require running the machine under a minimal kernel upon which the linux kernel is layered... basically something like a constantly running bootloader...

i think the Hurd was supposed to be able to do something like this.


I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell

Offline

#7 2005-08-24 04:46:55

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: Load new kernel without reboot?

Offline

#8 2005-08-24 11:45:20

Karma XXL
Member
From: Budapest, Hungary
Registered: 2005-06-13
Posts: 91

Re: Load new kernel without reboot?

I think the kexec patch is supposed to do the same.

My -vivid kernel has it, but I haven't tried it yet.


Ailen:
Kernel: Linux 2.6.14-rc4-ck1 #1 PREEMPT
Built on: Mon Oct 17 14:51:37 CEST 2005
Hardware: Mobile AMD Sempron(tm) Processor 2800+ AuthenticAMD
WM: E17 snapshot 20051016

Offline

#9 2005-08-24 15:13:23

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Load new kernel without reboot?

bah, it's still one of those features-that-shouldnt-be

Offline

#10 2005-08-24 15:17:51

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: Load new kernel without reboot?

phrakture wrote:

bah, it's still one of those features-that-shouldnt-be

/me pictures Phrak with his eyes closed, hands over ears, yelling "la-la-la-la-la-la-i-can't-hear-you..."

Offline

#11 2005-08-24 18:15:23

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Load new kernel without reboot?

Mmm.... Kexec... is that still being developed? big_smile

Offline

#12 2005-08-24 20:07:32

jnengland77
Member
From: Black Hills, USA
Registered: 2005-05-06
Posts: 111

Re: Load new kernel without reboot?

Isn't it Xen supposed to do that?

Offline

#13 2005-08-29 20:01:01

oscar
Member
From: Kiruna, Sweden
Registered: 2004-08-13
Posts: 457

Re: Load new kernel without reboot?

You CAN force a new kernel upon your current one, but it's hard, risky and plain stupid.
You're supposted to override some value in /proc , iirc


To err is human... to really foul up requires the root password.

Offline

#14 2005-08-29 21:42:42

sepht
Member
Registered: 2005-07-07
Posts: 51

Re: Load new kernel without reboot?

yeh kexec is designed precisely to load a new kernel w/o rebooting. finally hit mainline in the 2.6.13 release last night, I threw a panic the moment I heard it came out, i've been waiting.

Offline

#15 2005-09-11 08:51:37

butters
Member
Registered: 2005-08-31
Posts: 35

Re: Load new kernel without reboot?

To clear things up:

Kexec enables the current running kernel to spawn a new instance of itself.  This is primarily to be used in combination with Kdump, which uses Kexec to generate rich crash dump data in the event of a system failure.  Kexec does not store enough state to transfer your userland processes over to the new kernel instance.

There is no demand for switching kernels on the fly.  Doing so is the equivalent of overwriting your working kernel image with one you just built.  It's plain stupid and no one would do this in the name of "5 9's" uptime.

There is demand for 5 9's, however, and Xen does store enough state information to do live migration of virtual machines.  So, the way this would happen as follows:

1) sees new kernel version is out
2) compiles and installs kernel on a virtual machine managed by Xen
3) tests services by making them available on the internal LAN
4) live migrates the production VM to the kernel testbed

There you go, kernel upgrade without a reboot.

Offline

Board footer

Powered by FluxBB