View Single Post
Old 08-15-2012, 12:24 PM   #79
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by ixtab View Post
...
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.
geekmaster is offline   Reply With Quote