LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 3357|回复: 9

求助无法启动lfs。Warning: unable to open an initial console。。。。。

[复制链接]
发表于 2005-4-7 16:34:57 | 显示全部楼层 |阅读模式
我在hiweed-debian下分区/mybak建立目录lfs,进行编译。

最后几步安装了grub但是我没有写入到mbr,直接修改了debian下的grub/menu.lst
发现启动不了lfs。出错提示如下:

VFS:Mounted root (ext3 filesystem) readonly
Freeing unused kernel memory: 96k free
Warning: unable to open an initial console
kernel panic: No init found Try passing init= option to kernel

我已经重新编译了2边kernel了。还是这样。

这是我的df:
Filesystem             1K-块        已用     可用 已用% 挂载点
/dev/hdd6             11045160   1251464   9232628  12% /
tmpfs                   193376         0    193376   0% /dev/shm
/dev/hdd5               195694     11064    174190   6% /boot
/dev/hdd7              8167164    162832   7589456   3% /home
/dev/hdd8              6649148   2535892   3775492  41% /mybak

这是我的menu.lst
title           Debian GNU/Linux, kernel 2.6.8-2-686
root            (hd1,4)
kernel          /vmlinuz-2.6.8-2-686 root=/dev/hdd6 ro vga=788
initrd          /initrd.img-2.6.8-2-686
savedefault
boot

title           Debian GNU/Linux, kernel 2.6.8-2-686 (recovery mode)
root            (hd1,4)
kernel          /vmlinuz-2.6.8-2-686 root=/dev/hdd6 ro vga=788 single
initrd          /initrd.img-2.6.8-2-686
savedefault
boot
title           Microsoft WindowsXP
root            (hd0,0)
savedefault
makeactive
chainloader     +1

# The first entry is for LFS.
title LFS 5.0
root (hd1,7)
kernel /lfs/boot/lfskernel root=/dev/hdd8 ro

请不吝赐教!谢谢!
发表于 2005-4-7 16:48:33 | 显示全部楼层
一个问题:你的/dev/没有console这个文件。
进入chroot
#mknod -m 600 /dev/console c 5 1
#mknod -m 666 /dev/null c 1 3
回复 支持 反对

使用道具 举报

发表于 2005-4-7 18:16:10 | 显示全部楼层

  1. 我在hiweed-debian下分区/mybak建立目录lfs,进行编译。
  2. ...
  3. /dev/hdd8 6649148 2535892 3775492 41% /mybak
  4. ...
  5. # The first entry is for LFS.
  6. title LFS 5.0
  7. root (hd1,7)
  8. kernel /lfs/boot/lfskernel root=/dev/hdd8 ro
复制代码


我的解:
cd /mybak
mv -R lfs/ .

that's all.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-4-7 22:49:11 | 显示全部楼层
回 一楼:ls /mybak/lfs/dev/console
crw-------  1 root tty 5, 1 2005-04-07 22:40 console
这个文件是有的。

回二楼:mv -R好像没有这个参数,你是什么意思阿?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-4-7 23:32:14 | 显示全部楼层
解决了,
我把lfs下的都拷贝到此分区的根目录下。
出错原因大概是因为,找不到root根分区。
谢谢1楼的帮助,2楼的提醒。
回复 支持 反对

使用道具 举报

发表于 2005-4-8 08:59:23 | 显示全部楼层
congratulations !

-R 即  recursive

mv -R 即 把/mybak/lfs 下的东东移到 /mybak 下。
回复 支持 反对

使用道具 举报

发表于 2005-4-8 09:00:33 | 显示全部楼层
  可能mv没有这个参数,也可以全部移动。我对命令不熟的...
回复 支持 反对

使用道具 举报

发表于 2005-11-28 01:41:16 | 显示全部楼层
If this is a new install and configuring it for a Pure UDEV system, or you get an error when you finally reboot after installing udev and setting it correctly like this: WARNING: Unable to open an initial console. It is because there is no /dev/console and /dev/null. What is happening is that /dev/console is needed before udev is populating the /dev folder. You can try this by manually deleting all static devices in /dev folder from another system, then rebooting to the udev system. You will get the console error. You will also notice that it is faulting at a time before it normally loads udev. If you just make /dev/console though it will then fail for /dev/null. So it needs both of those static in /dev, at least for the time being. The fix for now is to manually create them in your /dev folder.

cd /dev
mknod -m 660 console c 5 1
mknod -m 660 null c 1 3


http://webpages.charter.net/deci ... elp_UDEVPrimer.html
回复 支持 反对

使用道具 举报

发表于 2006-2-9 09:13:18 | 显示全部楼层
我的也和楼主的一样,可是我的不是再一个分区的,我的分区如下:
/    /boot  /var /usr /home
我有这些分区啊
hda6 =/
hda1=/boot
hda7=/var
hda8=/usr
hda10=/home


为什么也出现那个问题啊
回复 支持 反对

使用道具 举报

发表于 2006-2-9 12:08:08 | 显示全部楼层
console 文件。你看到没?
回复 支持 反对

使用道具 举报

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

本版积分规则

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