Quote:
Originally Posted by scottzhao
- - - - -
Is there anyway to force a re-format) of /var/local (and of the user storage partition) via serial port?
Thanks.
|
Yes.
But since mmcblk0p3 (/var/local) is mounted in both "diags mode" and "main mode" you have to catch the boot sequence while the Kernel is still running in its ram-resident, initramfs.
There is a u-boot prompt - -
Then a bit later, another ("hit any key") prompt -
That is the one from the initramfs start-up that you want.
I do not recall what all tools (commands) you have available at that point.
None of the eMMC partitions should be mounted at that point.
The thing you want to do, is make /dev/mmcblk0p3 and /dev/mmcblk0p4 appear to be unformatted.
The usual thing is to write 4, 4096 byte blocks to the start of the partition you want to force a format of.
If the 'dd' command is available in initramfs -
dd if=/dev/zero of=/dev/mmcblk0p3 bs=4096 count=4
(*p3 is /var/local, *p4 is /mnt/usr (user storage) )
web search engines can find you the manual page on dd (and any other *nix command), as in:
http://linux.die.net/man/1/dd