# Can't upgrade to 10.2



## xwwu (Aug 14, 2015)

Dear Friends,

The problem is as following:


```
freebsd-update upgrade -r RELEASE-10.2
Looking up update.FreeBSD.org mirrors... none found.
Fetching metadata signature for 10.1-RELEASE from update.FreeBSD.org... done.
Fetching metadata index... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic src/src world/base world/doc world/games world/lib32

The following components of FreeBSD do not seem to be installed:

Does this look reasonable (y/n)? y

Fetching metadata signature for RELEASE-10.2 from update.FreeBSD.org... failed.
No mirrors remaining, giving up.
```


----------



## ShelLuser (Aug 14, 2015)

Does name resolving work at all on this machine? What happens if you try to resolve freebsd.org for example? Using either dig or drill: `$ dig freebsd.org`?


----------



## drhowarddrfine (Aug 14, 2015)

What ShelLuser is hinting at is that the mirror might be overloaded and there are no others to fetch from as everyone else is trying to update at the same time. Last night, when I was updating two machines, I noticed the download seemed to be slow so that could be the reason for the failure. I'm only guessing.


----------



## larryvc (Aug 14, 2015)

Try:  `freebsd-update -r 10.2-RELEASE upgrade`

Note the difference between RELEASE-10.2 in the OP and the 10.2-RELEASE as indicated here.


----------



## Andreas Tieben (Aug 14, 2015)

Try "1 or 2 Days Later" again...(Overload!)


----------



## Andreas Tieben (Aug 14, 2015)

=== Upgrading FreeBSD to the next Version ===

(as example from FreeBSD 10.1-RELEASE to FreeBSD 10.2-RELEASE)

The freebsd-update(8) utility supports binary upgrades of amd64 and i386
systems running earlier FreeBSD releases.  Systems running earlier
FreeBSD releases can upgrade as follows:

`# freebsd-update upgrade -r 10.2`

During this process, freebsd-update(8) may ask the user to help by
merging some configuration files or by confirming that the automatically
performed merging was done correctly.

`# freebsd-update install`

The system must be rebooted with the newly installed kernel before
continuing.

`# shutdown -r now`

After rebooting, freebsd-update(8) needs to be run again to install the new
userland components:

`# freebsd-update install`

It is recommended to rebuild and install all applications if possible,
especially if upgrading from an earlier FreeBSD release, for example,
FreeBSD 9.x.  Alternatively, the user can install misc/compat9x and
other compatibility libraries, afterwards the system must be rebooted
into the new userland:

`# shutdown -r now`

Finally, after rebooting, freebsd-update(8) needs to be run again to remove
stale files:

`# freebsd-update install`


----------



## xwwu (Aug 15, 2015)

Thanks you all!


```
freebsd-update -r 10.2 upgrade
```

works right now, but 40 thousands patch, slow enough!


----------



## xwwu (Aug 15, 2015)

Bad thing again:


```
Fetching 7864 files... 2ff982711d64e5c75c3c0ae53b6f7d7f651f72cd9a55614b34dff68234a731e4 has incorrect hash.
```

when fetch large amount of files.


----------



## xwwu (Aug 16, 2015)

Many times of upgrade and many hash errors. Many hours later, my FreeBSD 10.2 works.


----------



## gedge (Aug 22, 2015)

xwwu said:


> Bad thing again:
> 
> 
> ```
> ...


I'm getting this, too.


----------



## Wozzeck (Aug 26, 2015)

I had myself 4 FreeBSD 10.1 to upgrade. Unable to fetch the updates always a bad hash error interruption even with optical fiber connection. I have had to upgrade all manually. You need to install the following ports :

devel/subversion
sysutils/cpdup

I - BACKING UP AND RESYNCHRONIZING /USR/SRC
-----------------------------------------------------------------
It is more safe to recreate a brand new /usr/src directory to void some issues in building world. Sometimes some files in /usr/src are damaged in a way that subversion is unable to repair.


```
mv /usr/src /usr/src.old
mkdir /usr/src
svn co https://svn0.us-west.freebsd.org/base/release/10.2.0 /usr/src
svn update /usr/src
```

If you have a custom kernel config, copy it from from old /usr/src

```
cp /usr/src.old/sys/amd64/conf/YOUR_CUSTOM_KERNEL /usr/src/sys/amd64/conf/
```
Note : "amd64" may be replaced by your own architecture (eg. i386)

II - BUILDING WORLD
---------------------------

```
cd /usr/src
make buildworld
```

III - BUILDING AND INSTALLING KERNEL
--------------------------------------------------
Even if you use a custom kernel, it is recommended to always keep a backup of GENERIC kernel not too far. I back it up in /boot/GENERIC


```
make buildkernel KERNCONF=GENERIC
make installkernel KERNCONF=GENERIC
cpdup -i0 /boot/kernel /boot/GENERIC
```

skip the following code if you don't use custom kernel

```
make buildkernel KERNCONF=YOUR_CUSTOM_KERNEL
make installkernel KERNCONF=YOUR_CUSTOM_KERNEL
```

IV - Merging config files and installing world
-------------------------------------------------------

```
mergemaster -p
make installworld
mergemaster -iF
```

V - Cleaning
----------------

```
make delete-old
make delete-old-libs
make cleanworld
```


----------



## wblock@ (Aug 27, 2015)

Wozzeck said:


> Sometimes some files in /usr/src are damaged in a way that subversion is unable to repair.


If that happens, it might indicate hardware problems.  At least I have never seen it happen without such an explanation, and I update from source very often.


----------



## Wozzeck (Aug 28, 2015)

wblock@ said:


> If that happens, it might indicate hardware problems.  At least I have never seen it happen without such an explanation, and I update from source very often.


After a system crash there is always a risk of weird file alteration remaining even after a fsck(8) repair. I have at less one unstable experimental platform who has encountered multiple crashes.


----------



## kpa (Aug 28, 2015)

Wozzeck said:


> After a system crash there is always a risk of weird file alteration remaining even after a fsck(8) repair. I have at less one unstable experimental platform who has encountered multiple crashes.



Contrary what people expect, fsck(8) can never repair the actual files if there's any corruption in them. It can only repair the filesystem bookkeeping information if it's damaged.


----------

