From: Warren Block on 13 Dec 2009 18:50 Justin <justin(a)nobecauseihatespam.com> wrote: > On 12/13/09 4:06 PM, Warren Block wrote: >>> It worked! Thanks Warren. >>> justin$ dd if=/dev/disk2 bs=2k | head -c 769736704 | openssl md5 >>> 6b8df7fb34d5960ecf91a291926a1e6f >>> Justins-MacBook-Pro:~ justin$ openssl md5 8.0-RELEASE-ia64-dvd1.iso >>> MD5(8.0-RELEASE-ia64-dvd1.iso)= 6b8df7fb34d5960ecf91a291926a1e6f >> >> The head -c command should be unnecessary and might cause that line to >> lie to you. If the data read from disk doesn't match the ISO file, >> there's an error. Does dd if=/dev/disk2 bs=2k | md5 give a different >> result? > > Yes, because it is running the hash on the entire disk - including the > random junk outside the bounds of what I burned. Maybe something to do with OSX. On FreeBSD, you don't get anything back from a dd of a CD/DVD that wasn't put there, presumably because it hits EOF and exits. In fact, 'dd if=/dev/acd0 of=file.iso bs=2k' is how you make a file copy of a CD or DVD. > however I ran into something else > > justin$ dd if=/dev/disk2 bs=2k | head -c 7771521024 | md5 -r > head: *illegal byte count* -- 7771521024 > d41d8cd98f00b204e9800998ecf8427e Seems reasonable for head to return an error when the count is larger than the input file. -- Warren Block * Rapid City, South Dakota * USA
From: Justin on 13 Dec 2009 23:06 On 12/13/09 6:50 PM, Warren Block wrote: > Justin<justin(a)nobecauseihatespam.com> wrote: >> On 12/13/09 4:06 PM, Warren Block wrote: > >>>> It worked! Thanks Warren. >>>> justin$ dd if=/dev/disk2 bs=2k | head -c 769736704 | openssl md5 >>>> 6b8df7fb34d5960ecf91a291926a1e6f >>>> Justins-MacBook-Pro:~ justin$ openssl md5 8.0-RELEASE-ia64-dvd1.iso >>>> MD5(8.0-RELEASE-ia64-dvd1.iso)= 6b8df7fb34d5960ecf91a291926a1e6f >>> >>> The head -c command should be unnecessary and might cause that line to >>> lie to you. If the data read from disk doesn't match the ISO file, >>> there's an error. Does dd if=/dev/disk2 bs=2k | md5 give a different >>> result? >> >> Yes, because it is running the hash on the entire disk - including the >> random junk outside the bounds of what I burned. > > Maybe something to do with OSX. On FreeBSD, you don't get anything back > from a dd of a CD/DVD that wasn't put there, presumably because it hits > EOF and exits. In fact, 'dd if=/dev/acd0 of=file.iso bs=2k' is how you > make a file copy of a CD or DVD. > >> however I ran into something else >> >> justin$ dd if=/dev/disk2 bs=2k | head -c 7771521024 | md5 -r >> head: *illegal byte count* -- 7771521024 >> d41d8cd98f00b204e9800998ecf8427e > > Seems reasonable for head to return an error when the count is larger > than the input file. > Yes, I realized I C&Ped the wrong value from a different dvd I am trying to verify and make sure I have this method down. Now what am I doing wrong here? Running it on the original pressed dvd. justin$ dd if=/dev/disk2 | md5 -r 15178752+0 records in 15178752+0 records out 7771521024 bytes transferred in 2836.421946 secs (2739903 bytes/sec) 9c74731407152250dec71f7d996d96b8 Making the iso file. justin$ dd if=/dev/disk2 of=~/biggerdvd.iso 15178752+0 records in 15178752+0 records out 7771521024 bytes transferred in 2780.214384 secs (2795296 bytes/sec) justin$ dd if=biggerdvd.iso bs=2k | md5 -r 3794688+0 records in 3794688+0 records out 7771521024 bytes transferred in 160.517571 secs (48415391 bytes/sec) e26826cc68281aa581cc181483bd232d
From: Warren Block on 13 Dec 2009 23:27 Justin <justin(a)nobecauseihatespam.com> wrote: > Now what am I doing wrong here? > > Running it on the original pressed dvd. > > justin$ dd if=/dev/disk2 | md5 -r > 15178752+0 records in > 15178752+0 records out > 7771521024 bytes transferred in 2836.421946 secs (2739903 bytes/sec) > 9c74731407152250dec71f7d996d96b8 Needs bs=2k on the dd command. Without that, dd is reading 512-byte blocks, which gives 15178752*512 = 7771521024. Every time you're reading from an actual data CD or DVD, it needs that. > Making the iso file. > > justin$ dd if=/dev/disk2 of=~/biggerdvd.iso > 15178752+0 records in > 15178752+0 records out > 7771521024 bytes transferred in 2780.214384 secs (2795296 bytes/sec) Also needs bs=2k. > justin$ dd if=biggerdvd.iso bs=2k | md5 -r > 3794688+0 records in > 3794688+0 records out > 7771521024 bytes transferred in 160.517571 secs (48415391 bytes/sec) > e26826cc68281aa581cc181483bd232d A plain file is not a block device, so here's the spot you *don't* need the bs=2k setting. -- Warren Block * Rapid City, South Dakota * USA
From: Justin on 14 Dec 2009 13:14 On 12/13/09 11:27 PM, Warren Block wrote: > Justin<justin(a)nobecauseihatespam.com> wrote: >> Now what am I doing wrong here? >> >> Running it on the original pressed dvd. >> >> justin$ dd if=/dev/disk2 | md5 -r >> 15178752+0 records in >> 15178752+0 records out >> 7771521024 bytes transferred in 2836.421946 secs (2739903 bytes/sec) >> 9c74731407152250dec71f7d996d96b8 > > Needs bs=2k on the dd command. Without that, dd is reading 512-byte > blocks, which gives 15178752*512 = 7771521024. Every time you're > reading from an actual data CD or DVD, it needs that. > >> Making the iso file. >> >> justin$ dd if=/dev/disk2 of=~/biggerdvd.iso >> 15178752+0 records in >> 15178752+0 records out >> 7771521024 bytes transferred in 2780.214384 secs (2795296 bytes/sec) > > Also needs bs=2k. > >> justin$ dd if=biggerdvd.iso bs=2k | md5 -r >> 3794688+0 records in >> 3794688+0 records out >> 7771521024 bytes transferred in 160.517571 secs (48415391 bytes/sec) >> e26826cc68281aa581cc181483bd232d > > A plain file is not a block device, so here's the spot you *don't* need > the bs=2k setting. > It works! w00t! justin$ dd if=/dev/disk2 bs=2k | md5 -r 3794688+0 records in 3794688+0 records out 7771521024 bytes transferred in 2593.040306 secs (2997069 bytes/sec) e26826cc68281aa581cc181483bd232d justin$ dd if=/dev/disk2 of=biggerdvd.iso bs=2k 3794688+0 records in 3794688+0 records out 7771521024 bytes transferred in 2765.505716 secs (2810163 bytes/sec) justin$ md5 -r biggerdvd.iso e26826cc68281aa581cc181483bd232d biggerdvd.iso
First
|
Prev
|
Pages: 1 2 Prev: Why is PulseAudio used with Firefox35? Next: FBSD 8.10 And VirtualBox 3.1 |