Solved [Solved] Troubles upgrading from 9.2 to 10

Hi all, I'm trying to update my FreeBSD 9.2 server to 10.0-STABLE, but during the update freebsd-update fails to extract the new kernel because the space in /boot was finished. How can I force to download the new kernel again? Actually, I have kernel.old and kernel, in kernel there are the following files: http://pastebin.com/vnk13jBN

I'm sure that I am missing some files. I still do not reboot the server.
 
Re: Troubles upgrading from 9.2 to 10

I just compiled a generic kernel from /usr/src using:

Code:
# cd /usr/src
# env DESTDIR=/boot/GENERIC make kernel __MAKE_CONF=/dev/null SRCCONF=/dev/null

And comparing the files, I miss the following files in /boot/kernel:

Code:
radeonkms.ko.symbols
urtwn-rtl8192cfwT.ko
urtwn-rtl8192cfwT.ko.symbols
urtwn-rtl8192cfwU.ko
urtwn-rtl8192cfwU.ko.symbols
vmm.ko
vmm.ko.symbols
 
Re: Troubles upgrading from 9.2 to 10

Under most circumstances, you can recover from a failed or interrupted binary upgrade by using freebsd-update rollback. It's not clear to me how you populated /usr/src and whether or not it is a complete working copy, so I can't comment on your missing kernel modules. Care to share that with us?
 
Re: Troubles upgrading from 9.2 to 10

You can free up some space if you remove the kernel's symbol files. These tend to take up a lot of room. If you don't do any kernel debugging you're not going to need them. This will remove them and free some space: find /boot -name '*.symbols' -delete

Also note that you can use freebsd-update to update to a RELEASE version only. If you want 10.0-STABLE you're going to have to build world from source.
 
Re: Troubles upgrading from 9.2 to 10

trh411 said:
Under most circumstances, you can recover from a failed or interrupted binary upgrade by using freebsd-update rollback. It's not clear to me how you populated /usr/src and whether or not it is a complete working copy, so I can't comment on your missing kernel modules. Care to share that with us?

I don't remember when I downloaded the source but after freebsd-update -r 10.0-RELEASE upgrade it looks like /usr/src has been updated:
Code:
# more README 
This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD: release/10.0.0/README 215293 2010-11-14 11:32:56Z joel $

Maybe I used svn to download it when I was with FreeBSD 9.1.

Now I'm trying to do a rollback.

SirDice said:
You can free up some space if you remove the kernel's symbol files. These tend to take up a lot of room. If you don't do any kernel debugging you're not going to need them. This will remove them and free some space: find /boot -name '*.symbols' -delete

Also note that you can use freebsd-update to update to a RELEASE version only. If you want 10.0-STABLE you're going to have to build world from source.
Isn't freebsd-update -r 10.0-RELEASE upgrade enough to upgrade it?
 
Re: Troubles upgrading from 9.2 to 10

I missed the fact that you are trying to update your system to FreeBSD-10.0-STABLE the first time around. As @SirDice stated, you can only do this by building from sources. freebsd-update cannot be used to upgrade to a -STABLE version of FreeBSD.

If you want to upgrade your system to FreeBSD-10.0-STABLE, you should delete everything in /usr/src and then pull down a new working copy of the source from the stable/10 branch using a command like: svn checkout [url=https://svn0.us-east.FreeBSD.org/base/stable/10]https://svn0.us-east.FreeBSD.org/base/stable/10[/url] /usr/src. You can also use svnlite for this if you do not have the full-blown devel/subversion installed.

Once you have the sources, you can rebuild your system per the instructions in the FreeBSD Handbook.
 
Last edited by a moderator:
Re: Troubles upgrading from 9.2 to 10

Then the upgrade to 10.0-RELEASE isn't 10.0-STABLE?
 
Re: Troubles upgrading from 9.2 to 10

RedFoxy said:
than the upgrade to 10.0-RELEASE isn't 10.0-STABLE?

No, 10-STABLE (or 10.0-STABLE) is the development branch (think of it as work in progress) for the next release in the 10.X line of FreeBSD which will be 10.1.
 
Re: Troubles upgrading from 9.2 to 10

RedFoxy said:
than the upgrade to 10.0-RELEASE isn't 10.0-STABLE?
No, FreeBSD-10.0-RELEASE and FreeBSD-10.0-STABLE are two different versions. FreeBSD-10.0-RELEASE is considered a release branch, while FreeBSD-STABLE is considered a development branch. You might want to take a look at: Tracking a Development Branch.

EDIT: I see @kpa beat me to it.
 
Last edited by a moderator:
Re: Troubles upgrading from 9.2 to 10

Ok, I'm tring to build form source but I have a problem. I followed http://www.freebsd.org/doc/handbook/makeworld.html and after I removed /usr/obj I deleted /usr/src I downloaded the latest -STABLE with svn checkout [url=https://svn0.eu.FreeBSD.org/base/stable/10]https://svn0.eu.FreeBSD.org/base/stable/10[/url] /usr/src, but when I do make buildworld it fails with errors:
Code:
/usr/src/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp:1100:10: fatal error: 'emmintrin.h' file not found
#include <emmintrin.h>
         ^
1 error generated.
mkdep: compile failed
*** Error code 1

Stop.
make[4]: stopped in /usr/src/lib/clang/libclangbasic
*** Error code 1

Stop.
make[3]: stopped in /usr/src/lib/clang
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src

This is my /etc/make.conf:
Code:
WITH_PKGNG=yes
DEFAULT_VERSIONS=ruby=1.9
PERL_VERSION=5.14.4

Code:
# find /usr/src -name 'emmintrin.h'
/usr/src/contrib/gcc/config/i386/emmintrin.h
/usr/src/contrib/llvm/tools/clang/lib/Headers/emmintrin.h

I'm looking for a solution but I don't find anything useful.
 
Re: Troubles upgrading from 9.2 to 10

Please provide the output of: svn info /usr/src. You do not have to be in the /usr/src directory to run this command. Also, you ran make buildworld from /usr/src, right? This might seem like an obvious question, but I just want to make sure we aren't overlooking something obvious here, so please bear with me.
 
Re: Troubles upgrading from 9.2 to 10

trh411 said:
Please provide the output of: svn info /usr/src. You do not have to be in the /usr/src directory to run this command. Also, you ran make buildworld from /usr/src, right? This might seem like an obvious question, but I just want to make sure we aren't overlooking something obvious here, so please bear with me.

Yes I ran it from /usr/src :) I use freebsd FreeBSD a lot of the time, just sometimes I lose the way :p

