LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: astar

编译完内核2.6.19, 启动失败: kernel panic

[复制链接]
发表于 2006-12-18 17:31:30 | 显示全部楼层
系统默认是没有mkinitramfs的,我用make install也出现kernel panic,后来是用ubuntu的livecd上的mkinitramfs做了一个initrd.img才进入了系统
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-12-18 17:58:43 | 显示全部楼层
请问mkinitramfs带什么参数运行阿
/usr/sbin/mkinitramfs -o initrd.img 2.6.19.1
命令出错
回复 支持 反对

使用道具 举报

发表于 2006-12-18 19:23:39 | 显示全部楼层
mkinitramfs -o /boot/initrd.img-2.6.19.1 2.6.19.1
确保你已经make modules_install, /lib/modules 目录下要有 2.6.19.1 目录
回复 支持 反对

使用道具 举报

发表于 2006-12-18 22:41:04 | 显示全部楼层
Explained: "kernel panic - not syncing - attempted to kill init"
When the kernel gets into a situation where it does not know how to proceed (most often during booting, but at other times), it issues a kernel panic by calling the panic(msg) routine defined in kernel/panic.c. (Good name, huh?) This is a call from which No One Ever Returns.

The panic() routine adds text to the front of the message, telling you more about what the system was actually doing when the panic occurred ... basically how big and bad the trail of debris in the filesystem is likely to be. This is where the "not syncing" part comes from, and when you see that, it's good. (panic() does try to issue a sinc() system-call to push all buffered data out to the hard-disks before it goes down.)

The second part of the message is what was provided by the original call to panic(). For example, we find panic("Tried to kill init!") in kernel/exit.c.

So, what does this actually mean? Well, in this case it really doesn't mean that someone tried to kill the magical init process (process #1...), but simply that it tried to die. This process is not allowed to die or to be killed.

When you see this message, it's almost always at boot-time, and the real messages ... the cause of the actual failure ... will be found in the startup messages immediately preceding this one. This is often the case with kernel-panics. init encountered something "really bad," and it didn't know what to do, so it died, so the kernel died too.

BTW, the kernel-panic code is rather cute. It can blink lights and beep the system-speaker in Morse code. It can reboot the system automagically. Obviously the people who wrote this stuff encountered it a lot...

In diagnosing, or at least understanding, kernel-panics, I find it extremely helpful to have on-hand a copy of the Linux source-code, which is usually stored someplace like /usr/src/linux-2.x. You can use the grep utility to locate the actual code which caused the panic to occur.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-12-19 10:44:33 | 显示全部楼层
我安装了mkinitramfs0.9.9, 运行mkinitramfs -o /boot/initrd.img-2.6.19.1后,错误如下:
which: no ata_id in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/lukli/bin:/home/lukli/sbin:/sbin:/usr/sbin)
cp: missing destination file
Try `cp --help' for more information.

在/lib/modules/下已经有了2.6.19.1目录了。
回复 支持 反对

使用道具 举报

发表于 2006-12-19 13:04:33 | 显示全部楼层
如果把所有系统挂载根目录之前需要的模块都编译进内核好象就不需要initrd了吧?
反正我的系统上从来不用initrd
回复 支持 反对

使用道具 举报

发表于 2006-12-19 14:46:03 | 显示全部楼层
你试试安装一下 udev 再 mkinitramfs 看看
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-12-19 15:11:18 | 显示全部楼层
>> mkinitramfs -o /boot/initrd.img-2.6.19.1 2.6.19.1

/usr/sbin/mkinitramfs: line 197: mountpoint: command not found
mknod: when creating special files, major and minor device
numbers must be specified
Try `mknod --help' for more information.

请问哪里可以下载mountpoint?
回复 支持 反对

使用道具 举报

发表于 2006-12-19 15:31:47 | 显示全部楼层
你先安装一个udev看看
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-12-19 15:44:38 | 显示全部楼层
udev我已经装好了(103),才出现那个错误的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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