免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 9734 | 回复: 10

rootfs运行时udev cannot open /dev/null? [复制链接]

论坛徽章:
0
发表于 2009-10-23 11:03 |显示全部楼层
自己编译了一个基本的rootfs,启动时发现udev 无法打开/dev/null。bash可以进去,但之前有一连串的报错,请高手帮忙看看。错误信息如下:


VFS: Mounted root (nfs filesystem) on device 0:11.
Freeing init memory: 128K
INIT: version 2.86 booting
INIT: /etc/inittab[10]: duplicate ID field "1"
can't create lock file /etc/mtab~927: Permission denied (use -n flag to override)
can't create lock file /etc/mtab~928: Permission denied (use -n flag to override)
can't create lock file /etc/mtab~929: Permission denied (use -n flag to override)
can't create lock file /etc/mtab~930: Permission denied (use -n flag to override)
Starting udev ... cannot open /dev/null
udevd[932]: cannot open /dev/null

udevd[932]: specified group 'tty' unknown

udevd[932]: specified group 'dialout' unknown

udevd[932]: specified group 'kmem' unknown

udevd[932]: specified group 'video' unknown

udevd[932]: specified group 'lp' unknown

udevd[932]: specified group 'disk' unknown

udevd[932]: specified group 'floppy' unknown

udevd[932]: specified group 'cdrom' unknown

udevd[932]: specified group 'tape' unknown

udevd-event[995]: open /dev/null failed: No such file or directory

udevd-event[1003]: open /dev/null failed: No such file or directory
udevd-event[1005]: open /dev/null failed: No such file or directory

udevd-event[1008]: open /dev/null failed: No such file or directory


udevd-event[1007]: open /dev/null failed: No such file or directory

udevd-event[1016]: open /dev/null failed: No such file or directory
udevd-event[1015]: open /dev/null failed: No such file or directory


udevd-event[1018]: open /dev/null failed: No such file or directory

udevd-event[1017]: open /dev/null failed: No such file or directory

udevd-event[1026]: open /dev/null failed: No such file or directory

论坛徽章:
0
发表于 2009-10-23 11:08 |显示全部楼层
缺少了group配置文件

论坛徽章:
0
发表于 2009-10-23 11:08 |显示全部楼层
可以把主机端的/etc/group copy到你的rootfs/etc/ 目录下

论坛徽章:
0
发表于 2009-10-23 11:11 |显示全部楼层
你的rootfs是好像只读的,can't create lock file /etc/mtab~,能正常进入系统吗?

论坛徽章:
0
发表于 2009-10-23 11:14 |显示全部楼层
多谢楼上,我拷贝了主机端的group文件,前边的报错没了。可是后边的报错还在。
Starting udev ... cannot open /dev/null
udevd[929]: cannot open /dev/null

udevd-event[1001]: open /dev/null failed: No such file or directory

udevd-event[1002]: open /dev/null failed: No such file or directory

udevd-event[1014]: open /dev/null failed: No such file or directory
udevd-event[1017]: open /dev/null failed: No such file or directory

udevd-event[1011]: open /dev/null failed: No such file or directory

udevd-event[1016]: open /dev/null failed: No such file or directory


udevd-event[1015]: open /dev/null failed: No such file or directory

udevd-event[1027]: open /dev/null failed: No such file or directory

udevd-event[1018]: open /dev/null failed: No such file or directory

udevd-event[1026]: open /dev/null failed: No such file or directory


对了,我的etc/init.d/rcS文件中内容如下:


mount -t sysfs sysfs  /sys
mount -t tmpfs tmpfs  /dev
mount -t proc  proc   /proc
mount -t tmpfs tmpfs  /tmp

[ -e /dev/console ] || mknod /dev/console c 5 1

echo -n "Starting udev ... "
udevd --daemon
udevadm trigger
echo "OK."

论坛徽章:
0
发表于 2009-10-23 11:17 |显示全部楼层
能进入系统吗?

论坛徽章:
0
发表于 2009-10-23 11:22 |显示全部楼层
/dev/null是不是在启动udev之前手工创建的?你把创建null设备放在rcS文件中试一下

mount -t sysfs sysfs  /sys
mount -t tmpfs tmpfs  /dev
mount -t proc  proc   /proc
mount -t tmpfs tmpfs  /tmp

[ -e /dev/console ] || mknod /dev/console c 5 1
[ -e /dev/null] || mknod /dev/null c 1 3

echo -n "Starting udev ... "
udevd --daemon
udevadm trigger
echo "OK."

论坛徽章:
0
发表于 2009-10-23 11:29 |显示全部楼层
可以正常进入系统,改了rcS后前边问题解决了,但是还是有报错。哎。。。

INIT: version 2.86 booting
INIT: /etc/inittab[10]: duplicate ID field "1"
can't create lock file /etc/mtab~927: Permission denied (use -n flag to override)
can't create lock file /etc/mtab~928: Permission denied (use -n flag to override)
can't create lock file /etc/mtab~929: Permission denied (use -n flag to override)
can't create lock file /etc/mtab~930: Permission denied (use -n flag to override)
/etc/init.d/rcS: line 9: [: missing `]'
Starting udev ... uncorrectable error :
uncorrectable error :
end_request: I/O error, dev mtdblock2, sector 0
Buffer I/O error on device mtdblock2, logical block 0
end_request: I/O error, dev mtdblock2, sector 8
Buffer I/O error on device mtdblock2, logical block 1
uncorrectable error :
end_request: I/O error, dev mtdblock2, sector 16
Buffer I/O error on device mtdblock2, logical block 2
uncorrectable error :
uncorrectable error :
end_request: I/O error, dev mtdblock2, sector 24
Buffer I/O error on device mtdblock2, logical block 3
uncorrectable error :
uncorrectable error :
end_request: I/O error, dev mtdblock2, sector 0
Buffer I/O error on device mtdblock2, logical block 0
end_request: I/O error, dev mtdblock0, sector 0
Buffer I/O error on device mtdblock0, logical block 0
end_request: I/O error, dev mtdblock0, sector 0
Buffer I/O error on device mtdblock0, logical block 0
uncorrectable error :
uncorrectable error :
end_request: I/O error, dev mtdblock4, sector 456448
Buffer I/O error on device mtdblock4, logical block 57056
uncorrectable error :
uncorrectable error :
end_request: I/O error, dev mtdblock4, sector 456448
Buffer I/O error on device mtdblock4, logical block 57056
OK.

论坛徽章:
0
发表于 2009-10-23 11:33 |显示全部楼层
/etc/init.d/rcS: line 9: [: missing `]'

rcS脚本有问题!

论坛徽章:
0
发表于 2009-10-23 11:41 |显示全部楼层
can't create lock file /etc/mtab~927: Permission denied (use -n flag to override)
can't create lock file /etc/mtab~928: Permission denied (use -n flag to override)
can't create lock file /etc/mtab~929: Permission denied (use -n flag to override)
can't create lock file /etc/mtab~930: Permission denied (use -n flag to override)

ROOTFS 是只读文件系统,CMDLINE发来看看
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP