EDITED SUMMARY:
This looks like a nasty bug as it will hit newcomer users who have flashed LEDE just once and are configuring their router.
Simply adding "anon_mount 1" option to /etc/config/fstab will make router unbootable if you still have Linksys original firmware in the other partition.
Failsafe will work, and editing /etc/config/fstab there (or deleting it) is enough to recover, but LEDE failsafe may be hard to find for new users
- Router hangs at boot when it tries to auto-mount the inactive rootfs partition that contains the original Linksys OEM contents in case you have /etc/config/fstab containing "anon_mount 1" option.
- fstab init script calls fstools "/sbin/block mount", which hangs permanently at boot (or if issued from command line later)
- The original Linksys partition contains raw jffs2 instead of ubi. That is likely the reason for the hang
- The bug will not get triggered if both firmwares have been flashed with LEDE or Openwrt, as then also the inactive rootfs partition contains ubi.
So far this has been found in WRT3200ACM, but the same will likely happen with all WRT1900/1200/3200ACx devices that have dual firmware partitions.
The hang can be seen from kernel log if the command was issued from console and another console is used to read the log. The log gets filled with this at 0.2s intervals:
kern.err kernel: [ 3032.483307] pxa3xx-nand f10d0000.flash: Wait time out!!!
Original:
I have run into strange trouble with my new WRT3200ACM.
For some reason enabling the anon_mount option in /etc/config/fstab prevents the boot process from completing. The boot progresses to some stage and it e.g. answers ping, but power led blinks and it does not allow login and does not provide dhcp etc. services.
I have had that option in all my routers (WNDR3700, WNDR3800, R7800) to make USB memory sticks to automount when inserted into the router's USB port. So it is a quite normal setting.
I first compiled a firmware image from master with kernel 4.9, and that failed to boot. I thought that the new kernel 4.9 might be the reason. So I installed 17.01.0-rc2 official image and it booted ok. I installed packages, configured, rebooted and everything was ok as long as I did not change that anon_mount to 1 in fstab. After changing that, the next boot again gets stuck. (Editing the option in failsafe enables the router to boot normally.)
Boot completes ok with the output of "block detect" entered into fstab:
config 'global'
option anon_swap '0'
option anon_mount '0'
option auto_swap '1'
option auto_mount '1'
option delay_root '5'
option check_fs '0'
Boot does not complete with anon_mount 1 in /etc/config/fstab:
config 'global'
option anon_swap '0'
option anon_mount '1'
option auto_swap '1'
option auto_mount '1'
option delay_root '5'
option check_fs '0'
I have no good guess about the reason. My initial guess was some connection to ubi1:syscfg being mounted as /tmp/syscfg as that is different than in my other devices, but it is hard to see how that cound be the reason. (That mounting is done in /lib/preinit/81_linksys_syscfg )
After some investigation it looks like the reason is actually "/sbin/block mount".
At the boot the init script /etc/init.d/fstab actually runs "/sbin/block mount".
Running that command manually from console (with anon_mount 1) makes the console to hang. From another console window I can see that system & kernel log fills from entries like these:
kern.err kernel: [ 3032.483307] pxa3xx-nand f10d0000.flash: Wait time out!!!
kern.err kernel: [ 3032.683301] pxa3xx-nand f10d0000.flash: Wait time out!!!
kern.err kernel: [ 3032.883296] pxa3xx-nand f10d0000.flash: Wait time out!!!
kern.err kernel: [ 3033.083293] pxa3xx-nand f10d0000.flash: Wait time out!!!
kern.err kernel: [ 3033.283291] pxa3xx-nand f10d0000.flash: Wait time out!!!
kern.err kernel: [ 3033.483287] pxa3xx-nand f10d0000.flash: Wait time out!!!
kern.err kernel: [ 3033.683283] pxa3xx-nand f10d0000.flash: Wait time out!!!
And the "block" process can't even be killed with "kill -9" or "kill -15".
I rebooted the router from power switch to get it killed.
With anon_mount 0 in fstab the same command works ok and produces:
root@LEDE:~# /sbin/block mount
block: /dev/ubiblock0_0 is already mounted on /rom
block: /dev/ubi0_1 is already mounted on /overlay
@cybrnook & other wrt1900ac series gurus, any experience with this?
Does anon_mount work in other wrt1900ac series devices?