Some questions for upgrading 8.2 to 9

Some years ago I installed FreeBSD on a couple of systems. The version installed at the time were 4.X. Over the years, the systems ticked happily and I've been using the FreeBSD handbook procedures to do source code-based upgrades.

When freebsd-update was introduced I became a bit confused/jealous: I wanted to be able to download only binary packages of applications and also do binary upgrades to new FreeBSD versions. I didn't, I was and still am anxious of something that might go wrong: both systems are heavily used in production and I simply can not face the possibility of downtime due to something going seriously wrong (I am no FreeBSD expert, just a user with some sysadmin knowledge).

At the moment, my systems have got 8.2 installed. My questions are the following, any help will be appreciated:

1) Can I still use the same source code-based procedure (cvsup, make buildworld/buildkernel/installkernel, mergemaster -p, installworld, mergemaster) ?

2) I am using custom kernels on both systems, mainly to reduce kernel size, leaving only needed code like the only net cards installed, removing kernel debugging code etc. I can see from the 9.0 release notes that a couple of kernel options have been introduced, like CAPABILITIES, CAPABILITY_MODE. Are there any other options I should add?

3) Finally, is it possible to switch to a binary-based update from now on? If so, is it a safe or a dangerous procedure? Links?

Please accept my apologies for my numerous questions.
 
carmik said:
1) Can I still use the same source code-based procedure (cvsup, make buildworld/buildkernel/installkernel, mergemaster -p, installworld, mergemaster) ?
Yes, it still works.

2) I am using custom kernels on both systems, mainly to reduce kernel size, leaving only needed code like the only net cards installed, removing kernel debugging code etc. I can see from the 9.0 release notes that a couple of kernel options have been introduced, like CAPABILITIES, CAPABILITY_MODE. Are there any other options I should add?
I usually read through GENERIC to see what's changed.

3) Finally, is it possible to switch to a binary-based update from now on? If so, is it a safe or a dangerous procedure? Links?
As long as you have a GENERIC kernel and are running a -RELEASE version this shouldn't be a problem.
 
SirDice said:
I usually read through GENERIC to see what's changed.
Same here, it's just that I do not understand the implications of this new keywords (IOW I lack the technical experience to decide for myself whether these are needed or not). From your response I understand that these are optional keywords, so I'm gonna leave them out for the moment.


As long as you have a GENERIC kernel and are running a -RELEASE version this shouldn't be a problem.
I believe I'm on -RELEASE:
Code:
FreeBSD myhost 8.2-RELEASE-p4 FreeBSD 8.2-RELEASE-p4 #0:
Assuming I rebuild the kernel to use a 8.2 GENERIC, which would be the steps to upgrade to switch to a binary type of upgrading? And should this be performed before or after switching to 9?
 
carmik said:
I believe I'm on -RELEASE:
Code:
FreeBSD myhost 8.2-RELEASE-p4 FreeBSD 8.2-RELEASE-p4 #0:
Indeed you are.

Assuming I rebuild the kernel to use a 8.2 GENERIC, which would be the steps to upgrade to switch to a binary type of upgrading? And should this be performed before or after switching to 9?
Build and install the kernel as normal. After that you can run freebsd-update(8). Nothing more would be needed.
 
Just a quickie: should I rebuild the entire ports collection after upgrading to 9? That is, after make installworld and the subsequent mergemaster operations?
 
Yes, it's definitely recommended to rebuild all your ports once you've upgraded.
 
carmik said:
Just a quickie: should I rebuild the entire ports collection after upgrading to 9? That is, after make installworld and the subsequent mergemaster operations?

A terminology note: the "ports collection" refers to the files in /usr/ports. Those are the files used to build a ported application, and don't have to be changed on update. (The same ports collection or "ports tree" is used for all versions of FreeBSD.)

The applications that have been installed from the ports collection, themselves often called "ports" (sorry), those are the ones that need to be rebuilt.
 
Thank you both, yes indeed I was referring to the already installed application from the ports.

Will portupgrade -fa do? Or something else?
 
Trying to upgrade all ports in-place is usually slower than deinstalling everything and installing them fresh. The end of the ports-mgmt/portmaster man page shows a procedure to do that.

It doesn't always work easily, but it's better than just making a list.
 
wblock@ said:
Trying to upgrade all ports in-place is usually slower than deinstalling everything and installing them fresh. The end of the ports-mgmt/portmaster man page shows a procedure to do that.

It doesn't always work easily, but it's better than just making a list.

But would rebuilding everything in place be just as good as deinstalling and installing again everything? The reason I'm asking is that I'm fairly new to FreeBSD and have absolutely no idea what of /usr/local/ I would need to backup and then restore, and so would prefer doing an inplace reinstall if it would work just as well.
 
Rebuilding in place is slower and has a slightly higher chance of problems due to old dependencies still hanging around. Once done, it's exactly the same.

Ports are supposed to save their settings in /usr/local/etc. Definitely back that up before rebuilding.
 
OK, that makes sense. I know I've modified some of the config files in /usr/local/etc, but I don't know which ones. I guess that isn't really that much of a problem - I'm sure I will be able to just compare the files and merge in my changes. Hopefully :)

Now, next question (and pardon for hijacking the thread - starting a new one with the exact same title didn't seem a good idea). The last part (the reinstallation of all ports) of portmaster's man says, in step 9:
Manually check /usr/local and /var/db/pkg to make sure that they are really empty

My understanding of this is that I should make sure that there is NOTHING under either of these two directories. However, following steps 1-8, I see that /var/db/pkg contains the packages db file, and the /usr/local contains a number of directories, including bin, lib, sbin, etc. None (or at least the three above) are empty. So is step 9 really saying that I have to delete all these?
 
When you modify config files, add a comment with your initials to changes you make. Then it's just a grep(1) to find them all.

If you actually deleted all the packages, those directories will mostly be empty. The procedure does that to make sure there aren't any old settings or binaries to conflict. Depends on how lucky you feel, but it's worth browsing through those directories. They may just be leftover files that couldn't be deleted because they had been customized.
 
Back
Top