|
|

楼主 |
发表于 2005-6-7 09:29:08
|
显示全部楼层
我加了一句话,把/udev下的东西都拷贝到/dev下了,这样暂时能用了
不过不是根本的解决之道,最明显的就是现在我的u盘插上之后不能识别。
这个方法不知道对你有没有用。
#!/bin/sh
# Begin $rc_base/init.d/udev - Udev cold-plugging script
# Written by Zack Winkles - winkie@linuxfromscratch.org
. /etc/sysconfig/rc
. $rc_functions
# Assure that sysfs is mounted and that udev is present.
[ -d /sys/block -a -x /sbin/udev ] || exit 0
# Create some things that sysfs does not, and should not export for us. Feel
# free to add devices to this list.
make_extra_nodes() {
ln -s /proc/self/fd /dev/fd
ln -s /proc/self/fd/0 /dev/stdin
ln -s /proc/self/fd/1 /dev/stdout
ln -s /proc/self/fd/2 /dev/stderr
ln -s /proc/kcore /dev/core
mkdir /dev/pts
mkdir /dev/shm
}
case "$1" in
start)
# Don't attempt to populate the /dev directory when something
# else has already set it up.
[ -f /dev/.udev.tdb ] && exit 0
echo " opulating /dev with device nodes..."
# Mount a temporary file system over /dev, so that any devices
# made or removed during this boot don't affect the next one.
# The reason we don't write to mtab is because we don't ever
# want /dev to be unavailable (such as by `umount -a').
mount -n -t ramfs ramfs /dev
if [ $? != 0 ]
then
print_status failure
echo -n -e $FAILURE
echo
echo "Cannot mount a ramfs onto /dev, this system will be halted."
echo
echo -n "When you press Enter, this system will be halted."
echo -n -e $NORMAL
echo
echo " ress Enter to continue..."
read ENTER
halt -f
fi
# Assign udev to get hotplug events. This will be overwritten
# in the hotplug bootscript.
echo /sbin/udevsend > /proc/sys/kernel/hotplug
# Populate /dev with all the devices that are already available,
# and save it's status so we can report failures.
udevstart || failed=1
# Now, create some required files/directories/devices that sysfs
# doesn't export for us.
make_extra_nodes
cp -rf /udev/* /dev
# When reporting the status, base it on the success or failure
# of the `udevstart' command, since that's the most important.
(exit $failed)
evaluate_retval
;;
*)
echo "Usage $0 {start}"
exit 1
;;
esac
# End $rc_base/init.d/udev |
|