From: Justin on
How can I run the md5 command on a DVD?
I tried $ md5 if=/dev/disk2
md5: if=/dev/disk2: No such file or directory

Basically I downloaded the FreeBSD ISOs and I must now verify the DVDs
I burned are error free.

I can run it on the iso file no problem.
the -r flag produces standard md5 output.
Justin$ md5 -r blahblah.iso
9bd9bb86fbaacda6862a89f24be80d85 blahblah.iso

as opposed to

Justin$ md5 blahblah.iso
MD5 (blahblah.iso) = 9bd9bb86fbaacda6862a89f24be80d85

So yeah, how can I get an md5 value from an actual DVD?

From: David Empson on
Justin <justin(a)nobecauseihatespam.com> wrote:

> How can I run the md5 command on a DVD?
> I tried $ md5 if=/dev/disk2
> md5: if=/dev/disk2: No such file or directory

You seem to be mixing up the syntax of two commands. "if=" is one of the
options for the 'dd' tool.

> Basically I downloaded the FreeBSD ISOs and I must now verify the DVDs
> I burned are error free.
>
> I can run it on the iso file no problem.
> the -r flag produces standard md5 output.
> Justin$ md5 -r blahblah.iso
> 9bd9bb86fbaacda6862a89f24be80d85 blahblah.iso
>
> as opposed to
>
> Justin$ md5 blahblah.iso
> MD5 (blahblah.iso) = 9bd9bb86fbaacda6862a89f24be80d85
>
> So yeah, how can I get an md5 value from an actual DVD?

You should be able to get an md5 as follows:

md5 -r /dev/disk2

but you might need to specify a particular session/partition on the DVD,
such as

md5 -r /dev/disk2s1

and you might need to unmount it first (without ejecting) to avoid
conflicts with the system.

--
David Empson
dempson(a)actrix.gen.nz
From: Justin on
On 12/11/09 4:14 AM, David Empson wrote:
> Justin<justin(a)nobecauseihatespam.com> wrote:
>
>> How can I run the md5 command on a DVD?
>> I tried $ md5 if=/dev/disk2
>> md5: if=/dev/disk2: No such file or directory
>
> You seem to be mixing up the syntax of two commands. "if=" is one of the
> options for the 'dd' tool.
>
>> Basically I downloaded the FreeBSD ISOs and I must now verify the DVDs
>> I burned are error free.
>>
>> I can run it on the iso file no problem.
>> the -r flag produces standard md5 output.
>> Justin$ md5 -r blahblah.iso
>> 9bd9bb86fbaacda6862a89f24be80d85 blahblah.iso
>>
>> as opposed to
>>
>> Justin$ md5 blahblah.iso
>> MD5 (blahblah.iso) = 9bd9bb86fbaacda6862a89f24be80d85
>>
>> So yeah, how can I get an md5 value from an actual DVD?
>
> You should be able to get an md5 as follows:
>
> md5 -r /dev/disk2
>
> but you might need to specify a particular session/partition on the DVD,
> such as
>
> md5 -r /dev/disk2s1
>
> and you might need to unmount it first (without ejecting) to avoid
> conflicts with the system.
>

what if the dvd has two sessions?
From: Justin on
On 12/11/09 4:14 AM, David Empson wrote:
> Justin<justin(a)nobecauseihatespam.com> wrote:
>
>> How can I run the md5 command on a DVD?
>> I tried $ md5 if=/dev/disk2
>> md5: if=/dev/disk2: No such file or directory
>
> You seem to be mixing up the syntax of two commands. "if=" is one of the
> options for the 'dd' tool.
>
>> Basically I downloaded the FreeBSD ISOs and I must now verify the DVDs
>> I burned are error free.
>>
>> I can run it on the iso file no problem.
>> the -r flag produces standard md5 output.
>> Justin$ md5 -r blahblah.iso
>> 9bd9bb86fbaacda6862a89f24be80d85 blahblah.iso
>>
>> as opposed to
>>
>> Justin$ md5 blahblah.iso
>> MD5 (blahblah.iso) = 9bd9bb86fbaacda6862a89f24be80d85
>>
>> So yeah, how can I get an md5 value from an actual DVD?
>
> You should be able to get an md5 as follows:
>
> md5 -r /dev/disk2
>
> but you might need to specify a particular session/partition on the DVD,
> such as
>
> md5 -r /dev/disk2s1
>
> and you might need to unmount it first (without ejecting) to avoid
> conflicts with the system.
>

I'm not sure what its running the md5 on but this is what I get.

Justin$ dd if=/dev/disk2 of=test.iso
1380720+1 records in
1380720+1 records out
706928880 bytes transferred in 468.416814 secs (1509188 bytes/sec)


Justin$ md5 -r test.iso
82487f9cea928fa339bd7c3f6e492981 test.iso
Justins-Macbook-Pro:~ Justin$ md5 -r /dev/disk2
d41d8cd98f00b204e9800998ecf8427e /dev/disk2
From: David Empson on
Justin <justin(a)nobecauseihatespam.com> wrote:

> On 12/11/09 4:14 AM, David Empson wrote:
> > Justin<justin(a)nobecauseihatespam.com> wrote:
> >
> >> How can I run the md5 command on a DVD?
> >> I tried $ md5 if=/dev/disk2
> >> md5: if=/dev/disk2: No such file or directory
> >
> > You seem to be mixing up the syntax of two commands. "if=" is one of the
> > options for the 'dd' tool.
> >
> >> Basically I downloaded the FreeBSD ISOs and I must now verify the DVDs
> >> I burned are error free.
> >>
> >> I can run it on the iso file no problem.
> >> the -r flag produces standard md5 output.
> >> Justin$ md5 -r blahblah.iso
> >> 9bd9bb86fbaacda6862a89f24be80d85 blahblah.iso
> >>
> >> as opposed to
> >>
> >> Justin$ md5 blahblah.iso
> >> MD5 (blahblah.iso) = 9bd9bb86fbaacda6862a89f24be80d85
> >>
> >> So yeah, how can I get an md5 value from an actual DVD?
> >
> > You should be able to get an md5 as follows:
> >
> > md5 -r /dev/disk2
> >
> > but you might need to specify a particular session/partition on the DVD,
> > such as
> >
> > md5 -r /dev/disk2s1
> >
> > and you might need to unmount it first (without ejecting) to avoid
> > conflicts with the system.
> >
>
> what if the dvd has two sessions?

DVDs generally don't support sessions, but if you use 'diskutil list'
you can see all the mounted volumes. It numbers the partitions or
sessions. Number 0 is the base device (such as 'disk2') or possibly the
partition table on a hard drive. Numbers 1 and higher use 's' followed
by the number appended to the disk name, e.g.

/dev/disk0 is the entire startup hard drive
/dev/disk0s1 is the first partition on the hard drive
/dev/disk0s2 is the second partition on the hard drive
etc.

/dev/disk1 is the entire second mounted device
/dev/disk1s1 is the first partition on that device
/dev/disk1s2 is the second partition on that device

etc.

If the device has no partition table it may not have any '/dev/diskXsY'
devices, e.g. a mounted disk image I have online at the moment is just
/dev/disk1 and 'diskutil list' shows the volume as #0 within that
device.

--
David Empson
dempson(a)actrix.gen.nz