[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Issue writing image to disk via dd



Hi,

On Tue, Apr 19, 2011 at 07:46:06PM -0500, Mark Kane wrote:
> On Wed, Apr 13, 2011, at 07:13:13 -0500, Mark Kane wrote:
> I suppose I should have tested this before for thoroughness, but in
> Debian Lenny it works! So to summarize:
> 
> # dd if=image.img of=/dev/sda bs=1M

You know 1M stands for 1*1000*1000*1000 not 1*1024*1024*1024.

What was the size of image.img in exact bytes? What happened if you
specified exact image size via "count"?  What happened if bs=1024?

> Debian Etch (coreutils 5.97-5.3): Fail
> Debian Lenny (coreutils 6.10-6): Success
> Debian Squeeze (coreutils 8.5-1): Fail
> 
> CentOS 4.7 (coretuils 5.2.1): Success
> Arch Linux 2010.05 (coreutils 8.5-2): Success

Please try the following to see what happens.

 # dd if=image.img of=/dev/sda bs=1MB
or
 # dd if=image.img of=/dev/sda bs=$((1024*1024*1024))

> Another question would be what the difference is between coreutils
> 8.5-1 (Squeeze where it fails) and 8.5-2 (Arch where it works). Is
> there a component other than coreutils/dd which might affect this? It
> seems like such a minor version difference between coreutils 8.5-1 and
> 8.5-2 shouldn't cause a huge difference in behavior.

Anyway, these suffix of DD is tricky.  I do not know how stable was
them.  If this is not the reason, it may be kernel behaviour issue of
error handling when you go over the limit of the file system.

Osamu


Reply to: