Posiedzialem i potestowalem na ile moglem i nastepna wersja jak zwykle w 
zalaczniku.
Dodatkowo potrzebne jest wlaczenie grep i sleep w busybox.

Dziala tak jak sobie zaplanowalem.

Testy mile widziane oraz czekam na uwagi.

Pozdrawiam
Bartłomiej Zimoń
Index: busybox-initrd.config
===================================================================
RCS file: /cvsroot/SOURCES/busybox-initrd.config,v
retrieving revision 1.40
diff -u -r1.40 busybox-initrd.config
--- busybox-initrd.config	27 Apr 2008 12:54:45 -0000	1.40
+++ busybox-initrd.config	15 Sep 2008 09:07:20 -0000
@@ -205,7 +205,7 @@
 # CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
 # CONFIG_SEQ is not set
 # CONFIG_SHA1SUM is not set
-# CONFIG_SLEEP is not set
+CONFIG_SLEEP=y
 # CONFIG_FEATURE_FANCY_SLEEP is not set
 # CONFIG_SORT is not set
 # CONFIG_FEATURE_SORT_BIG is not set
@@ -339,10 +339,10 @@
 # CONFIG_FEATURE_FIND_PATH is not set
 # CONFIG_FEATURE_FIND_REGEX is not set
 # CONFIG_FEATURE_FIND_CONTEXT is not set
-# CONFIG_GREP is not set
+CONFIG_GREP=y
 # CONFIG_FEATURE_GREP_EGREP_ALIAS is not set
 # CONFIG_FEATURE_GREP_FGREP_ALIAS is not set
-# CONFIG_FEATURE_GREP_CONTEXT is not set
+CONFIG_FEATURE_GREP_CONTEXT=y
 # CONFIG_XARGS is not set
 # CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
 # CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set
--- /sbin/geninitrd	2008-08-06 11:16:10.000000000 +0000
+++ /sbin/geninitrd_new	2008-09-15 11:07:18.000000000 +0000
@@ -2125,6 +2125,31 @@
 			device=$rootdev
 		fi
 
+		# 30 sekund opoznienia na poczatek
+		echo "Waiting for root device apear "
+		timetowait=30
+		device_short=`basename $device /dev/`
+		while [ "$timetowait" != "0" ];
+		do
+			timetowait=$((timetowait - 1))
+			wehaveroot=`grep $device_short /proc/partitions`
+
+			if [ -z "$wehaveroot" ]; then
+				echo -n "."
+				sleep 1
+			else
+				timetowait=0
+				echo "Found root device"
+			fi
+		done
+
+		if [ -z "$wehaveroot" ]; then
+			echo "NOT found root device"
+			busybox awk '{if (NR > 2 ) {print "/dev/"$4" "}}' /proc/partitions
+			echo -n "Can't find root=$device please choose one from listed above :"
+			read device
+		fi
+
 		mount -t $rootfs -r $device /newroot
 		init="$(echo "$CMDLINE" | busybox awk '/init=\// { gsub(/.*init=/,NIL,$0); gsub(/ .*/,NIL,$0); print }')"
 		if [ -z "$init" -o ! -x "/newroot$init" ]; then
_______________________________________________
pld-devel-pl mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl

Odpowiedź listem elektroniczym