usb memory stick failing

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

usb memory stick failing

patrick keshishian
Hi,

I recently attempted an installation from a usb memory stick, where
installation of xfont47.tgz failed consistently due to "crc error"[0].
The stick was prepared following steps from OBSD FAQ[1].

I recopied xfont47.tgz file to the stick, and confirmed (or so I
thought) that the source and new copy of this file were identical
using cmp(1).

Restarting the install bombed on the same file. So I stuck the stick
in my source computer and mounted it and ran md5(1) on it. Sure enough
the checksum is different from the source. I did a umount(8) and a
mount(8), then ran md5(1) again, and this time yet a new value was
reported. While mounted, running md5(1) again reports the same value
-- i assume this is because the file is cached at this point --
explaining why cmp(1) initially failed to raise a flag. Every
umount(8), mount(8) and md5(1) gives a new result:

$ md5 /mnt/umass/usr/build/rel/xfont47.tgz
MD5 (/mnt/umass/usr/build/rel/xfont47.tgz) = 75e6065782783455bfcf912ec8822ec3
$ sudo umount /mnt/umass/
$ sudo mount /dev/sd0a /mnt/umass/
$ md5 /mnt/umass/usr/build/rel/xfont47.tgz
MD5 (/mnt/umass/usr/build/rel/xfont47.tgz) = 3912b5506b63c105a945fe7535d6e70e
$ md5 /mnt/umass/usr/build/rel/xfont47.tgz
MD5 (/mnt/umass/usr/build/rel/xfont47.tgz) = 3912b5506b63c105a945fe7535d6e70e
$ sudo umount /mnt/umass/
$ sudo mount /dev/sd0a /mnt/umass/
$ md5 /mnt/umass/usr/build/rel/xfont47.tgz
MD5 (/mnt/umass/usr/build/rel/xfont47.tgz) = 315233c616a824057b2558d678aed2c4


This is a bit of an odd behavior to me. Does anyone have an
explanation for this?

Incidentally, should the install script not catch the error condition
and warn the user of the incomplete install at the next prompt?

--patrick

[0] http://sidster.com/gallery/misc/2010/crc-error.DSC00190.JPG
[1] http://www.openbsd.org/faq/faq14.html#flashmemLive

Reply | Threaded
Open this post in threaded view
|

Re: usb memory stick failing

Benny Lofgren
patrick keshishian wrote:
> I recently attempted an installation from a usb memory stick, where
> installation of xfont47.tgz failed consistently due to "crc error"[0].
> The stick was prepared following steps from OBSD FAQ[1].
>
> I recopied xfont47.tgz file to the stick, and confirmed (or so I
> thought) that the source and new copy of this file were identical
> using cmp(1).

Try renaming the failed file but leave it on the media, then make a
fresh copy to the stick. That way you ensure that the (known) bad spots
are left unused.

> Restarting the install bombed on the same file. So I stuck the stick
> in my source computer and mounted it and ran md5(1) on it. Sure enough
> the checksum is different from the source. I did a umount(8) and a
> mount(8), then ran md5(1) again, and this time yet a new value was
> reported. While mounted, running md5(1) again reports the same value
> -- i assume this is because the file is cached at this point --
> explaining why cmp(1) initially failed to raise a flag. Every
> umount(8), mount(8) and md5(1) gives a new result:

And, lesson learned here I hope, always unmount/mount a media to improve
the odds of catching an error when verifying against the original. It is
as you suspect very likely that all or some of your copy was cached the
second time you accessed it.

> $ md5 /mnt/umass/usr/build/rel/xfont47.tgz
> MD5 (/mnt/umass/usr/build/rel/xfont47.tgz) = 75e6065782783455bfcf912ec8822ec3
> $ sudo umount /mnt/umass/
> $ sudo mount /dev/sd0a /mnt/umass/
> $ md5 /mnt/umass/usr/build/rel/xfont47.tgz
> MD5 (/mnt/umass/usr/build/rel/xfont47.tgz) = 3912b5506b63c105a945fe7535d6e70e
> $ md5 /mnt/umass/usr/build/rel/xfont47.tgz
> MD5 (/mnt/umass/usr/build/rel/xfont47.tgz) = 3912b5506b63c105a945fe7535d6e70e
> $ sudo umount /mnt/umass/
> $ sudo mount /dev/sd0a /mnt/umass/
> $ md5 /mnt/umass/usr/build/rel/xfont47.tgz
> MD5 (/mnt/umass/usr/build/rel/xfont47.tgz) = 315233c616a824057b2558d678aed2c4
>
> This is a bit of an odd behavior to me. Does anyone have an
> explanation for this?

