My poor friend, I was you a couple of years ago. I had the same questions. There are three things you need to be prepared for when upgrading FreeBSD:
less will present you a bunch of binaries that are about to change and the installation will not continue until you quit by pressing q.
- Using
vi as your editor. Some online vimtutor website helped me with that. Takes less than an hour.
- Mergemaster syntax
Regarding your "merge conflict", read and try to understand what has changed. Oftentimes only some header comments are changed, this is not critical at all. If you made manual pre-upgrade changes to important files such as
sshd_config, then you do want to inspect closely which part is identified as merge conflict.
You drop into
vi because of a merge conflict mostly for 2 reasons:
- You customised some configuration file.
- You are upgrading from a little too outdated FreeBSD version to the latest RELEASE available or a RELEASE too far away from what you are currently running. Your life will be easier of you don't skip too many minor FreeBSD versions, like 14.1 --> 14.3 is probably OK. Avoid skipping a full major version upgrade, e.g. 13.1 --> 15.0 will not make you happy (but smarter, if you troubleshoot your way out of the mess you probably encounter)
You resolve merge conflicts by removing the merge conflict markers. Use your brain or at least your intuition when you do that.
What are merge conflict markers? This:
<<<<<, this:
======, and this:
>>>>>
Example:
Code:
<<<
existing/old stuff in the file you have to edit using the vi editor. stuff that you may wish to keep, for example:
a highly customised sshd_config file or
a customised wheel group defined in /etc/group that not only has root but also your normal user as a member
====
new stuff, suggested by freebsd-update, usually removing your customisations
>>>>
To resolve the merge conflict, you not only have to remove any line that looks like this:
<<<<<, this:
======, and this:
>>>>>,
you also have to make a decision if you want to keep the old or the new stuff (see example above). Do not keep both, new and old. If you don't know what to do, research what the file in question does and then make a choice. Write-quit
vi the normal way when you are done with resolving the merge conflict and expect to manually resolve another one shortly after.