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 via email to