QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1621|回复: 0

编译好内核后运行, 有kernel panic之类错误,

[复制链接]
发表于 2005-11-7 11:40:38 | 显示全部楼层 |阅读模式
在RedHat 7.3中内核本身有2.4.18-3, 采用grub启动. 在其中编译2.4.20内核
...
  #make mrproper
  #make oldconfig
  #make dep
  #make bzImage
  #make modules
  #make modules_install
将编译好的内核复制到/boot目录下:
  #cp /use/src/linux/arch/i386/boot/bzImage /boot/bzImage-2.4.20
  #cp /usr/src/linux/System.map /boot/System.map-2.4.20

grub.conf中增加新内核说明:
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz

title Red Hat Linux (2.4.18-3)
  root (hd0,0)
  kernel /vmlinuz-2.4.18-3 ro root=/dev/hda2
  initrd /initrd-2.4.18-3.img
title Red Hat Linux (2.4.20)    //增加的内容
  root (hd0,0)
  kernel /bzImage-2.4.20 ro root=/dev/hda2
  initrd /initrd-2.4.18-3.img
因为没有发现生成2.4.20内核的initrd.img, 就用原来的img文件.
存盘后reboot,选用新内核, 不行,提示kernel panic之类错误:
...
Unable to handle kernel NULL pointer dereference at virtual address 00000026
...
  <0>Kernel panic: Attempted to kill init!
然后光标就停住了,不运行下去了.

我在/boot目录下运行mkinitrd initrd-2.4.20.img 2.4.20, 然后修改Grub.conf,使它的initrd项指向/boot/initrd-2.4.20.img, 或在/usr/src/linux下mkinitrd, 再拷贝img到/boot中,重启动,仍然有相同错误,完全一样.
哪里出错了?  急!

还有怎么处理使新内核启动时和System.map-2.4.20关联?
用lilo启动lilo.conf中好象不需要描述initrd.img的.
请高手指导!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-20 13:07 , Processed in 0.137766 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表