# Botched upgrade from 9.0 to 9.1 - how to fix?



## TS (Jan 11, 2013)

Hi, I managed to mess up a binary upgrade from *9.0-RELEASE* to *9.1-RELEASE*. 

I updated the kernel with 
`# freebsd-update upgrade -r 9.1-RELEASE`
and it worked worked out alright:


```
> uname -a

FreeBSD 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012
```

I am not sure what I did wrong next. Maybe I rebooted before the next required 
`#  freebsd-update install`, or maybe I mistakenly run a `#  freebsd-update fetch` in between.

The effect is now that the kernel is running 9.1, but everything else in userland has not been updated.

The system is running, but when I try to do a `#  freebsd-update install`
I get the following response:


```
Fetching metadata signature for 9.1-RELEASE from update5.FreeBSD.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 9.1-RELEASE-p0.
>
```

and if I try `# freebsd-update -r 9.1-RELEASE upgrade`

I get:

```
freebsd-update: Cannot upgrade from 9.1-RELEASE to itself
```

I already tried `# freebsd-update rollback` but this does not get me anywhere.

Any ideas how to fix this?

PS: I also searched for a server log from the system update, but failed to find anything. There surely must be some transcript on what has been changed during the update, or not?


----------



## trh411 (Jan 12, 2013)

After you upgrade FreeBSD, you need to update all the third party software. Refer to  The FreeBSD Handbook, Section 25.2.3. Look for the last paragraph in the section that begins: 





> All third party software will now need to be rebuilt and re-installed.


----------



## kpa (Jan 12, 2013)

Userland usually refers to the "world" part of the FreeBSD OS and applications installed from ports and packages. The former  was updated by freebsd-update(8) if everything went ok. The latter part that is installed ports/packages you don't have update necessarily unless they are out of date compared to the newest ports(7) tree.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports.html


----------



## Sfynx (Jan 12, 2013)

First make sure the base userland is really not upgraded by doing a `# freebsd-update IDS` and see if that gives wrong checksums. If that one checks out you probably confused the base userland with the ports userland which do not need to be upgraded when doing a minor release upgrade.

If only the kernel was really upgraded, I would try to put back the old kernel that should have been saved in /boot/kernel.old and reboot, then empty the /var/db/freebsd-update directory to start with fresh metadata, and then trying the upgrade again. 



			
				trh411 said:
			
		

> After you upgrade FreeBSD, you need to update all the third party software. Refer to  The FreeBSD Handbook, Section 25.2.3. Look for the last paragraph in the section that begins:



That's only needed when upgrading to a next major FreeBSD release, e.g. from 9 to 10. freebsd-update(8) will actually notify you when this is needed after completion of the second `# freebsd-update install` session.


----------



## TS (Jan 12, 2013)

Sfynx said:
			
		

> First make sure the base userland is really not upgraded by doing a `# freebsd-update IDS` and see if that gives wrong checksums. If that one checks out you probably confused the base userland with the ports userland which do not need to be upgraded when doing a minor release upgrade.
> 
> If only the kernel was really upgraded, I would try to put back the old kernel that should have been saved in /boot/kernel.old and reboot, then empty the /var/db/freebsd-update directory to start with fresh metadata, and then trying the upgrade again.



OK, I will try this approach.

`# freebsd-update IDS` gave me checksum errors for basically every file on the machine.

I first got the idea that userland had not been updated when I checked the version number for Bind via:
[CMD=">"]named -V[/CMD] which should have been updated to  *9.8.3-P4*, but still showed:

```
BIND 9.8.1-P1 built with '--prefix=/usr' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--enable-threads' '--enable-getifaddrs' '--disable-linux-caps' '--with-openssl=/usr' '--with-randomdev=/dev/random' '--without-idn' '--without-libxml2'
using OpenSSL version: OpenSSL 0.9.8q 2 Dec 2010
```


----------

