2008-09-28

用kexec快速切换内核

详见:http://www.linuxsir.org/main/node/296

总的来说:



  1. 内核版本必需为 2.6.13 或以上,因为自该版本起内置了 kexec 系统调用的程序。

  2. 内核编译需加入 kexec 支援
    Processor type and features --->

    [*] kexec system call (EXPERIMENTAL)


  3. 系统需要安装 kexec-tools

  4. 用 /sbin/kexec 加载另一内核,语法是:
    kexec -l <kernel-image> --append="<command-line-options>" 
    如:
    kexec -l /boot/lfskernel-2.6.25.4 --append="root=/dev/sda6 ro nomce vga=0x317"

  5. 想重启内核,就以 kexec -e 来切换。




//EOF

0 comments: