标题: 熟悉Linux内核的请帮忙 [打印本页] 作者: 望月乘凉 时间: 2003-09-08 16:46 标题: 熟悉Linux内核的请帮忙 最近得到一套被裁减后的Linux内核程序,我基本不懂Linux内核,重来没看过,现在遇一个问题,希望各位帮忙,该套内核已经被裁减到700k左右,没有硬盘和软盘驱动,支持网卡和一定的网络服务,被写入DOC内部运行,应用程序可以基于该系统运行,但是,当我拔掉显卡的时候,重新启动这个被裁减过的系统的时候,发现报Warning: unable to open an initial console这个错误,我在内核原码init/main.c中找到了这个错误,但是我不知道这个程序在什么时候干什么用的,同时启动后,应用程序无法运行了,重新插入显卡,重新启动,又一切正常了,请问该如何处理这个问题
原码中是这样写的
/*
* Ok, we have completed the initial bootup, and
* we're essentially up and running. Get rid of the
* initmem segments and start the user-mode stuff..
*/
free_initmem();
unlock_kernel();
if (open("/dev/console", O_RDWR, 0) < 0)
printk("Warning: unable to open an initial console.\n"
(void) dup(0);
(void) dup(0);
/*
* We try each of these until one succeeds.
*
* The Bourne shell can be used instead of init if we are
* trying to recover a really broken machine.
*/