From: Mike Baker 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: http://git.openwrt.org/?a=commitdiff_plain;h=58dab10a0cb3ce7c762d21f35fd99bd08a41037b;p=openwrt%2Fsvn-archive%2Farchive.git fix a bug that prevents the wgt634u from initializing the filesystem properly SVN-Revision: 3601 --- diff --git a/openwrt/package/base-files/default/bin/firstboot b/openwrt/package/base-files/default/bin/firstboot index 0b3552fb12..44441b0ec0 100755 --- a/openwrt/package/base-files/default/bin/firstboot +++ b/openwrt/package/base-files/default/bin/firstboot @@ -37,6 +37,7 @@ pivot() { # pivot_root $1 $1$2 && { mount -o move $2/dev /dev mount -o move $2/tmp /tmp + return 0 } } diff --git a/openwrt/package/base-files/default/sbin/mount_root b/openwrt/package/base-files/default/sbin/mount_root index ed73915396..48a9553009 100755 --- a/openwrt/package/base-files/default/sbin/mount_root +++ b/openwrt/package/base-files/default/sbin/mount_root @@ -22,9 +22,13 @@ if [ "$1" != "failsafe" -a "$(nvram get no_root_swap)" != 1 ]; 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