summaryrefslogtreecommitdiffstats
path: root/src/initramfs/scripts/init
diff options
context:
space:
mode:
Diffstat (limited to 'src/initramfs/scripts/init')
-rwxr-xr-xsrc/initramfs/scripts/init30
1 files changed, 3 insertions, 27 deletions
diff --git a/src/initramfs/scripts/init b/src/initramfs/scripts/init
index a4a41629..dd5c8d60 100755
--- a/src/initramfs/scripts/init
+++ b/src/initramfs/scripts/init
@@ -20,7 +20,7 @@ export PATH=/bin:/sbin:/usr/bin/:/usr/sbin
# device files get their own filesystem (to be move mounted later)
devdir="/dev"
-mount -n -t tmpfs -o 'size=25%,mode=0755' initramfsdevs ${devdir}
+mount -n -t devtmpfs -o 'size=25%,mode=0755' initramfsdevs ${devdir}
mkdir -p /run
mount -n -t tmpfs -o 'mode=755' run "/run"
@@ -29,26 +29,8 @@ mount -n -t tmpfs -o 'mode=755' run "/run"
[ ! -f /proc/cpuinfo ] && mount -n -t proc proc /proc
[ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys
-# create basic device files an directories (in dev - for most hardware related
-# devices mdev should handle that)
-for i in "/dev/mem c 1 1" "/dev/null c 1 3" "/dev/zero c 1 5" \
- "/dev/urandom c 1 9" "/dev/kmsg c 1 11" "/dev/tty0 c 4 0" \
- "/dev/tty1 c 4 1" "/dev/tty2 c 4 2" "/dev/tty3 c 4 3" \
- "/dev/tty4 c 4 4" "/dev/tty5 c 4 5" "/dev/tty6 c 4 6" \
- "/dev/tty7 c 4 7" "/dev/tty8 c 4 8" "/dev/tty9 c 4 9" \
- "/dev/tty10 c 4 10" "/dev/tty c 5 0" "/dev/console c 5 1" \
- "/dev/ptmx c 5 2" "/dev/psaux c 10 1" "/dev/agpgart c 10 175" \
- "/dev/fb0 c 29 0" "/dev/xconsole p"; do
- mknod $i
-done
mkdir -p ${devdir}/pts ${devdir}/shm ${devdir}/.udevdb ${devdir}/.udev \
${devdir}/.initramfs /var/log
-# create some standard links (expected?) in /dev
-ln -s /proc/kcore /dev/core
-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
mount -t devpts devpts /dev/pts
@@ -56,10 +38,6 @@ mount -t devpts devpts /dev/pts
getty -i -n -l /bin/cat 38400 tty10 &
setlogcons 10
-# start device auto discovery/setup service of busybox
-echo "# Set mdev behaviour in either init or hwautocfg" >/etc/mdev.conf
-mdev -s
-
# source functions file common for all distros, messages contains all error
# and info output (for some reason the error output is not produced properly
# - crash)
@@ -523,7 +501,6 @@ if [ -n "${bldmod}" ] ; then
for module in ${bldmod} ; do
modprobe ${MODPRV} ${module} || error "$init_errbld"
done
- mdev -s
[ -z "$bldrfst" ] && bldrfst=squashfs
bldhost=$(checkip $bldhost)
if [ $DEBUGLEVEL -eq 20 ] ; then
@@ -656,7 +633,6 @@ if [ -n "${bldmod}" ] ; then
modprobe ${MODPRV} cowloop || {
error "$init_loadcow" nonfatal
unset cowloop; }
- [ -x /bin/mdev ] && mdev -s
fi
if [ -n "${cowloop}" ] ; then
if [ -n "${unionfs}" -o -n "${aufs}" ] ; then
@@ -937,8 +913,8 @@ done
chown 65534:0 /mnt/var/lib/nobody
echo -e "# /etc/fstab - file generated by $0 (initramfs from $date)\n#\
\tOpenSLX Project, info@openslx.com\n\nrootfs\t\t/\t\trootfs\t\tro\t\t 0 0\n\
-proc\t\t/proc\t\tproc\t\tdefaults\t 0 0\ninitramdevs\t/dev\t\ttmpfs\
-\t\trw\t\t 0 0\ndevpts\t\t/dev/pts\tdevpts\t\tmode=0620,gid=5\t 0 0" \
+proc\t\t/proc\t\tproc\t\tdefaults\t 0 0\ninitramdevfs\t/dev\t\tdevtmpfs\
+\trw\t\t 0 0\ndevpts\t\t/dev/pts\tdevpts\t\tmode=0620,gid=5\t 0 0" \
>/mnt/etc/fstab || error "$init_fstab"
echo -e "rootfs / rootfs rw 0 0\ninitramdevs /dev tmpfs rw\
0 0" > /mnt/etc/mtab