fix a bug that prevents the wgt634u from initializing the filesystem properly
authormbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 8 Apr 2006 21:11:49 +0000 (21:11 +0000)
committermbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 8 Apr 2006 21:11:49 +0000 (21:11 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3601 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/base-files/default/bin/firstboot
package/base-files/default/sbin/mount_root

index 1d9b658b69960bc6906175797011ba824839da6b..5d3d9677ee1304e49dd1067d882d3f9983c5a80e 100755 (executable)
@@ -37,6 +37,8 @@ pivot() { # <new_root> <old_root>
        pivot_root $1 $1$2 && {
                mount -o move $2/dev /dev
                mount -o move $2/tmp /tmp
+               mount -o move $2/sys /sys
+               return 0
        }
 }
 
index 38252e83fe578635c35f8b115d4dbbfdf5de6332..88a836c808f93475ef362697aef392e7cfb7baa4 100755 (executable)
@@ -22,9 +22,13 @@ if [ "$1" != "failsafe" ]; then
                . /bin/firstboot
                is_dirty 
                [ $? != 0 ] && {
-                       mount /dev/mtdblock/4 /jffs
+                       echo "switching to jffs2"
+                       mount /dev/mtdblock/4 /jffs -t jffs2
                        pivot /jffs /rom
-               } || ramoverlay
+               } || {
+                       echo "jffs2 unusable; using ramdisk"
+                       ramoverlay
+               }
        fi
 fi