View Single Post
Old 12-01-2015, 07:56 PM   #172
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by donB006 View Post
- - - -
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?
- - - -
"Up to" - it should be making a system call to determine the optimum read size for ibs and the optimum write size for obs.
**should**
But on the Kindle's eMMC it is using a block size of 1 byte.
Right or wrong, that is what history shows that it uses.
Also, keep in mind this is the 'dd' provided by (a usually very old) Busybox.

dd if= of= bs=4096 works (the erase block size of both the 2Gbyte and 4Gbyte eMMC devices seen so far is 4096 bytes).

Since 512 is an integer divisor of 4096 (8), there will be nothing to pad (and the eMMC driver would fake it, even if it wasn't PS: it isn't, its something like 526 * 8 IIRC ).

= = = =

Just to add confusion to unusual behaviors observed:
Code:
core2quad ~ $ ssh kpw

Welcome to Kindle!

#################################################
#  N O T I C E  *  N O T I C E  *  N O T I C E  # 
#################################################
Rootfs is mounted read-only. Invoke mntroot rw to
switch back to a writable rootfs.
#################################################
[root@kindle root]# stat /dev/mmcblk0p1
  File: /dev/mmcblk0p1
  Size: 0         	Blocks: 0          IO Block: 4096   block special file
Device: ch/12d	Inode: 491         Links: 1     Device type: b3,1
Access: (0660/brw-rw----)  Uid: (    0/    root)   Gid: (    6/    disk)
Access: 1971-04-06 21:23:09.000000000
Modify: 1971-04-06 21:23:09.000000000
Change: 1971-04-06 21:23:09.000000000

[root@kindle root]# stat /mnt/base-us
  File: /mnt/base-us
  Size: 8192      	Blocks: 16         IO Block: 8192   directory
Device: 700h/1792d	Inode: 1           Links: 12
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2012-12-24 19:59:12.000000000
Modify: 2012-12-24 19:59:12.000000000
Change: 2012-12-24 19:59:12.000000000

[root@kindle root]# stat /mnt/us
  File: /mnt/us
  Size: 8192      	Blocks: 16         IO Block: 4096   directory
Device: fh/15d	Inode: 1           Links: 12
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2012-12-24 19:59:12.000000000
Modify: 2012-12-24 19:59:12.000000000
Change: 2012-12-24 19:59:12.000000000
All I can say is:
Duh
No wonder dd throws up its hands and transfers 1 byte at a time.

Last edited by knc1; 12-01-2015 at 08:15 PM.
knc1 is offline   Reply With Quote