Painlessly Update FreeBSD 123
boarder8925 writes "Over at BSDnews, Steve Wingate has written an article on how to easily update FreeBSD. Wingate begins his article by saying, "One of the greatest advantages that *BSD has over other Unix variants is the cvsup/make world process. Unlike most Linux distributions it isn't necessary to wait months for a new version to be released for you to upgrade your system. The cvsup/make world process allows you to update your system at any time. I'm going to show you how to make the process as painless as possible." The article discusses the following: installing CVSup, choosing a cvsup server, configuring make.conf, and, finally, performing the upgrade. The piece is also available as a .pdf file."
This is different from the cvs guide (Score:3, Insightful)
It's more risky than following the handbook. (Score:5, Informative)
Firstly: he doesn't track the RELENG_4_9 branch, he tracks the STABLE branch (RELENG_4 - e.g. the latest of whatever is considered stable for Release 4) - which is more likely to break working stuff than the RELENG_4_9 branch which is FreeBSD 4.9 that has just the updates for security problems. Yes many ppl don't have problems with RELENG_4, but if your job and reputation is on the line - only use it if RELENG_4_9 doesn't work (hardware, required features etc).
Secondly: He skips the mergemaster -p step.
The way I recommend is what's been in the FreeBSD handbook for years:
Step 1: Synchronize your source [freebsd.org] Use cvsup. It's better. And track the RELENG branch.
e.g. cvsup mycustomcvsupfile
Where mycustomcvsup is like the stable-supfile but with the following tag instead of RELENG_4:
*default release=cvs tag=RELENG_4_9
Step 2: Building and Installing world [freebsd.org]
optional step before:
cp
edit
Then
make buildworld
make buildkernel KERNCONF=YOURKERNELNAME
make installkernel KERNCONF=YOURKERNELNAME
reboot and go to single user mode
mergemaster -p
(preliminary mergemaster stuff if things are too different between your config and what the new FreeBSD stuff is)
make installworld
mergemaster
(to merge what's new in
reboot
***multiple machines.
Here's where you might do things differently.
Read this for some background: tracking for multiple machines [freebsd.org]
Now once you built everything, you don't have to rebuild it on a different machine if you are using a compatible architecture. For example you specify a 686 CPU in your make.conf and kernel config, you can only reuse it on stuff which supports 686 class CPUs.
I didn't bother with the NFS part (not applicable for some situations) - I just did the synchronize of src and ports and did the build on a fast machine with a fast connection.
The default was 4-stable which tracks the current stable source of Release 4. For production machines I recommend tracking RELENG releases and not STABLE.
Then build the kernel and sources.
cd
make buildkernel KERNCONF=kernelformachineA
make buildkernel KERNCONF=kernelformachineB
make buildkernel KERNCONF=kernelformachineC
make buildworld
cd
Then tarball the results: tar -zcvf src.tar.gz src && tar -zcvf obj.tar.gz obj && tar -zcvf ports.tar.gz ports
Then I copied the tarballs (via CDR) to the slow machine which did not have a cvsup connection (not allowed by firewall policy etc)
Then installed the results on the machine.
cd
rm -rf src obj ports
tar -zxvf src.tar.gz && tar -zxvf ports.tar.gz && tar -zxvf obj.tar.gz
Then I ensured that the
Then: make installkernel KERNCONF=therelevantkernel && make installworld.
Note: to save the trouble of building desired ports software on the slow machine you have to make packages on the fast machine.
e.g.
cd
make package
---
You should also check out freebsd-update.
freebsd-update is more like binary updating of stuff affected by security issues.
Redhat is simpler on one hand and more complex on the other- sure you can ftp all the rpms and run a freshen. But it's harder to be sure everything is really consistent
Re:It's more risky than following the handbook. (Score:1)
Mergemaster, in theory, is used to update the files in
Gentoo has this.. (Score:2, Informative)
Re:Gentoo has this.. (Score:1)
Re:Gentoo has this.. (Score:2)
Re:Gentoo has this.. (Score:2)
I think he's still wrong out of that respect. The major distros I know support this include:
Gentoo
Slackware
Debian
Redhat
Mandrake
This leaves very few major distros that don't. Considering that the majority of the remaining distros are based on one of the above, or on the fringe, I can't see how his point is all that valid.
Re:Gentoo has this.. (Score:4, Interesting)
Re:Gentoo has this.. (Score:2)
I picked up a R4400SC-powered Indy system recently and decided to put Gentoo/MIPS on it - I'm not sure it's
Just in case ... (Score:3, Informative)
Google cache of article [64.233.161.104]
Google cache of
Re:And the advantage Linux has over BSD... (Score:2, Informative)
I just migrated all my Linux server over to FreeBSD because FreeBSD is so much easier to maintain. It seems faster also.
Re:And the advantage Linux has over BSD... (Score:1)
I am having problems getting Radius to work with my email and VPN servers. But that's a
Re:And the advantage Linux has over BSD... (Score:3, Insightful)
You can say a lot of good stuff about *BSD, but it currently does not match the quality and quantity of great minds work that is being put into the linux kernel.
Re:And the advantage Linux has over BSD... (Score:2, Informative)
Linux 2.6 scales O(1) in all benchmarks. Words fail me on how impressive this is. If you are using Linux 2.4 right now, switch to Linux 2.6 now!
FreeBSD 5.1 has very impressive performance and scalability. I foolishly assumed all BSDs to play in the same league performance-wise, because they all share a lot of code and can incorporate each other's code freely. I was wrong. FreeBSD has by far t
Re:And the advantage Linux has over BSD... (Score:3, Insightful)
Quick summary:
Re:And the advantage Linux has over BSD... (Score:2)
Those numbers are microbenchmarks. They may show something but do not relate to real life performance.
You can say a lot of good stuff about *BSD, but it currently does not match the quality and quantity of great minds work that is being put into the linux kernel.
You may say whatever you want, but it just sounds as zealotry.
Re:And the advantage Linux has over BSD... (Score:2)
Re:And the advantage Linux has over BSD... (Score:3, Informative)
Re:And the advantage Linux has over BSD... (Score:2)
Anonymous Coward's Guide to Updating Debian (Score:1, Insightful)
Wasn't that hard?
Re:Anonymous Coward's Guide to Updating Debian (Score:2)
I agree. port_upgrade -PP works better.
Re:Anonymous Coward's Guide to Updating Debian (Score:5, Insightful)
Re:Anonymous Coward's Guide to Updating Debian (Score:3, Interesting)
Yes APT is great. It's easy to use and requires less effort than the FreeBSD upgrade process but it's too bad Debian stable is so hopelessly out of date.
Three words: "End of Life"
If we are looking at updates, the last extended support release of FreeBSD was 4.8, which was released in April, 2003.
Its end-of-life is March, 2005.
Debian Potato was released August, 2000 and end-of-lifed in June, 2003.
Debian Woody was released in July 2002, and, assuming that tradition holds, will be supported
Re:Anonymous Coward's Guide to Updating Debian (Score:3, Funny)
Sure, if you like using 4 or 5 year old hardware. If you want to use newer hardware, you have to run a "testing" kernel. Case in point: a 160GB hard disk attached to an ATA/133 card... gotta have 2.4.20 to handle it. I would have been limited to using 127MB of it, and accessing it thru the mobo's blazingly fast UltraDMA/33 ports, if I was determined to stay with "stable".
Re:Anonymous Coward's Guide to Updating Debian (Score:1, Informative)
I use Debian stable on all of my servers; it still gets the security updaes, and stable is... Well, stable. Great for production servers.
Debian testing works great on desktops, though. I'm running testing now, with kernel 2.6.5, and everything is wonderful, and best of all...modern. And pretty stable, too.
If you don't need the fancy gui stuff, testing is the way to go. Most of the server oriented stuff is very up to date in stable.
cvsup in C? (Score:2, Informative)
I'm hoping someday Gentoo will use cvsup because it's a bit more efficient (it doesn't have to re-compute all deltas every time like rsync).
I use both FreeBSD and gentoo heavily but portage generally feels a lot slower than BSD ports, syncing as well as the various cache or dependency operations or whatever it does when it sits there spinning at me.
Re:cvsup in C? (Score:4, Informative)
Yes. It is being done, and there is (mostly) working code.
Re:cvsup in C? (Score:5, Interesting)
"unlike most linux distributions"? (Score:1, Informative)
okay, minor lie; linux from scratch had no such tool. on the other hand, linux from scratch had no installer and consisted entirely of a manual explaining how to compile the software.
Re:"unlike most linux distributions"? (Score:1)
Re:"unlike most linux distributions"? (Score:3, Informative)
Yes, linux has always had software to update software to the latest official release. What he is saying is that with BSD you can update the system to the latest software too, without waiting for the next version.
In other words, on RedHat or Debian, I can update to the latest apache pretty easily with apt or rpm. Same on BSD. But on BSD I can also easily download and install the very latest updates to the kernel and base system straight from the official CVS without having to wait for binary updates to come
Re:"unlike most linux distributions"? (Score:3, Insightful)
That's the essence of what the article blurb is saying. No need to get all defensive about it. You chose to use a system that someone else integrated together for you
That's the easy solution? (Score:5, Insightful)
freebsd-update fetch
freebsd-update install
Yeah, ok, FreeBSD Update is only about tracking the release branch. But really, this story just covers the standard technique which people have been using for... well, longer than I've been using FreeBSD.
too many dependencies (Score:5, Insightful)
The underlying problem is really that C/C++ code has so much information compiled into each object file: even common, minor changes may require huge amounts of recompilation. While we practice abstraction and encapsulation at the source level, at the binary level, it is still mostly lacking.
The choice shouldn't been between huge amounts of recompilation from source (Gentoo, BSD) or laborious hand-packging and version tracking (Debian, RedHat, etc.), this needs to be addressed by changing the underlying software infrastructure. Let's hope we'll move more towards JITs, dynamic binding, dynamic typing, and component-based software. Then we can finally get away from these massive recompilations and version hell.
Re:too many dependencies (Score:1)
Re:too many dependencies (Score:2)
If you're looking for a power-user Linux with binaries, Debian would probably be a better way to go.
And, I don't understand how this article is at all news. Hasn't FreeBSD had this for years?
Re:too many dependencies (Score:2)
Debian indeed gives you a great selection of packages and does a good job on the dependency management.
But that doesn't mean that the dependency problem has been solved--you are still paying the price for it. To make the Debian magic happen requires an enormous amount of labor and coordination. Even with that, there are dependency problems (fewer than if you try to do the same thing by hand with RedHat o
Re:too many dependencies (Score:4, Insightful)
No kidding. My NetBSD box taks hours to compile all these packages. If all you want to do is upgrade xscreensaver, all you have to type is make update ( or is it upgrade ). But what happens in the background is that it probably has newer requirements, like an updated gtk, which depends on pango updates, and that depends on .. and so on and so on, and then suddenly updating one program becomes updateing the WHOLE gnome desktop and compiling from sources. On an old 233Mhz that is a long time. But hey NetBSD and FreeBSD install on on old 233Mhz with only 64Megs of RAM, Redhat doesn't, ( debian does though ).
I agree "The choice shouldn't been between huge amounts of recompilation ..." but I can't see having the whole GUI using JITs. Also most of these programs use dynamic binding.
See the problem is that the maintainers of these packages, upgrade the requirements of the packages based on new features in these packages or just because it is the latest in the release tree and assumed to have less bugs. IE. xscreensaver probably would have compiled fine in teh above example with the gtk onn my system, but the Makefile for it has a requires gtk 2.2.x+ or something like that in it which it then checks to see if it is installed on the system. It should really have done, if gtkversion == 2.0 compile with gtk 2.0, and leave our whatever features that it is missing. Chances are there are none that require gtk 2.2 and 2.0 wont work just fine. However if it was gtk = 1.2 then update. A better example is programs that still use gtk 1.2. Is there really a difference between gtk 1.2.10 and 1.2.10nb2? Probably not enough that you are required to upgrade all the programs on the system. They should add an option, and call it make update_all which updates ALL the dependancies and then the default behavior should be make update just this one program. That's what the problem is with this compile stuff. I use Linux, NetBSD, FreeBSD, Windows, Sun, and Mac. They all have their plusses and minuses. It really depends on what you think is important.
Oh, yes. (Score:1)
This is particularly annoying because this is one of the main reasons I switched to BSD from Debian-- with Debian, unless you're running stable, the dependencies for any new binary package you install can cascade up the dependency graph and then ba
Wait a minute (Score:1)
I'm sorry, I've spent 15 years developing commercial software, and the first rule you learn (okay, the first rule you learn is 'Always make backups of everything') is not to upgrade any of the libraries, tools, or whatever in the middle of a project unless there's a really compelling reason. That doesn't even take i
Re:too many dependencies (Score:1)
can be PITA. I even had a poster in my cubicle in the office saying "DON'T USE make update!"... The results may be difficult to predict... and you don't want all your KDE or Gnome packages suddenly disappear because of some weird dependency. I have also an occasion I found myself in a loop - a needs b needs c ... needs a...
What I normally do nowadays on my NetBSD systems is use just 'make'; if there are dependencies, it will 'make install' them and if there were older versions of these in p
Re:too many dependencies (Score:2)
be any less painful of updating if you want the latest. And interfaces
are just as important here,.
Change the interface and all dependant application needs to be updated
to take adjust for that.
Then there is the choice of what to update. If installing a new xscreensaver is what I want, pkgsrc on my
Re:too many dependencies (Score:2)
What are you talking about? Major recompilation is a development issue, not an end-user issue.
Whenever a new version of a package is installed, it is compiled from scratch. End users do not keep object files from previous versions of a package. Upgrading a package means recompiling all the binaries from scratch.
Let's hope we'l
JITs are part of the solution (Score:2)
Yes, indeed there is.
Nevertheless, JITs are an important part of the solution because they allow you to remove almost all compiled-in dependencies between
Re:JITs are part of the solution (Score:2)
You can use reflection.
Nevertheless, JITs are an important part of the solution because they allow you to remove almost all compiled-in dependencies between object files without sacrificing efficiency.
They don't remove compiled-in dependencies. They compile just-in-time. (Hence the acronym)
Re:too many dependencies (Score:2)
Please see ccache [samba.org].
Re:too many dependencies (Score:1, Interesting)
Re:too many dependencies (Score:2)
With Debian, you don't have to: apt will do it for you. But that doesn't remove the dependencies--you still pay the price. What's the price? Huge downloads and enormous amounts of human effort going into this.
Instead of lumping everything together in
Re:too many dependencies (Score:2)
But the new API is compatible--merely adding a field (or method) does not change any of the semantics of the object. And, in fact, there are many languages in which you don't have to recompile.
That's true if the Gtk+ developers are dipshits. Changing the API in such a way that it breaks previous v
Re:too many dependencies (Score:3, Funny)
This is a disgiused Java advocate! Don't be fooled to think; 'I wish there would be a language for that'.
As soon as you'd say that, the Salesmen of The Sun would be knocking on your door.
Re:too many dependencies (Score:2)
I would advocate the use of Mono/C#, however, since it is open source, non-proprietary, and fixes many of Java's problems. And I don't "disguise" that at all--why should I?
Unfortunately, neither Java nor C# were designed to deal specifically with this problem, so neither of them is a complete solution. But they help, and if you know what you are doing, they can actually help a lot. Another language t
Re:too many dependencies (Score:2)
Coincidentally, right now I'm in the middle of a rather lengthy recompile of Java...
To the point at hand, the problem isn't compiled languages, it's developers not taking upgrades into account. If you change the functionality of an application, it stands to reason that you have to rebuild that application (or at least the components that have changed). I don't see where this is any more onerous than hav
Recommended step (Score:2, Informative)
alias rebuild 'cd
to
alias rebuild 'cd
The prebuildworld mode for mergemaster is a life saver. Read man mergemaster.
Re:Recommended step (Score:3, Informative)
alias rebuild 'cd
Issue #3?November 9, 2003 (Score:4, Interesting)
Then I realized: Issue #3?November 9, 2003
How the hell is this news? I love FreeBSD, its all I use. the only thing dead about it is bsd.slashdot.org
read UPDATING (Score:2, Informative)
Why is his method special? (Score:3, Insightful)
When I first saw the headline about "painlessly updating", I thought this might be a great article about some new innovative way to update. Its not really anything new or interesting though, the whole article is basically saying: "cd /usr/src && make world && make kernel && mergemaster will update you system"
Not wanting to sound rude, but no shit sherlock! Yes, this is a painless way to update your system. It is also the way to update your system, as is very well spelled out in the excellent FreeBSD Handbook so I'm not sure why it warrants an article....
Maybe its just me but I think an article [onlamp.com] about portupgrade or something would have been more useful.
Re:Why is his method special? (Score:2)
Re:Why is his method special? (Score:1)
offer to overwrite /etc/passwd? Safe? UG! (Score:3, Informative)
I can't say my DoC (SuSE) has it better -- they don't ever seem able to upgrade my system in a sane or coherent manner. Last time around, it upgraded my squid 3.0 to squid2, tried, unsuccessfully to put my named in a basement mail (when it hadn't even been bad), but it was thrown in the basement w/o the root servers file and when the root servers all expired some large amount of time (~3-4 months) later, various TLD's started disappearing. It was bizzare watching large sections of internet just "go away" a few days before it completely consumed itself. Then I found the problem -- it hadn't copied in the root servers file from the previous upgrade (and/or didn't install a new copy). I tried grabbing some updates with their Yast Online solution, but it kept downloading copies of 8.2 binaries when I have 9.0 loaded. I never had 8.2 loaded -- I went straight from 8.1 to 9.0. Later, I found, buried in some paragraph of fine print somewhere that their updates only support updating from the immediately preceding version -- this was after it had removed all unknown packages fro the package database. At this point I had all the 8.1 packages installed, but no longer noted as "installed" in the database over which it automatically upgraded and installed about 10-15 packages out of the 100-150 it should have installed (I guess ~10-15 packages kept some same valid name). I'm always rather afraid to do an upgrade under SuSE as I know it will usually involve lots of pain.
On the flip side -- a fresh install of 9.0 for a never-used-linux user went real smooth -- they were able to navigate their way around after only one or two hiccups -- like buttons weren't where they used to be under Win, but I just told them they'd have to experiment a bit and find out how things were arranged differently. Once they experiemented some, they started finding what they needed surprisingly well.
-l
Re:offer to overwrite /etc/passwd? Safe? UG! (Score:1)
In FreeBSD
This file is generated from
Waiting months for a new version? (Score:2)
Either this is a joke, or this guy never installed a Linux distro. Or maybe it was Debian Stable and he didn't realize what "stable" means.
Sure, the BSD ports system is nice. But there's no need to make a blind comparative with "most Linux distributions" to justify it. It just feed trolls without actually helping anyone.
Hmm?? (Score:1)
Re:Hmm?? (Score:1)
Re:Hmm?? (Score:2)
If you run mergemaster after you cvsup, you'll get a fresh copy in
Re:Hmm?? (Score:1)
Re:Hmm?? (Score:1)
Re:Hmm?? (Score:1)
Re:Hmm?? (Score:1)
Anyway, you can find an example make.conf in
Just copy that to
Re:Hmm?? (Score:1)
Re:Hmm?? (Score:1)
It changed in the 5.x series
Ports upgrading is more painful (Score:3, Interesting)
Upgrading the base system is great and it works most of the time. I'd only wish cvsup/cvs were able to fetch a consistant source tree, but as long as CVS doesn't provide some kind of ACID semantics, it would be very hard to do so. There's always the risk of updating /usr/src in the midst of a commit.
The ports are actually more painful to upgrade than FreeBSD proper. portupgrade does a great job at this, but it's not a panacea. First of all, portsdb -uU takes a hell of a time to generate a new INDEX.db, then you still have to fix some stale dependencies etc... This is the same problem as with Linux distros, and there is no easy solution to this.
Re:Ports upgrading is more painful (Score:2)
This just took me 10 minutes on a server that was under 50% load at start time, with a ports cvsup on Saturday. The machine is a k6-2 350.
I don't think that's unreasonable considering how old my servers are, and the number of ports it has to chew through (10,000+, maybe 11,000 now.)
Update FreeBSD using PACKAGES not CVS / Ports? (Score:2)
Wait a minute (Score:2)
(this is the exact same format as a gentoo, debian, slackware, mandrake, suse, fedora, osx user would do so I'm only a troll if you're biased)
Re:NETCRAFT NOW CONFIRMS: *BSD IS DYING (Score:1)
I see dead OSes, see?
Re:NETCRAFT NOW CONFIRMS: *BSD IS DYING (Score:1)
Re:REASON WHY BSD IS DEAD (Score:2)