Submitted By: Mario Fetka (mario dot fetka at gmail dot com) Date: 2010-10-29 Initial Package Version: 3.4.10.907 Origin: gentoo busybox mdev-start.sh Upstream Status: unknown Description: create /dev entrys not created diff -Naur genkernel-3.4.10.907.orig/defaults/initrd.scripts genkernel-3.4.10.907/defaults/initrd.scripts --- genkernel-3.4.10.907.orig/defaults/initrd.scripts 2010-10-29 16:11:03.765695917 +0000 +++ genkernel-3.4.10.907/defaults/initrd.scripts 2010-10-29 17:26:49.262663667 +0000 @@ -284,9 +284,40 @@ /bin/ash } +seed_dev() +{ + # Seed /dev with some things that we know we need + + # creating /dev/console and /dev/tty1 to be able to write + # to $CONSOLE with/without bootsplash before mdev creates it + [ -c /dev/console ] || mknod /dev/console c 5 1 + [ -c /dev/tty1 ] || mknod /dev/tty1 c 4 1 + + # udevd will dup its stdin/stdout/stderr to /dev/null + # and we do not want a file which gets buffered in ram + [ -c /dev/null ] || mknod /dev/null c 1 3 + + # copy over any persistant things + if [ -d /lib/mdev/devices ] ; then + cp -RPp /lib/mdev/devices/* /dev 2>/dev/null + fi + + # Not provided by sysfs but needed + ln -snf /proc/self/fd /dev/fd + ln -snf fd/0 /dev/stdin + ln -snf fd/1 /dev/stdout + ln -snf fd/2 /dev/stderr + [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core + + # Create problematic directories + mkdir -p /dev/pts /dev/shm +} + runmdev() { # busybox udev replacement mdev -s + # add missing dev entrys for nas devices without console + seed_dev } test_success() {