summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--initramfs/distro-specs/ubuntu/functions-default15
-rwxr-xr-xinitramfs/stage3-stuff/init8
2 files changed, 19 insertions, 4 deletions
diff --git a/initramfs/distro-specs/ubuntu/functions-default b/initramfs/distro-specs/ubuntu/functions-default
index d5cb3f9b..fd14dbd0 100644
--- a/initramfs/distro-specs/ubuntu/functions-default
+++ b/initramfs/distro-specs/ubuntu/functions-default
@@ -1,5 +1,5 @@
# Copyright (c) 2003..2006 - RZ Uni Freiburg
-# Copyright (c) 2006..2008 - OpenSLX GmbH
+# Copyright (c) 2006..2009 - OpenSLX GmbH
#
# This program/file is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
@@ -70,6 +70,15 @@ config_distro () {
# for screen sessions
testmkd /mnt/var/run/screen root:utmp 0775
+
+ # no additional /dev/shm mount needed as it is always used
+ sed -e "/Mount a tmpfs on/,/domount tmpfs /d" \
+ -i /mnt/etc/init.d/mountdevsubfs.sh
+
+ # clean up the udev script as much is handled already in stage3
+ sed -e "3i# Script modified during SLX stage3 bootup (config_distro)" \
+ -e "/# We need the uevent/,/# It's all over/d" \
+ -e "/# Log things that/,/kill \$UDEV/d" -i /mnt/etc/init.d/udev
}
# initial (boot time) runlevel scripts
@@ -78,8 +87,8 @@ local count=10
# boot.slx is a special runlevel script generated within initialramfs which
# should be executed before the normal runlevel scripts. Proper shutdown is
# not needed!?
-for i in mountkernfs.sh mountdevsubfs.sh boot.slx keyboard-setup procps \
-bootlogd hwclock.sh sudo console-setup $D_SPLASHY; do
+for i in mountkernfs.sh mountdevsubfs.sh keyboard-setup procps bootlogd \
+hwclock.sh sudo console-setup boot.slx $D_SPLASHY; do
count=$(($count + 1))
[ $DEBUGLEVEL -ge 2 ] && echo "boot-runlevelscript $i"
ln -sf /etc/init.d/$i /mnt/etc/rcS.d/S${count}$i
diff --git a/initramfs/stage3-stuff/init b/initramfs/stage3-stuff/init
index b1de9a82..7aef385a 100755
--- a/initramfs/stage3-stuff/init
+++ b/initramfs/stage3-stuff/init
@@ -38,6 +38,12 @@ for i in "/dev/mem c 1 1" "/dev/null c 1 3" "/dev/zero c 1 5" \
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
# start device auto discovery/setup service of busybox
echo >/etc/mdev.conf
@@ -938,7 +944,7 @@ sed -n "s,/mnt,,;/\/tmp /p" /proc/mounts >> /mnt/etc/mtab
# preparations to leave initramfs - umounting ...
umount -n /sys || error "$init_errsys" nonfatal
umount -n /proc/bus/usb >/dev/null 2>&1
-chmod 1777 /mnt/dev/shm /mnt/tmp 2>/dev/null
+chmod 1777 /dev/shm /mnt/tmp 2>/dev/null
runinithook '95-cleanup'