[K12OSN] using dd to get 1474560 bytes

Michael Wescott wescott_mike at emc.com
Mon Jul 12 01:58:07 UTC 2004


gentgeen at linuxmail.org said:
> I made an image of a boot floppy using 'dd if=/dev/fd0 of=floppy.img'
> and did not see any errors.  when I do a 'ls -l' it shows floppy.img
> to be 1474560 bytes.  But when I do a 'du -b' it shows floppy.img to
> be 1478656 bytes.  Now the mbcd script uses the 'du -b' method to
> verify the size of the image, and requires it to be  1474560 or
> 2949120 bytes. 

> So what am I doing wrong?  I tried adding bs=1474560 and bs=2x80x18b
> to the 'dd' command, but no change.  I have also tried it with 3
> different boot floppies. 

Looks to me like the mbcd script is using the wrong tool. The results
of du -b will vary depending on the kind of filesystem on which the 
file resides. On a fat filesystem du reports a floppy image as 1474560
while on ext3 it's 1478656.

-- 
	Mike Wescott
	Wescott_Mike at EMC.COM






More information about the K12OSN mailing list