OpenWrt Forum Archive

Topic: (pre)init boot failures with 7.09 in wl-500gP

The content of this topic has been archived on 22 Feb 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

I have been successfully running kamikaze 7.09 for a while but now it won't boot up reliably. I can get to failsafe with 100% success rate but normal boot fails about 9 out 10 times.

Narrowing down the problem it seems that /sbin/init exec'd from /etc/preinit either newer gets to run or something bad happens to it very soon. My sysinit action in inittab is to give power led light show before continuing with normal rcS thing. When boot fails led stays (after initial blinks) off and the box is just dead. If it happens to boot up I get to see my light show first.

If I enter failsafe, telnet to the box and manually continue boot sequence everything always seem to work. What I do is to kill ash running on serial console (and with ps I can see preinit now waiting lock on /tmp/.failsafe), remove .failsafe lock and watch jffs getting mounted and things starting up properly. When things settle down, there is however one extra init process hanging around (pid != 1), it does nothing and you can just kill it.

Stuff between entering failsafe (always successful) and starting /sbin/init (failing way too often) is just mount_root. Even if it fails box should boot up with squashfs stuff and eventually at least the led should go on.

Any ideas what is going on here? Howto debug more?


thanks,

tatu

rebuild your image and put some debuggin in /etc/preinit, something like


< mount some file system on /mnt> because preinit works before you load jffs
exec > /mnt/stdout.txt 2>/tmp/stderr.txt
set -x

<the rest of preinit>


then look at the log files

thanks, I figured that I need to rebuild my image anyway so I went straight to the latest svn trunk (rev 9575). So far it looks like everything works just fine. It could have been those pesky random segfaults fixed in svn.

Yeah could have been, I have a trunk (9455) working and haven't seen any problems, remember to not use any swap

The discussion might have continued from here.