Advertisement

[FreeBSD] Kernel upgrade from 5.1-RELEASE

Started by June 27, 2005 09:47 AM
5 comments, last by Clash Rocker 19 years, 4 months ago
Hi, Okay, so I've got my FreeBSD 5.1-RELEASE running fine and all, but lately more and more ports seems to fail to build; most noteable gcc34 on which many ports rely. Know I think that gcc34 is the native compiler for current. So for my problems to go away I need to get current. Now I've found many wonderful howto's online which tell me what to do, but they are very different from eachother. For instance some require reboot in single mode before mergemaster, while others don't bother. I've been using FreeBSD for more than a year now, but in this regard I still feel like a complete newbie. [sad] Can anyone tell me how to upgrade from 5.1-RELEASE to current? tia, CipherCraft PS I have a cvsup file with release set to 'cvs tag=.', updating using cvsup works fine. It's the steps after that that confuse me or make me uncertain. PPS My last attempt (from 4.5 to 5.1) failed and left my machine unbootable. I was able to get to my data using the live cd but had to reinstall the whole thing, something I don't wish to do again...
I'm assuming you read the handbook on this: Rebuilding world Since you brought up the fact you read the "howto", just linking it though for reference. But usually 99.9% of the time just follow the handbook over anything you find in the wild.

The first thing I notice, is that you do not want 'cvs tag=.' unless you want to run FreeBSD-current, which you don't. What you are probably wanting is FreeBSD 5.4. So in your cvsup file you want 'cvs tag=RELENG_5_4' instead. That will update everything to the newest official release. Then when FreeBSD 5.5 comes out you just want to change that to RELENG_5_5, or RELENG_6_0 when it comes out. They should really clearify that more in the handbook. You can find example cvsup files in /usr/share/examples/cvsup. Whenever I install a new FreeBSD system I just copy port-supfile and standard-supfile to the root folder, and change the host line. There is no need to write your own cvsup file from scratch. Also an interesting port if you don't know about is sysutils/fastest_cvsup. It'll allow you to find which cvsup host is the quickest for you, if you've not found that yet.

I'm tacking on my cvsup file for you just in case.

Quote: *default host=cvsup6.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_5_4
*default delete use-rel-suffix
*default compress
src-all


Btw, if you want here is my /etc/make.conf

CPUTYPE?=pentium4CFLAGS=-O2 -pipeCOPTFLAGS=-O -pipeNOPROFILE=true

of course change CPUTYPE to fit your processor, here's a list of those supported.
Quote: # Currently the following CPU types are recognized:
# Intel x86 architecture:
# (AMD CPUs) opteron athlon64 athlon-mp athlon-xp athlon-4
# athlon-tbird athlon k8 k6-3 k6-2 k6 k5 nocona
# (Intel CPUs) pentium4[m] prescott pentium3[m] pentium2 penitumpro
# pentium-mmx pentium i486 i386
# Alpha/AXP architecture: ev67 ev6 pca56 ev56 ev5 ev45 ev4
# AMD64 architecture: opteron, athlon64, nocona
# Intel ia64 architecture: itanium2, itanium

Then from /usr/src assuming root and using the GENERIC kernel.
] make buildworld ] make buildkernel] make installkernel

They say you should drop down into single user mode, but I never do since it's just my box and I am the only one ever on it. I run my machine through remote connection and can't really do the whole drop down to single user mode anyway.
] mergemaster -p] make installworld] mergemaster

Then I finally reboot, you could also email the freebsd mailing list, I find them to be very helpful. If any of the above steps fail post away so you're not stuck in limbo again or if you have any more questions.
"Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information upon it." - Samuel Johnson
Advertisement
Hi gg83,

Thanks for your lengthy reply! ++Rating for that.

Yes I've read the handbook, but find it's sometimes missing some information.

Your approach matches some of the easier howto's that I've seen, and since it does not add all those extra things, I'm figuring less can go wrong. [lol]

I was attempting to update to current because I got the impression that stable releases were sometimes way behind on the current branch.

Thanks for your input. I'll give it a go sometimes soon.

CipherCraft
Quote: Original post by CipherCraft
I was attempting to update to current because I got the impression that stable releases were sometimes way behind on the current branch.


Instead of maybe RELENG_5_4 then you might want to try RELENG_5 it is known as the stable branch. That's probably what you are thinking. It's a little different from the current branch.
"Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information upon it." - Samuel Johnson
Quote:
They say you should drop down into single user mode, but I never do since it's just my box and I am the only one ever on it. I run my machine through remote connection and can't really do the whole drop down to single user mode anyway.
] mergemaster -p] make installworld] mergemaster

Then I finally reboot, you could also email the freebsd mailing list, I find them to be very helpful. If any of the above steps fail post away so you're not stuck in limbo again or if you have any more questions.


FYI:

The "drop down to single user mode" is kind of critical if you are rrunning at a secure level higher than 0. If you are running at this secure level, then the system immutable and append flags are enforced, even for the root user. As a result, an installworld will fail. Shutting down to single user mode suspends the secure level.

Regards!
Hi,

A small update. I did as gg83 suggested and my system is still running. Yay! [wink]

But... installworld failed the first time round. I got some error while running it (can't remember which one sorry) dropped to single user mode, did make installworld again and everything went fine. I'm not sure why this was but I'll stick to switching to single user mode the next time, just in case.

Mergemaster went okay; mostly new files so that was easy.

Only now my X is fried. [sad] Seems that somewhere along the line the xorg-libraries were installed. Now I'm not sure if it was required for one thing or another, but I was thinking of trying out the xorg implementation one day, so now I can. But I also think the next problem is connected to it. [wink]

The system now fails to recognize my nVidia card; I'm stuck with a generic vga, which ain't much. I guess, I'll have to check my kernel modules and make a thorough comparison of GENERIC and my kernel definition; that's gonna be so much fun, not.

Just keeping you up to date. Comments and suggestions are welcome ofcourse!

cu,
CipherCraft
Advertisement
Rebuild your X11 ports or update to some packages to whatever FreeBSD branch you are now running.

If you're using the NVIDIA binary driver from {PORTS_DIR}/x11/nvidia-driver then you will have to rebuild that with your updated kernel sources.

I suggest you update your ports tree and portupgrade all your installed ports.

This topic is closed to new replies.

Advertisement