Yes, and you are clueing yourself in on it - the stick is failing. :-)

I'd recommend tossing the stick out the window and getting yourself a
new one. Now, if that one fails too in a similar way, then you have a
problem...

> Incidentally, should the install script not catch the error condition
> and warn the user of the incomplete install at the next prompt?

Provided the install script saves state, which I don't know if it does.
Someone else should probably comment on that. :-)


Regards,
/Benny

--
internetlabbet.se     / work:   +46 8 551 124 80      / "Words must
Benny Lvfgren        /  mobile: +46 70 718 11 90     /   be weighed,
                     /   fax:    +46 8 551 124 89    /    not counted."
                    /    email:  benny -at- internetlabbet.se

Reply | Threaded
Open this post in threaded view
|

Re: usb memory stick failing

STeve Andre'
In reply to this post by patrick keshishian
On Friday 09 July 2010 02:54:15 patrick keshishian wrote:

> Hi,
>
> I recently attempted an installation from a usb memory stick, where
> installation of xfont47.tgz failed consistently due to "crc error"[0].
> The stick was prepared following steps from OBSD FAQ[1].
>
> I recopied xfont47.tgz file to the stick, and confirmed (or so I
> thought) that the source and new copy of this file were identical
> using cmp(1).
>
[snip]

The stick is bad.  Don't be foolish and try to use it for anything
that you care about at all--it isn't worth it.  Get a new one.


--
STeve Andre'
Disease Control Warden
Dept. of Political Science
Michigan State University

A day without Windows is like a day without a nuclear incident.

Reply | Threaded
Open this post in threaded view
|

Re: usb memory stick failing

Renzo Fabriek
In reply to this post by patrick keshishian
On Friday 09 July 2010 08:54:15 patrick keshishian wrote:

> Hi,
>
> I recently attempted an installation from a usb memory stick, where
> installation of xfont47.tgz failed consistently due to "crc error"[0].
> The stick was prepared following steps from OBSD FAQ[1].
>
> I recopied xfont47.tgz file to the stick, and confirmed (or so I
> thought) that the source and new copy of this file were identical
> using cmp(1).
>
> Restarting the install bombed on the same file. So I stuck the stick
> in my source computer and mounted it and ran md5(1) on it. Sure enough
> the checksum is different from the source. I did a umount(8) and a
> mount(8), then ran md5(1) again, and this time yet a new value was
> reported. While mounted, running md5(1) again reports the same value
> -- i assume this is because the file is cached at this point --
> explaining why cmp(1) initially failed to raise a flag. Every
> umount(8), mount(8) and md5(1) gives a new result:
>

In adition to previous answers:
http://www.undeadly.org/cgi?action=article&sid=20100404103735

gr
Renzo

Reply | Threaded
Open this post in threaded view
|

Re: usb memory stick failing

J.C. Roberts-3
On Fri, 9 Jul 2010 17:29:18 +0200 Renzo <[hidden email]> wrote:

>
> On Friday 09 July 2010 08:54:15 patrick keshishian wrote:
> > Hi,
> >
> > I recently attempted an installation from a usb memory stick, where
> > installation of xfont47.tgz failed consistently due to "crc
> > error"[0]. The stick was prepared following steps from OBSD FAQ[1].
> >
> > I recopied xfont47.tgz file to the stick, and confirmed (or so I
> > thought) that the source and new copy of this file were identical
> > using cmp(1).
> >
> > Restarting the install bombed on the same file. So I stuck the stick
> > in my source computer and mounted it and ran md5(1) on it. Sure
> > enough the checksum is different from the source. I did a umount(8)
> > and a mount(8), then ran md5(1) again, and this time yet a new
> > value was reported. While mounted, running md5(1) again reports the
> > same value
> > -- i assume this is because the file is cached at this point --
> > explaining why cmp(1) initially failed to raise a flag. Every
> > umount(8), mount(8) and md5(1) gives a new result:
> >
>
> In adition to previous answers:
> http://www.undeadly.org/cgi?action=article&sid=20100404103735


