From: mbm Date: Sat, 8 Apr 2006 21:11:49 +0000 (+0000) Subject: fix a bug that prevents the wgt634u from initializing the filesystem properly X-Git-Url: https://git.rohieb.name/openwrt.git/commitdiff_plain/89ca788b2d7c218c98dd112c567e4bf2d92c4864 fix a bug that prevents the wgt634u from initializing the filesystem properly git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3601 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/base-files/default/bin/firstboot b/package/base-files/default/bin/firstboot index 1d9b658b6..5d3d9677e 100755 --- a/package/base-files/default/bin/firstboot +++ b/package/base-files/default/bin/firstboot @@ -37,6 +37,8 @@ pivot() { # 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 } } diff --git a/package/base-files/default/sbin/mount_root b/package/base-files/default/sbin/mount_root index 38252e83f..88a836c80 100755 --- a/package/base-files/default/sbin/mount_root +++ b/package/base-files/default/sbin/mount_root @@ -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