Quote:
Originally Posted by ixtab
...
Edit: it might even be possible to do it entirely from main, in an update script along the lines of
Code:
zcat kernel.img.gz | dd of=/dev/mmcblk0 seek=xxx bs=4K
zcat main.img.gz | dd of=/dev/mmcblk0p1 bs=4K
The rationale why the second line *might* work is that / is mounted ro anyway, so in principle nothing should attempt to write to the partition. And zcat and dd would already be loaded in memory at the time of execution. I may be terribly wrong though, so don't even attempt this unless you are sure that you can debrick the device 
|
Except that various scripts have "mntroot rw" and "mntroot ro" embedded in them and they DO write to root. I had gotten bad backup images when copying FROM the root that I had booted, so I play it safe and only backup (or restore) the root that is not running. That is WHY we write mmcblk0p1 from diags_ssh, to prevent such (intermittent) problems. Of course, it could be dependent on firmware version and what scripts run at what times.