# snapshot is corrupt on first snap fetch use



## red (Jan 3, 2011)

Hi, I've never used portsnap, read on the net that pkg_cutleaves or something like this, can remove packages dependences, so tryed to use the portsnap command to install it but when I typed
[CMD="portsnap fetch"]
[/CMD]found 5 mirror sites, the download complete but during integrity check it says snapshot is corrupt.

I've just configure network interface and tryed to ping a site on internet, it seems to works.
Have some ideas about the cause or the error message.

Every suggestion is well accepted, cause I am newbie of FreeBSD.


----------



## DutchDaemon (Jan 3, 2011)

Try:

[cmd=]rm /var/db/portsnap/tag && portsnap fetch extract[/cmd]


----------



## red (Jan 4, 2011)

tried but got the same error, moreover I don't have tag file in that directory but only the tag.new file. Is there any settings to do, even with sysinstall or other commands, I'm newbie so can easily have missing something.


----------



## DutchDaemon (Jan 4, 2011)

So [cmd=]portsnap fetch[/cmd] did fetch the ports tarball of 60MB, but the integrity checking failed again? That seems to point to some local problem (disk/RAM). This should never happen.


----------



## red (Jan 5, 2011)

you mean an hardware fault ? in this case, I would think that culprin could be RAM , but I run a 8 hours MemTest86+ check , and all gone ok, the same running a test with the seatool hard disk tool. Anyway, thanks for the help given, maybe the problem physical and not about settings, even both test had a positive result.


----------



## DutchDaemon (Jan 5, 2011)

The last thing you could try is to not only clear out the tag file (as noted above), but also emptying out /var/db/portsnap/files/ before you try again.

So:

`rm /var/db/portsnap/tag && rm -rf /var/db/portsnap/files && mkdir /var/db/portsnap/files && portsnap fetch extract`


----------



## chmiels (Jan 5, 2011)

red's RAM is probably working correctly as I have observed the same behavior on my laptop. I'm using freebsd-stable.


----------



## DutchDaemon (Jan 5, 2011)

Removing the entire contents of the failing snapshot (i.e. the /files/ contents) should at least rule out any issues with old or partially expanded files.


----------



## red (Jan 8, 2011)

didn't work. Patience, temporarily I' ll update throught other ways. thanks anyways


----------

