Quote:
Originally Posted by knc1
A horrible example.
You are erasing and re-programming every erase block 4096 times for each block written.
The 'conv' option to dd does text file conversions, these are binary files, so 'conv=' is a sure way to trash the image.
And since the ibs default size is one byte ...
Translation:
Remove the 'conv=sync' option -
Add the bs=4096 option
|
Thanks for the observation knc1. The proper use of dd is very important and my errors are inexcusable in this case as dd is very unforgiving. I really should know better.
In reality, I was just trying to flush the write buffer in case that was left unfinished before copying the rootfs.img across the USB. That is probably unneccesary for the kindle dx because that is not a hard disk. If I knew more about the emmc I would probably want to match the giant block erase size except I don't really know what that is. I have had no problem before using the defaults even though probably not the most efficient.
According to the dd man page:
Code:
ibs=BYTES
read up to BYTES bytes at a time (default: 512)
obs=BYTES
write BYTES bytes at a time (default: 512)
sync pad every input block with NULs to ibs-size; when used with block or unblock, pad with spaces rather than NULs
I didn't really study the man page before being so sloppy but doesn't the sync just fill the very last block out to 512 bytes if that is left unfilled?
What I really meant was this:
dd if=/dev/mmcblk0p1 of=/mnt/us/rootfs.img; sync
I have frequently used this without problems:
dd if=/dev/mmcblk0p1 of=/mnt/us/rootfs.img
I have no problem recommending this:
dd if=/dev/mmcblk0p1 of=/mnt/us/rootfs.img bs=4096
Hey, Kaan88, glad you have things working so far. Let us know how things turn out. And give knc1 a little space. We all know his way after so many posts and is still good for a smile most of the time. Of course, we probably aren't so frustrated with the kindle at the moment unlike too many here and might fail to understand sometimes. Have fun with the project.