OpenWrt Forum Archive

Topic: x86 upgrade compact flash

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

Hi,

I'm using an LX800 board that runs OpenWrt. I have my own webinterface. Via this web interface I upload a complete ext2 image.
I write this image to the compact flash card by using the dd command, just the same like I do it when I would put the compact flash card in the card reader of my host dev. system.

This is what my upgrade script does:

dd if=/tmp/bin/openwrt-x86-ext2.image of=/dev/hdb
reboot -nf

The image got written, but for some reason the rootfs is corrupt. Some init files show only ^@ characters.
However when I use dd from my host dev system via card reader, than the board boots normal and filesystem is OK.

Is there anything I should do before writing the image on my target system?

BTW: the image is copied over via web interface as a tgz file which is than decompressed in the /tmp folder.

Any hint is welcome
Thx

Hi,
it sounds weird to me that you're writing on the FS while you're running on it. May be you could boot from another FS before ?

Indeed.
I fixed it already.
I use now run_ramfs now before upgrading.

The discussion might have continued from here.