1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to resume freebsd-update upgrade

Discussion in 'Installing and Upgrading FreeBSD' started by AZ4ZeL, May 25, 2010.

  1. AZ4ZeL

    AZ4ZeL New Member

    Thanks Received:

    I tried to upgrade from 7.2. to 7.3 using freebsd-update on the remote host over ssh.
    Unfortunately I didn't use "screen"-like tool and when I was merging configuration files SSH-connection was closed because of network problems.

    After I reconnected I noticed that there is no more running freebsd-update script and when I tried to run It again, I got:

    # freebsd-update upgrade -r 7.3-RELEASE
    Looking up update.FreeBSD.org mirrors... 3 mirrors found.
    Fetching metadata signature for 7.2-RELEASE from update5.freebsd.org... done.
    Fetching metadata index... done.
    Inspecting system... done.
    The following components of FreeBSD seem to be installed:
    kernel/generic src/base src/bin src/cddl src/contrib src/crypto src/etc
    src/games src/gnu src/include src/krb5 src/lib src/libexec src/release
    src/rescue src/sbin src/secure src/share src/sys src/tools src/ubin
    src/usbin world/base world/dict world/games world/info world/manpages
    The following components of FreeBSD do not seem to be installed:
    world/catpages world/doc
    Does this look reasonable (y/n)? y
    Fetching metadata signature for 7.3-RELEASE from update5.freebsd.org... done.
    Fetching metadata index... done.
    Fetching 1 metadata patches. done.
    Applying metadata patches... done.
    Fetching 1 metadata files... gunzip: data stream error
    metadata is corrupt.

    I tried to erase data in /var/db/freebsd-update but it didn't help.

    Any ideas?

    Best regards,
  2. mgribov

    mgribov New Member

    Thanks Received:
    I had the same problem.

    I looked at the relevant part of the freebsd-update shells script (search exactly for "metadata is corrupt") and that part of the code downloads some .gz files, whose names are their sha256 hashes - so for example 60a4e27e4126f4e53cef56ac88437040773513fc30aae3f5c4a48538edeba44f.gz

    After downloading and before unzipping, it runs sha256 to see if the hash of the file matches its name, and if it doesnt, that error is thrown.

    In my case, I believe it was because during the upgrade I had some packet loss and high latency, so the files downloaded were themselves corrupt.
    I tried rerunning freebsd-update 3 times, and third time it worked, so I think its really matter of retrying utnil you get it.

    You can also put some sort of an echo statement within that part of the code in freebsd-update and try to download and verify the files yourself.

    Hope it helps!