Welcome! If this is your first visit, be sure to check out the FAQ. You will have to register before you can post in the forums. (Be aware the forums do not accept user names with a dash "-") Also, logging in lets you avoid the CAPTCHA verification when searching . Select Articles, Forum, or Blog. Posting in the Forums implies acceptance of the Terms and Conditions.

Hehe. I managed to create a nice 1.4 GB size file called sdb in /dev. Forgot I had removed an SD card (which was /dev/sdb) and assumed by USB stick was /dev/sdb.
My advice to go with Jim's question: before any operation from the command line, definitely as when being root, verify you're "talking" to the right device. Plug the device, look at output of

Re: Persistence and Live Opensuse 12.3 USB

> Sure, but still comparing the stock ISO to a raw image from SUSE Studio
> (which is what OP is using) isn't going to yield a useful result -
> they're almost certainly guaranteed to be different.

Yes, absolutely.

But I'm also saying that you can not use plain md5sum to verify the USB
stick, it doesn't work.

I did the comparison against the official image because that's the only
one I have, and worked out a non-optimal procedure for doing the
checking on a stick. Others can take my findings and devise a faster method.

For example, from an old script of mine to check DVDs:

Code:

cmp --bytes=$(wc -c <$1) /dev/dvd $1

the parameter 1 is the image file. The above can be applied to sticks,
too, but I have not tested it, as it takes time and that computer is
busy right now.

Re: Persistence and Live Opensuse 12.3 USB

On Tue, 09 Apr 2013 23:26:02 +0000, pomchip wrote:
> My USB stick sometimes shows up as sdc or sde, if I plugged it in before
> or after booting the machine I use to work on the USB stick image.
>
> I apologize for not editing the command. My brain does not always
> register the difference when I post, although I always make sure to
> identify the proper USB stick address when I execute dd.

Not a problem, just wanted to be sure that the check was on the proper
device more than anything.
> That being said, am I correct in my interpretation of the last series of
> posts: checking the md5sum of the USB stick after copying the image
> against the original md5sum as meaningless?

I'm verifying that myself right now. I'm not convinced that that's
necessarily the case, though I know there have been instances where an
MD5SUM of an ISO and the burned image don't match for the reasons Carlos
explained - but it's not always consistent. I'm building a simple Studio
appliance (12.3 + GNOME) to write to a flash drive here and will see if I
see the same checksum or a different one.

Re: Persistence and Live Opensuse 12.3 USB

On Tue, 09 Apr 2013 23:28:05 +0000, Carlos E. R. wrote:
> But I'm also saying that you can not use plain md5sum to verify the USB
> stick, it doesn't work.

I remember seeing this on occasion with ISOs burned to DVD media -
sometimes they would validate, sometimes not, depending on the burning
options. But I would assume (and I'm going to validate through
experience myself here in a minute) that a .raw image compared to the
partition written would match.

(Though thinking about it, the raw file would include the partition table
- so my assumption would appear to be bad unless the partition table were
included)

So perhaps the approach to take would be to use dd if=/dev/sdc (no
output) with bs and count parameters that added up to the size of the
original image and pipe that through md5sum, then compare that to the
original image's md5sum.

Re: Persistence and Live Opensuse 12.3 USB

On 2013-04-10 01:26, pomchip wrote:
> That being said, am I correct in my interpretation of the last series
> of posts: checking the md5sum of the USB stick after copying the image
> against the original md5sum as meaningless?

Re: Persistence and Live Opensuse 12.3 USB

On 2013-04-10 01:36, Jim Henderson wrote:
> On Tue, 09 Apr 2013 23:28:05 +0000, Carlos E. R. wrote:
>
>> But I'm also saying that you can not use plain md5sum to verify the USB
>> stick, it doesn't work.
>
> I remember seeing this on occasion with ISOs burned to DVD media -
> sometimes they would validate, sometimes not, depending on the burning
> options.

Yep.
> But I would assume (and I'm going to validate through
> experience myself here in a minute) that a .raw image compared to the
> partition written would match.
>
> (Though thinking about it, the raw file would include the partition table
> - so my assumption would appear to be bad unless the partition table were
> included)

Yes, the partition table should be included in the image.

> So perhaps the approach to take would be to use dd if=/dev/sdc (no
> output) with bs and count parameters that added up to the size of the
> original image and pipe that through md5sum, then compare that to the
> original image's md5sum.

Yes, that's my idea, but I don't know how to implement it.

First, I'm not sure how to pipe from dd.

Then for adjusting the size you can use "bs=1c count=whatever", but that
would be terribly slow, because dd would read in chunks of 1 byte.

> That would probably work since the byte count would be the same.
>
> (Thanks for making me think about this a bit more)

Welcome :-)

I thought that there would be a difference in size because of sector
size. What I did not realize is that the size of the usb image is that
of the entire device... till I extracted it. It is obvious once I think
about it, but took me by surprise.