The article didn't stress enough how important it is to fsck.

Hmmm... I should probably rephrase that, but it's true either way. ;)

        jcr

--
The OpenBSD Journal - http://www.undeadly.org

Reply | Threaded
Open this post in threaded view
|

Re: usb memory stick failing

patrick keshishian
On Sat, Jul 10, 2010 at 2:21 AM, J.C. Roberts <[hidden email]> wrote:

> On Fri, 9 Jul 2010 17:29:18 +0200 Renzo <[hidden email]> wrote:
>>
>> On Friday 09 July 2010 08:54:15 patrick keshishian wrote:
>> > Hi,
>> >
>> > I recently attempted an installation from a usb memory stick, where
>> > installation of xfont47.tgz failed consistently due to "crc
>> > error"[0]. The stick was prepared following steps from OBSD FAQ[1].
>> >
>> > I recopied xfont47.tgz file to the stick, and confirmed (or so I
>> > thought) that the source and new copy of this file were identical
>> > using cmp(1).
>> >
>> > Restarting the install bombed on the same file. So I stuck the stick
>> > in my source computer and mounted it and ran md5(1) on it. Sure
>> > enough the checksum is different from the source. I did a umount(8)
>> > and a mount(8), then ran md5(1) again, and this time yet a new
>> > value was reported. While mounted, running md5(1) again reports the
>> > same value
>> > -- i assume this is because the file is cached at this point --
>> > explaining why cmp(1) initially failed to raise a flag. Every
>> > umount(8), mount(8) and md5(1) gives a new result:
>> >
>>
>> In adition to previous answers:
>> http://www.undeadly.org/cgi?action=article&sid=20100404103735
>
>
> The article didn't stress enough how important it is to fsck.
>
> Hmmm... I should probably rephrase that, but it's true either way. ;)

that was a great article. thanks for the reference.

running fsck on that stick doesn't show any issues. I ran it twice.

--patrick

Reply | Threaded
Open this post in threaded view
|

Re: usb memory stick failing

Otto Moerbeek
On Sat, Jul 10, 2010 at 02:46:11AM -0700, patrick keshishian wrote:

> On Sat, Jul 10, 2010 at 2:21 AM, J.C. Roberts <[hidden email]> wrote:
> > On Fri, 9 Jul 2010 17:29:18 +0200 Renzo <[hidden email]> wrote:
> >>
> >> On Friday 09 July 2010 08:54:15 patrick keshishian wrote:
> >> > Hi,
> >> >
> >> > I recently attempted an installation from a usb memory stick, where
> >> > installation of xfont47.tgz failed consistently due to "crc
> >> > error"[0]. The stick was prepared following steps from OBSD FAQ[1].
> >> >
> >> > I recopied xfont47.tgz file to the stick, and confirmed (or so I
> >> > thought) that the source and new copy of this file were identical
> >> > using cmp(1).
> >> >
> >> > Restarting the install bombed on the same file. So I stuck the stick
> >> > in my source computer and mounted it and ran md5(1) on it. Sure
> >> > enough the checksum is different from the source. I did a umount(8)
> >> > and a mount(8), then ran md5(1) again, and this time yet a new
> >> > value was reported. While mounted, running md5(1) again reports the
> >> > same value
> >> > -- i assume this is because the file is cached at this point --
> >> > explaining why cmp(1) initially failed to raise a flag. Every
> >> > umount(8), mount(8) and md5(1) gives a new result:
> >> >
> >>
> >> In adition to previous answers:
> >> http://www.undeadly.org/cgi?action=article&sid=20100404103735
> >
> >
> > The article didn't stress enough how important it is to fsck.
> >
> > Hmmm... I should probably rephrase that, but it's true either way. ;)
>
> that was a great article. thanks for the reference.
>
> running fsck on that stick doesn't show any issues. I ran it twice.
>
> --patrick

Only a small portion of blocks are used for meta data and directories,
so fsck only checks consistency of a small part of a filesystem.

        -Otto