Code:
# svn info /usr/src
Path: /usr/src
Working Copy Root Path: /usr/src
URL: https://svn0.eu.freebsd.org/base/stable/10
Relative URL: ^/stable/10
Repository Root: https://svn0.eu.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 261672
Node Kind: directory
Schedule: normal
Last Changed Author: dim
Last Changed Rev: 261644
Last Changed Date: 2014-02-09 01:34:21 +0100 (Sun, 09 Feb 2014)
 
Re: Troubles upgrading from 9.2 to 10

All of that looks good. I've run a couple dozen make buildworld and have never had a problem. I need to think about what might be going wrong here. As far as I can tell you have done all the necessary preparatory steps in the correct order. I'm going to do some research to see if I can get some clues.

EDIT: One more thought: please provide the contents of your /etc/make.conf file. Thanks.

EDIT 2: You are not running devel/ccache are you?
 
Re: Troubles upgrading from 9.2 to 10

trh411 said:
All of that looks good. I've run a couple dozen make buildworld and have never had a problem. I need to think about what might be going wrong here. As far as I can tell you have done all the necessary preparatory steps in the correct order. I'm going to do some research to see if I can get some clues.

EDIT: One more thought ... please provide the contents of your /etc/make.conf file. Thanks.

Already done:
Code:
WITH_PKGNG=yes
DEFAULT_VERSIONS=ruby=1.9
PERL_VERSION=5.14.4
 
Re: Troubles upgrading from 9.2 to 10

Okay, I'm going to ask that you follow my blueprint for upgrading from source. In effect we'll be starting from scratch and will ensure a clean starting point. Do all the following as the 'root' user:
Code:
# cd /usr/src
# rm -R *
# rm -R .svn
# svn co https://svn0.eu.FreeBSD.org/base/stable/10 /usr/src
# cd /usr/obj
# rm -R *
# cd /usr/src
# make buildworld
Hopefully this will yield a good make buildworld run.
 
Re: Troubles upgrading from 9.2 to 10

I already do it more than once, but I want to try it again for you:
Code:
root@web1:~# cd /usr/src
root@web1:/usr/src# rm -Rf *
ls root@web1:/usr/src# ls -la
total 6
drwxr-xr-x   3 root  wheel  1024 Feb 10 01:23 .
drwxr-xr-x  20 root  wheel   512 Feb  9 20:41 ..
drwxr-xr-x   4 root  wheel   512 Feb  9 20:45 .svn
root@web1:/usr/src# rm -Rf .svn
root@web1:/usr/src# svn co https://svn0.eu.FreeBSD.org/base/stable/10 /usr/src

... List of files ...

A    games/pom/pom.6
 U   .
Checked out revision 261702.
root@web1:/usr/src# cd /usr/obj
root@web1:/usr/obj# rm -Rf *
root@web1:/usr/obj# cd /usr/src
root@web1:/usr/src# make buildworld

... A lot of lines ...

gbasic/../../../contrib/llvm/tools/clang/lib/Basic/LangOptions.cpp /usr/src/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/Module.cpp /usr/src/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/ObjCRuntime.cpp /usr/src/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/OpenMPKinds.cpp /usr/src/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/OperatorPrecedence.cpp /usr/src/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp /usr/src/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp /usr/src/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp /usr/src/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/Targets.cpp /usr/src/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/TokenKinds.cpp /usr/src/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/Version.cpp /usr/src/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/VersionTuple.cpp
/usr/src/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp:1100:10: fatal error: 'emmintrin.h' file not found
#include <emmintrin.h>
         ^
1 error generated.
mkdep: compile failed
*** Error code 1

Stop.
make[4]: stopped in /usr/src/lib/clang/libclangbasic
*** Error code 1

Stop.
make[3]: stopped in /usr/src/lib/clang
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src
root@web1:/usr/src#
 
Re: Troubles upgrading from 9.2 to 10

Thanks for giving it another try. I have to say I am completely stumped as to what the problem might be. I can find no mention of this specific problem anywhere. I'll keep digging and let you know if I find anything that can help. Sorry.
 
Re: Troubles upgrading from 9.2 to 10

Ok, all fixed. To fix it I used a virtual machine with the same version of FreeBSD (10.0.0/amd64), then I compared both /usr/include from the virtual machine and the server, then I noticed a difference between the versions and files. To fix it I replaced the server's /usr/include with the one of the VM, after that all goes good!

Fixed!
 
Re: Troubles upgrading from 9.2 to 10

RedFoxy said:
Ok, all fixed. To fix it I used a virtual machine with the same version of FreeBSD (10.0.0/amd64), then I compared both /usr/include from the virtual machine and the server, then I noticed a difference between the versions and files. To fix it I replaced the server's /usr/include with the one of the VM, after that all goes good!

Fixed!

Glad to hear that. I'm gonna going to build one VM for myself now. Thank you!
 
Back
Top