From f708735bedfefca9ded570128368988f4b577b30 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Tue, 8 May 2007 21:03:37 +0000 Subject: Moved up device node creation - otherwise /dev/null would not be available early enough. etc/vmware-prep is not needed any longer in stage3 (after testing of changes) ... git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1034 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/initrd-stuff/init | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'initramfs/initrd-stuff/init') diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init index cf1d9476..ac4a5ccb 100755 --- a/initramfs/initrd-stuff/init +++ b/initramfs/initrd-stuff/init @@ -14,8 +14,27 @@ # clients version 4 ############################################################################# -# functions common for all distros, messages contains all error and info -# output (for some reason the error output is not produced properly - crash) +# device files get their own filesystem (to be move mounted later) +devdir="/dev" +mount -n -t tmpfs -o 'size=25%,mode=0755' initramfsdevs ${devdir} + +# 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/bootsplash p" "/dev/xconsole p"; do + mknod $i +done +mkdir -p ${devdir}/pts ${devdir}/shm ${devdir}/.udevdb ${devdir}/.udev + +# 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) # how do the localization here? There is not yet a country-Variable . /etc/messages @@ -45,23 +64,6 @@ export SLXVERSION="${slxconf_slxver}" # do not use dnbd cache file nodnbdcache="yes" -# device files get their own filesystem (to be move mounted later) -devdir="/dev" -mount -n -t tmpfs -o 'size=25%,mode=0755' initramfsdevs ${devdir} - -# 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/bootsplash p" "/dev/xconsole p"; do - mknod $i -done -mkdir -p ${devdir}/pts ${devdir}/shm ${devdir}/.udevdb ${devdir}/.udev # mount the important standard directories [ ! -f /proc/cpuinfo ] && mount -n -t proc proc /proc @@ -608,9 +610,8 @@ echo -e "# /etc/fstab - file generated by $0 (initramfs from $date)\n#\ \tDirk von \ Suchodoletz, dirk@goe.net\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\n\ -usbfs\t\t/proc/bus/usb\tusbfs\t\tnoauto\t\t 0 0" >/mnt/etc/fstab || \ - error "$init_fstab" +\t\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 -- cgit v1.2.3-55-g7522