Kernel and FreeBSD (“world”) update

Sequence of actions for kernel and FreeBSD («world») update

1) Updating the ports

Creating the file with updating parameter. In my example, we will download ports of FreeBSD RELEASE 7.2

#touch /usr/home/user/mysup


#ee /usr/home/user/mysup


*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_7_2
*default delete use-rel-suffix
*default compress
ports-all tag=.

With such a configuration not STABLE is downloading, but RELEASE with all the current patches which is very good – as far as it is much better to have frozen RELEASE than STABLE. As for me, it’s better to rebuild the system once, and than just to monitor postings, and to apply patches if necessary. But it’s IMHO.

Now we run the update via cvsup

#cvsup -g -L2  /usr/home/user/mysup

2) After ports updating, setting the new kernel configuration.

For 32 bit system, default kernel file (GENERIC) is there –


For 64 bit system, default kernel file (GENERIC) is there –


Copy GENERIC with other name, set what we need in kernel and then use the name which have stated there, e.g. –

#cp /usr/src/sys/amd64/conf/GENERIC /usr/src/sys/amd64/conf/SOULBRAT

Don’t forget to change value ident into yours in kernel file


In the article – FreeBSD Kernel rebuilding the preparation and rebuild of the kernel are reviewed.
According to this article, you have ONLY to prepare the kernel for installation. But NOT to execute the installation, as far as you need to update the World (world) .

3) The next step is necessary when you rebuild releases. If you are not upgrading to the next branch, skip this step.

#cd /usr/obj --
# chflags -R noschg *
# rm -rf * 

4) Building the “world” and kernel.

#cd /usr/src/
# make buildworld

# cd /usr/src/
# make buildkernel KERNCONF=SOULBRAT

5) Installing the kernel.

# make installkernel KERNCONF=SOULBRAT

Then rebooting and going into Single User mode

# shutdown -r now

In Single User mode, mount the file system partition

# mount -u /
# mount -a
# mergemaster -p

Install the world

# cd /usr/src
# make installworld
# make delete-old

Compare the configuration files

# mergemaster

(I personally do mergemaster -iU, it gives possibility to install automatically the absent configuration files,
and also automatically replaces configuration files which were not changed by user)

Rebooting the system

# reboot

6) The next step is necessary when you rebuild releases. If you are not upgrading to the next branch, skip this step.

Install the compatibility pack with the previous release number, so the installed programs will work.

# /usr/ports/misc/compat6x/make install clean 


# portupgrade --all --force 

(BUT it can be skipped if compat6x is built)

7) Delete the old libraries

# cd /usr/src/
# make delete-old-libs

Check up if all the programs are working, and see the result –

# uname -a
FreeBSD 7.2-RELEASE-p8

And that’s it. As you can see there is nothing too difficult in the world and kernel rebuilding. But it’s very important and necessary for system and safety improvement.

P.S. Some words about mergemaster utility. It compares the installed configuration files with those which are proposed by the new FreeBSD version. If there are differences, there is the message about it. The first line there is the name of file, which doesn’t meet new requirements, and below are the inconsistencies themselves. With «-» are marked the lines, which are going to be deleted by utility, and with «+» those, which are going to be added.
In the end the next options are proposed:

d - to delete the proposed option and leave the old one;
i - to install the proposed option and delete the old one;
m - to compare the old and new options line by line;
v - to view the differences in files again.

In the most cases one can push i, but sometimes it can lead to replacing of your settings with the defaults. So be careful and attentive. For example, I have the exim installed, but the mergemaster proposed to return the file /etc/mail/mailer.conf in its initial state. I don’t need it, so I choose m.
The line-by-line comparison of files is beginning. The screen is divided into two parts, on the left there are lines from the old file, on the right – lines from the proposed one. Pushing the «Enter» outputs the options of further actions:

l - to use the option from the left side;
r - to use the option from the right side;

In my case, I’m pushing l to leave the old settings. After the comparison, the next options are proposed:

i - to install the resulting file;
r - to repeat the comparison of files again;
v - to view the resulting file.

There’s one more possible option when with the new system version the new files appear. In such case, only two options are proposed:

d - to delete the proposed option and to leave the old one;
i - to install the proposed option, deleting the old one.
All files are compared in the same way.

When copying articles, refer to the source!

Интернет-банк Домашний банк от Газпромбанка - современная система управления личным счётом.

Leave a Reply

You must be logged in to post a comment.