rootfs运行时udev cannot open /dev/null?
自己编译了一个基本的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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
缺少了group配置文件
可以把主机端的/etc/group copy到你的rootfs/etc/ 目录下
你的rootfs是好像只读的,can't create lock file /etc/mtab~,能正常进入系统吗?
多谢楼上,我拷贝了主机端的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."
能进入系统吗?
/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."
可以正常进入系统,改了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.
/etc/init.d/rcS: line 9: [: missing `]'
rcS脚本有问题!
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发来看看