From 6db4234fef134c698746de72b8ff5589290a14e5 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sun, 9 Apr 2006 22:37:13 +0000 Subject: fixed cowloop initialization part ... git-svn-id: http://svn.openslx.org/svn/openslx/ld4@174 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/initrd-stuff/init | 17 +++++++++++------ initrd/mkdxsinitrd | 3 ++- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'initrd') diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index 73841e7f..488d6816 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -99,17 +99,18 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup noldsc) NOLDSC=yes;; # additional source to unify root filesystem with - union*) + union=*) UNIONFS=1 UNIONDIRS=${opts#union=};; # if unionfs should be used - unionfs*) + unionfs) UNIONFS=1;; # if cowloop should be used, only ontop of network block device and in # combination with classical fs, like ext2 useful cowloop*) COWLOOP=1 - COWSIZE=${opts#cowloop=};; + #COWSIZE=${opts#cowloop=} + ;; # dnbd server:port dnbdroot=*) NBD=dnbd # name of kernel module @@ -235,7 +236,7 @@ if [ -n "${NBD}" ] ; then # network block device present in standard kernel nbd) RDEV=/dev/nbd0 - waitfor "${RDEV}" 15000 || error "$init_nbddev" + waitfor "${RDEV}" 30000 || error "$init_nbddev" echo "0" > /sys/block/nbd0/queue/read_ahead_kb nbd-client $nbdhost $nbdport ${RDEV} || error "$init_nbdcl" # switch off unneeded block read ahead @@ -272,13 +273,17 @@ if [ -n "${NBD}" ] ; then fi echo "Using Copy-on-Write block device for rw access" mount -n -t tmpfs -o size=${COWSIZE} ramfs ${RWDIR} + mkdir /dev/cow && cp -a /tmp/ctl /dev/cow + ln -s /dev/cowloop0 /dev/cow/0 cowdev -a /dev/nbd0 ${RWDIR}/nbd.cow + usleep 10 RWRO="rw" RDEV=/dev/cow/0 # run ldconfig if not switched off via kernel command line [ -z "${NOLDSC}" ] && echo $init_ldcfg && ldconfig /etc/ld.so.cache & - fi - mount -n -t $RFST -o $RWRO $RDEV /mnt + fi + # finally mount the block device + mount -n -t $RFST -o $RWRO $RDEV /mnt fi # if no type of root filesystem is passed via kernel command line try diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd index 6286dfa5..5f556170 100755 --- a/initrd/mkdxsinitrd +++ b/initrd/mkdxsinitrd @@ -302,9 +302,10 @@ copy_distro_stuff ${DISTRO} ${DISTRO_VER} mknod ${INSTDIR}/tmp/console c 5 1 &>/dev/null mknod ${INSTDIR}/tmp/null c 1 3 &>/dev/null mknod ${INSTDIR}/tmp/kmsg c 1 11 &>/dev/null +mknod ${INSTDIR}/tmp/ctl b 241 255 &>/dev/null #if no klibc - klibc shell seems not to have enough functionality :-( -for bbins in ash ash sh; do +for bbins in bash ash sh; do if cobi ${bbins} bin ; then ln -fs ${bbins} ${INSTDIR}/bin/sh [ "${bbins}" != "bash" ] && ln -fs ${bbins} ${INSTDIR}/bin/bash -- cgit v1.2.3-55-g7522