Reboot Linux faster using kexec (developerWorks)
Kexec is a patch to the Linux kernel that allows you to boot directly to a new kernel from the currently running one. In the boot sequence described above, kexec skips the entire bootloader stage (the first part) and directly jumps into the kernel that we want to boot to. There is no hardware reset, no firmware operation, and no bootloader involved. The weakest link in the boot sequence -- that is, the firmware -- is completely avoided. The big gain from this feature is that system reboots are now extremely fast." (LWN also looked at kexec in November, 2002).
Posted May 5, 2004 15:18 UTC (Wed)
by horen (guest, #2514)
[Link]
:) What a wonderful development!
:( Too bad it's only for the 2.6-series kernels.
I run FC/1 with an optimized 2.4.22-1.2188.nptl kernel on all our servers and workstations (yes, and mine here at home), and I'd love to have this ability to reboot them into a new kernel. I'm not so sure about moving immediately to FC/2 when it's released in the near-future, and I'm particularly not ready to move to LVM2 (IIRC, that's a "must-do" with the 2.6 kernel).
Posted May 5, 2004 15:23 UTC (Wed)
by Wills (guest, #1813)
[Link] (1 responses)
Posted May 6, 2004 4:26 UTC (Thu)
by snitm (guest, #4031)
[Link]
Posted May 5, 2004 18:34 UTC (Wed)
by penguinroar (guest, #14460)
[Link]
Posted May 5, 2004 19:20 UTC (Wed)
by hisdad (subscriber, #5375)
[Link]
Regards
Posted May 5, 2004 19:20 UTC (Wed)
by tjw.org (guest, #20716)
[Link] (3 responses)
I was able to upgrade from 2.6.2 -> 2.6.3 -> 2.6.4 -> 2.6.5 using That is to say I was able to install a new kernel and reboot my workstation without going all the way down to the BIOS/SCSI BIOS. In my opinion there are still a lot of things that need fixing before this makes it into the mainline. 1) Video Mode Selection and Frame Buffer Console are broken. You need to use the default console or you'll get a mangled (or blank) console after Also it would be great if there were some way skip probing new devices and instead maintain a known device table (as Randy mentioned in a recent [fastboot] mailing list post). Hell, if this could be implemented just for the SCSI drivers, I'de call it good enough since over half my reboot time is waiting for the SCSI driver to probe IDs.
Posted May 6, 2004 17:37 UTC (Thu)
by hildeb (guest, #6532)
[Link] (2 responses)
Posted May 7, 2004 15:02 UTC (Fri)
by tjw.org (guest, #20716)
[Link] (1 responses)
Posted May 13, 2004 15:44 UTC (Thu)
by cyberic (subscriber, #21568)
[Link]
And I get these errors: any help?
Reboot Linux faster using kexec (developerWorks)
You covered kexec before in an LWN article in 2002 speculating that it might get merged with the main kernel - which still hasn't happened.
Reboot Linux faster using kexec (developerWorks)
it will likely be merged if the core developer (Eric Biederman) takes some time to push it harder at Andrew Morton. Kexec has very minimal impact on the kernel and is quite a low risk patch. Randy Dunlap (at OSDL with Andrew) is quite active with maintaining current kexec patches as new releases of the 2.6 and 2.6-mm are made.
Reboot Linux faster using kexec (developerWorks)
What a wonderful thing, reboots after updates will go even faster and thats not bad in my opinion. The next step would be to be able to switch the kernel "in motion" but maybe thats not for a monolithic kernel to do. Anyway i hope it will work good enough to get into the main tree.
Reboot Linux faster using kexec (developerWorks)
One of the things linus wanted about kexec is the ability to boot something else. Such as a post mortem debugger.Reboot Linux faster using kexec (developerWorks)
Dad
I've been using the kexec patches for a few months now with pretty good success.my kexec experience
Randy Dunlap's patches:
http://developer.osdl.org/rddunlap/kexec/
doing a kexec reboot.
2) The e100 ethernet driver doesn't work after kexec reboot "e100: eth%d: e100_eeprom_load: EEPROM corrupted". However, the compatible Becker driver eepro100 works fine on my system.
3) Sometimes all console messages get printed to every vitural tty after kexec reboot.
4) Nobody seems to be maintaining kexec-tools so you still have to hack the latest version to use the correct syscall number.
Could you please post a patch for the syscall?
my kexec experience
my kexec experience
diff -urN kexec-tools-1.8.orig/kexec/kexec-syscall.c kexec-tools-1.8/kexec/kexec-syscall.c
--- kexec-tools-1.8.orig/kexec/kexec-syscall.c 2002-11-18 00:58:05.000000000 -0600
+++ kexec-tools-1.8/kexec/kexec-syscall.c 2004-02-12 11:29:01.000000000 -0600
@@ -22,7 +22,7 @@
#define LINUX_REBOOT_CMD_KEXEC 0x45584543
-#define __NR_kexec_load 259
+#define __NR_kexec_load 274
_syscall4(int, reboot, int, magic1, int, magic2, int, cmd, void*, arg);
_syscall4(long, kexec_load, void *, entry, unsigned long, nr_segments, struct kexec_segment *, segments, unsigned long, flags);
I try to compile it with gcc version 3.3.3 (Debian 20040429)still getting errors compiling kexec-tools 1.8
gcc -Wall -g -O2 -fno-strict-aliasing -I./util_lib/include -DVERSION='"1.8"' -DRELEASE_DATE='"01 December 2002"' -o objdir/kexec/kexec-syscall.o -c kexec/kexec-syscall.c
kexec/kexec-syscall.c: In function `reboot':
kexec/kexec-syscall.c:26: error: invalid register name `r0' for register variable
kexec/kexec-syscall.c:26: error: invalid register name `r1' for register variable
kexec/kexec-syscall.c:26: error: invalid register name `r2' for register variable
kexec/kexec-syscall.c:26: error: invalid register name `r3' for register variable
kexec/kexec-syscall.c:26: error: invalid register name `r0' for register variable
kexec/kexec-syscall.c:26: error: unknown register name `lr' in `asm'
kexec/kexec-syscall.c: In function `kexec_load':
kexec/kexec-syscall.c:27: error: invalid register name `r0' for register variable
kexec/kexec-syscall.c:27: error: invalid register name `r1' for register variable
kexec/kexec-syscall.c:27: error: invalid register name `r2' for register variable
kexec/kexec-syscall.c:27: error: invalid register name `r3' for register variable
kexec/kexec-syscall.c:27: error: invalid register name `r0' for register variable
kexec/kexec-syscall.c:27: error: unknown register name `lr' in `asm'
make: *** [objdir/kexec/kexec-syscall.o] Error 1