Updating from source and custom kernel

Installing and upgrading FreeBSD.

Updating from source and custom kernel

Postby gpatrick » 26 May 2012, 00:45

The steps I have for updating from source (from the 6 or 7 release timeframe):
Code: Select all
# csup -g -L 2 standard-supfile
# cd /usr/src
# make cleanworld && make cleandir
# make buildworld
# make buildkernel KERNCONF=CUSTOM
# make installkernel KERNCONF=CUSTOM
# nextboot -o "-s" -k kernel
# reboot
# fsck -p
# mount -u /
# mount -a -t ufs
# swapon -a
# mergemaster -p
# cd /usr/src
# make installworld
# make delete-old
# mergemaster -Ui
# portsnap fetch update
# portmaster -Da
# reboot
# cd /usr/src
# make delete-old-libs


In the handbook I read these are the current steps:
Code: Select all
# cd /usr/src
# make buildworld
# make buildkernel KERNCONF=MYKERNEL
# make installkernel KERNCONF=MYKERNEL
# shutdown -r now
(boot -s from loader prompt)
# mount -u /
# mount -a -t ufs
# adjkerntz -i
# mergemaster -p
# cd /usr/src
# make installworld
# mergemaster
# reboot


As you can see they are mostly the same except for some slight differences, such as,

1) I run a [cmd=]swapon[/cmd] and handbook doesn't say to.
2) After the first reboot into single user mode, the handbook has [cmd=]mergemaster[/cmd] without any options, whereas I use -Ui
3) I run a [cmd=]make delete-old[/cmd] and the handbook doesn't.
4) After a reboot I run a [cmd=]make delete-old-libs[/cmd] but the handbook doesn't.
5) Why [cmd=]adjkerntz -i[/cmd] after updating?

Can someone explain these differences to me and if my method needs to be updated to change those few steps?
gpatrick
Member
 
Posts: 296
Joined: 21 Jul 2009, 00:18

Postby kpa » 26 May 2012, 08:24

2) the [FILE]-U[/FILE] option updates all files that have not been user modified automatically, the manual page says that this can be dangerous if there are major changes to the files that require changes to configuration. I use the [FILE]-F[/FILE] flag instead that leaves files that have really changed or have my own modifications for my review, files that differ only by their version control ids are updated automatically with the [FILE]-F[/FILE] flag. If run without any flags [man=8]mergemaster[/man] will ask about every single file if you want to update them.

3) and 4) are optional in most cases but required if you upgrade to a higher major version, for example from 8.x to 9.0 or 9-STABLE.

5) is needed to set the system time correctly, it's best run as the first step in single user mode even before mounting the filesystems.
kpa
MFC'd
 
Posts: 3398
Joined: 05 Jul 2010, 13:19
Location: People's Technocratic Republic of Finland


Return to Installing & Upgrading

Who is online

Users browsing this forum: wblock@ and 1 guest