Chinaunix首页 | 论坛 | 博客
  • 博客访问: 175317
  • 博文数量: 42
  • 博客积分: 2185
  • 博客等级: 大尉
  • 技术积分: 455
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-11 21:32
文章分类

全部博文(42)

文章存档

2012年(5)

2011年(13)

2010年(6)

2009年(18)

我的朋友

分类: LINUX

2011-07-13 23:05:10

gentoo kexec nano howto

Add "lzma" USE flag if kernel is zipped with lzma:

USE="lzma" emerge -av kexec-tools

Edit /etc/conf.d/kexec

Modify KNAME & INITRD:

BOOTPART="/boot"
KNAME="kernel-genkernel-x86_64-3.0.0-rc6"
...
INITRD="/boot/initramfs-genkernel-x86_64-3.0.0-rc6"
...
# load kexec image during bootup
LOAD_DURING_SHUTDOWN="no"

Add kexec to default run level

rc-update add kexec default

After /etc/init.d/kexec restart, kexec should be configured properly. And seems ``reboot'' will use kexec to reboot after that.

kexec command line:

Load:
kexec -l --append="cmd line" --initrd="initrd"

Exec loaded:
kexec -e

One interesting option is load new kernel if panic:

 -p, --load-panic     Load the new kernel for use on panic.

It might be useful to add this option to /etc/conf.d/kexec, if we need reboot kernel (or to a fall-back kernel) after kernel panic.

 
阅读(1340) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~