Thomas, You said earlier that 512 is the default block size. But I looked up that "bs" also refers to block size. e.g. "dd bs=1M count=613" Analyzing: bs=1M; 1M = 1Mibibyte; 1Mibibyte = 1048576 bytes; 1048576 bytes / 512 bytes/block = 2048 blocks Thus 1M = 2048 blocks of 512 bytes/block 613 * 2048 = 1255424.
So it appears that we have two "block sizes". "dd" has its block size, "bs"; and then there is some foreign "other" block size. But after perusing the stats of my sdb drive: [code] $ fdisk -l ... Disk /dev/sdb: 16.4 GB, 16358768640 bytes 255 heads, 63 sectors/track, 1988 cylinders, total 31950720 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x6350107e Device Boot Start End Blocks Id System /dev/sdb1 * 0 1255423 627712 0 Empty /dev/sdb2 8196 8803 304 ef EFI (FAT-12/16/32) [/code] it seems that the 512 bytes/block isn''t some foreign "other" block size (not changeable), but is the "I/O" or "sector" size. This seems to inherently be 512 bytes/sector. More specifically from the above stats: [code] 255 heads, 63 sectors/track, 1988 cylinders, total 31950720 sectors Units = sectors of 1 * 512 = 512 bytes [/code] we can calculate 255 * 63 * 1988 = 31937220, which is really close to the above "31950720", and then 31937220 * 512 = 16351856640, where "16351856640" is really close to the above 16358768640. Is my hypothesis that the "512 block size" is the "I/O" or "sector" size correct? Sincerely, Andrew F Comly -------- Original Message -------- Subject: Re: [off list] iso verification: results - successful but still bewildered Local Time: August 15, 2016 11:57 AM UTC Time: August 15, 2016 11:57 AM From: scdbac...@gmx.net To: andrew.co...@protonmail.com Hi, > May I organize this info and post Be invited. But take care not to produce misleading rumors in this swamp of fuzzy image ends and various block sizes. The decisive point with checksumming from CD, DVD, or USB stick is to process exactly the original size as it was when Debian computed its checksum lists. This size can be learned from the size of the ISO image file, if you have it in reach: $ ls -l debian-8.5.0-i386-lxde-CD-1.iso -rw-r--r-- 1 thomas thomas 642777088 Jun 4 16:11 debian-8.5.0-i386-lxde-CD-1.iso Your number came from dd's count when copying the ISO onto USB stick. That's equivalent to the "ls -l" way of learning the size. Or you take it from the inner info of the ISO 9660 filesystem if you only have some media where it is stored beginning at block 0: $ /sbin/isosize /dev/sdb 642777088 $ /sbin/isosize /dev/sr0 642777088 These counts are in bytes and would make an awfully slow read run if used as block count with program "dd": $ dd if=/dev/sdb bs=1 count=642777088 | sha512sum We can safely divide it by 2048 and use bs=2048, because 2048 is the block size which the entrails of the ISO use for addressing data and counting the filesystem size. $ expr 642777088 / 2048 313856 $ dd if=/dev/sdb bs=2048 count=313856 | sha512sum Larger blocksizes are suitable only if they yield no remainder when they divide the byte size. (Caution, "expr" does not show division remainders or fractions.) -------------------------------------------------------------------- If you want, we can explore why the script check_debian_iso did not work for you and enhance it for the next user with the same issue. I'd then ask Steve McIntyre to find it some place on the Debian servers and to change the wiki link. Have a nice day :) Thomas