Hi all,
I got a problem about erase rootfs_data (use mini_fo fs).
My platform is kamikaze 8.09.2, and I use mini_fo filesystem on rootfs_data partition.
Here is my mtdparts and mount point info.
Creating 9 MTD partitions on "raspi":
0x00000000-0x00050000 : "u-boot"
0x00050000-0x00150000 : "kernel"
0x00150000-0x00fe0000 : "rootfs"
0x005a0000-0x00fe0000 : "rootfs_data"
0x00fe0000-0x00ff0000 : "dev-config"
0x00050000-0x00fe0000 : "firmware" <= including "kernel","rootfs" and "rootfs_data"
0x00ff0000-0x01000000 : "nvram"
0x00030000-0x00040000 : "uboot-env"
0x00040000-0x00050000 : "Factory"
root@OpenWrt:/# cat /proc/mtd
dev: size erasesize name
mtd0: 00050000 00010000 "u-boot"
mtd1: 00100000 00010000 "kernel"
mtd2: 00e90000 00010000 "rootfs"
mtd3: 00a40000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "dev-config"
mtd5: 00f90000 00010000 "firmware"
mtd6: 00010000 00010000 "nvram"
mtd7: 00010000 00010000 "uboot-env"
mtd8: 00010000 00010000 "Factory"
root@OpenWrt:/# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
tmpfs on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock3 on /jffs type jffs2 (rw)
mini_fo:/jffs on / type mini_fo (rw)
none on /proc/bus/usb type usbfs (rw)
The problem is when I do firmware upgrade, I will get mini_fo error message after system reboot.
And the problem only happens in the 1st time reboot.
Here are my firmware upgrade steps: (will also erase "kernel","rootfs" and "rootfs_data")
mtd erase firmware
mtd write /tmp/openwrt-rt5350-squashfs.img firmware
reboot -f
After reboot system, I will get the following message and only at the 1st time reboot.
mini_fo: build_sto_structure: failed to create storage dir [1].
mini_fo: get_neg_sto_dentry: ERROR building sto structure.
After that, if user use “shell auto complete” feature to access folder, the console will hanging.
Like use # ls /ho<tab> => means try to access /home/
Then the console will hang.
But if you try to access a file NOT a folder, the console will NOT hang.
Ex: ls -l /bin/bus<tab> => will shows /bin/busybox (NOT hang)
Here is my test:
ls /<enter> => hang
ls /jffs<enter> => hang
ls /romfs<enter> => hang
ls /bin<enter> => NOT hang
ls /bin<tab> => hang
ls –l /usr/bin/tf<tab> => NOT hang
ls –l /usr/bi<tab> => NOT hang
ls –l /usr/<tab> => NOT hang
ls –l /usr<tab> => hang
But seems system is not crash, because I still can use telnet to access my device.
When I use telnet to the device, here is the ps info:
admin@OpenWrt:~$ ps
PID USER VSZ STAT COMMAND
1 root 2004 S init
2 root 0 SWN [ksoftirqd/0]
3 root 0 SW< [events/0]
4 root 0 SW< [khelper]
5 root 0 SW< [kthread]
21 root 0 SW< [kblockd/0]
34 root 0 SW< [kswapd0]
35 root 0 SW [pdflush]
36 root 0 SW [pdflush]
37 root 0 SW< [aio/0]
651 root 0 SW [mtdblockd]
1969 root 0 SWN [jffs2_gcd_mtd3]
1983 root 2004 S init
1984 root 2004 S init
1985 root 2016 D /bin/ash --login
1995 root 2016 S syslogd -C16
1997 root 1996 S klogd
2009 root 1140 S /sbin/hotplug2 --override --persistent --max-children
2183 root 0 SW< [khubd]
2242 root 0 SW [RtmpCmdQTask]
2243 root 0 SW [RtmpWscTask]
2373 root 2000 S /usr/sbin/httpd -p 80 -h /www -r OpenWrt
2386 root 2004 R telnetd -l /bin/login
2408 nobody 1280 S /usr/sbin/dnsmasq -K -D -y -Z -b -E -s lan -S /lan/ -
2435 admin 2012 S -sh
2443 admin 2004 R ps
I think the problem is PID: 1985 state is “D”
I also did another test - to erase rootfs_data only.
(Ref: http://wiki.openwrt.org/doc/howto/generic.failsafe)
mtd erase rootfs_data
reboot -f
And the problem will happen, too.
Because it only happens at the 1st reboot, so if reboot system again,
the mini_fo error message will not shows and seems every thing works well.
I really don’t know what the rootcause is. Can anyone give me some suggestions?
Thanks,
Andrew
(Last edited by andrewintw on 25 Sep 2014, 13:13)