Upgrading the whole system (including packages)

Hello FreeBSD forum!

I just installed FreeBSD for the first time and wanted to upgrade the whole system. (I'm planning on only using the pre-compiled packages, if that matters. And I have ran the
# [B]/usr/sbin/pkg[/B]
command)
But did I understand correctly that if I run
# freebsd-update fetch
# freebsd-update install
# pkg update
# pkg upgrade
then the whole system will be fully upgraded?
(I'm running FreeBSD 11.0-RELEASE)

Thank you
rtb
 
Hello and welcome to the FreeBSD forums.

If by "fully upgraded", you mean up to date with the latest security advisories for the current version (11.0-R in your case), then yes # freebsd-update fetch and # freebsd-update install is the proper way to do it.

As for packages, # pkg upgrade is enough.

If I'm not mistaken, by default it upgrades to the quarterly-built packages. To override that, follow the instructions found in /etc/pkg/FreeBSD.conf. An example of /usr/local/etc/pkg/repos/FreeBSD.conf would be:
Code:
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
}
Packages in a latest repository are rebuilt every few weeks (typically 2) while packages in a quarterly repository are rebuilt every quarter of a year or so.
 
Okay great, thank you!
So the base system (I'm thinking kernel etc.) isn't upgraded between minor/major releases? Or is it also handled with # pkg upgrade?
 
freebsd-update handles any kernel and base changes to the operating system. Remember that FreeBSD is a complete operating system and not just a kernel. But packages and ports are not part of that. So the kernel is never updated with ports or packages.
 
  • Thanks
Reactions: rtb
So the base system (I'm thinking kernel etc.) isn't upgraded between minor/major releases? Or is it also handled with # pkg upgrade?
No to both.

Upgrading to a new release (minor or major) requires a few more commands. Everything is well documented. Read section 23.2.3. in the Handbook, and preferably the entire chapter.

Also make sure to check the "Announcement" documents for your respective version. They may have specific commands that sometimes differ slightly from the standard procedure and spare you some trouble when upgrading.

Like drhowarddrfine said before, the kernel and base are unified in FreeBSD, so they're installed and upgraded together and are always in sync. Ports/packages are separate. So tools that tackle system and port/package upgrades are different (but some of this may change in the future with PkgBase).
 
  • Thanks
Reactions: rtb
freebsd-update handles any kernel and base changes to the operating system.
Okay great, thanks for clearing that up!

Remember that FreeBSD is a complete operating system and not just a kernel.
Yes, one of the reasons I changed to BSD (goodbye Debian!) and I guess I'm just adjusting my mindset :)

No to both.

Upgrading to a new release (minor or major) requires a few more commands. Everything is well documented. Read section 23.2.3. in the Handbook, and preferably the entire chapter.

Also make sure to check the "Announcement" documents for your respective version. They may have specific commands that sometimes differ slightly from the standard procedure and spare you some trouble when upgrading.

Like drhowarddrfine said before, the kernel and base are unified in FreeBSD, so they're installed and upgraded together and are always in sync. Ports/packages are separate. So tools that tackle system and port/package upgrades are different (but some of this may change in the future with PkgBase).
Yes I tried to read up on that chapter, but for some reason it didn't really seem clear to me what excactly freebsd-update handled. Maybe I'm a little slow haha.
And secondly (again, sorry for being slow!) no as in "No, the base system is not upgraded between releases. Only security patches are installed with freebsd-update fetch and freebsd-update install." Or am I misunderstanding something?

As you may have guessed I came from linux systems where the base system and core libraries could be upgradeded between releases.

Once again, thank you all. It is greatly appreciated.
 
freebsd-update(8):
fetch Based on the currently installed world and the configuration options set, fetch all available binary updates.
[...]
upgrade Fetch files necessary for upgrading to a new release.
During minor or major upgrades, the entire system (both the kernel and the base) is modified. In a properly working system, the kernel and base are always in sync. The one and only time they aren't is during the # freebsd-update upgrade process between reboots.

The # freebsd-update fetch and # freebsd-update install process is usually limited, with only a small set of files being affected. Depending on the problem being fixed, this can mean files in the base, or the kernel and its modules, or both of these.
 
Shame this isn't more well known, I have to say if Fbsd had a wiki like Arch or Gentoo things would be a lot better for everyone. It's this little type of thing that is overlooked or not even mentioned in the handbook. This isn't a knock and I know the handbook does a good job for what it is but this type of knowledge has to be documented in an easy to find format.

Hello and welcome to the FreeBSD forums.

If by "fully upgraded", you mean up to date with the latest security advisories for the current version (11.0-R in your case), then yes # freebsd-update fetch and # freebsd-update install is the proper way to do it.

As for packages, # pkg upgrade is enough.

If I'm not mistaken, by default it upgrades to the quarterly-built packages. To override that, follow the instructions found in /etc/pkg/FreeBSD.conf. An example of /usr/local/etc/pkg/repos/FreeBSD.conf would be:
Code:
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
}
Packages in a latest repository are rebuilt every few weeks (typically 2) while packages in a quarterly repository are rebuilt every quarter of a year or so.
 
dak I believe it is mentioned--without looking myself--and I think the man page covers it, too. Too often people forget about the man page and it is usually the authority on how things work.
 
Shame this isn't more well known, I have to say if Fbsd had a wiki like Arch or Gentoo things would be a lot better for everyone.
I sincerely doubt that. Even so, FreeBSD already has a wiki.

You can easily find it on the main website.

It's this little type of thing that is overlooked or not even mentioned in the handbook.
Actually it is. The introduction mentions this aspect a few times, and the chapters about upgrading FreeBSD and installing additional software also mention this fact several times.

I do agree that some aspects can be easy to overlook but I think that's more of a problem with the reader than the documentation itself. FreeBSD, by nature, is all about details. This even manifests itself in the manualpages. Ergo: you actually need to pay attention, also to things which may seem unimportant.

Still, if you feel this way then nothing is stopping you from trying and add your own contributions.
 
freebsd-update(8):

During minor or major upgrades, the entire system (both the kernel and the base) is modified. In a properly working system, the kernel and base are always in sync. The one and only time they aren't is during the # freebsd-update upgrade process between reboots.

The # freebsd-update fetch and # freebsd-update install process is usually limited, with only a small set of files being affected. Depending on the problem being fixed, this can mean files in the base, or the kernel and its modules, or both of these.

Sorry, but after long time.

Is this possible in one line too:
# freebsd-update fetch install
 
After I run the command freebsd-update fetch install, I get an END blinking and am not able to go to any other commands. What are some thoughts as to how to actually be able to install the updates.
 
Back
Top