Quantcast

Verifying MD5 of a thumb drive

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Verifying MD5 of a thumb drive

Freemyer
Guys,

I'm "burning" my first thumb drive and I saw the instructions at:

http://en.opensuse.org/openSUSE:SUSE_Studio_Disc_Image_Howtos#How_to_check_the_MD5SUM_of_the_raw_image_and_the_USB_stick

ie.
    md5sum /home/suse/myappliance.raw
    md5sum /dev/sdb

Those instructions are wrong.

The appliance is one size, /dev/sdb is another size.  They will not
and should not have the same MD5.

The trouble is it is not trivial to do it right.  Maybe something like
this totally untested script snippet:

===
bytes=`cat appliance.raw | wc -c`
sectors=expr $bytes / 512
dd if=/dev/sdb bs=512 count=$sectors | md5sum

md5sum appliance.raw
===

In addition to being untested, the above uses an extremely poor way to
get the size of appliance.raw.

Anyway, either that section of the wiki page needs to be deleted, or
it needs to be replaced with instructions that actually work.  Note
that you have those instructions in at least 2 places on that wiki
page, maybe more.

fyi: I also just edited the dd command for writing to the thumb.  It
now has a "conv=fdatasync" arg at the end.  That's important for
thumbs that don't have lights.

sudo dd if=/home/suse/myappliance.raw of=/dev/sdb bs=4k conv=fdatasync

Thanks
Greg
Loading...