Update Manager provides a graphical interface for keeping the PC-BSD® operating system and its installed applications up-to-date. This utility can be started from Control Panel or by typing pc-updategui. It can also be accessed from its icon in the system tray, if you are logged into a desktop that provides a system tray.
The status of the icon lets you determine at a glance if any of your installed applications are out-of-date, if a system update is available, or if a new version of the operating system is available. Table 7.2a summarizes the possible statuses of this icon.
Table 7.2a: Update Manager Status
If you right-click the icon, you will see the menu shown in Figure 7.2a. As seen in the menu, Update Manager will automatically track updates to software installed using either the graphical or command line equivalents of AppCafe® and Warden®.
By default, updates are checked every 24 hours or 20 minutes after booting the system. However, the system won't check for updates more than once per day should you reboot multiple times within a day. You can check for updates now by selecting "Check for Updates". To disable the update check when the system boots, uncheck the "Run at Startup" box. To disable the pop-up message over the icon when an update becomes available, uncheck the "Display Notifications" box. To also be notified when updates are available to running jails, check the "Check Jails" box. To remove Update Manager from the system tray, click "Quit". You can put the icon back into the tray by typing pc-systemupdatertray &.
How PC-BSD® Updating Works
The PC-BSD® update mechanism provides several safeguards to ensure that updating the operating system or its software is a low-risk operation. Beginning with version 10.1.1, the following steps occur automatically during an update:
- the update automatically creates a copy of the current operating system, known as a snapshot or boot environment, and mounts that snapshot in the background. All of the updates then occur in the snapshot. This means that you can safely continue to use your system while it is updating as no changes are being made to the operating system or any of the applications currently in use. Instead, all changes are being made to the mounted copy.
- once the update is complete, the new boot environment, or updated snapshot, is added as the first entry in the boot menu and activated so that the system will boot into it, unless you pause the boot menu and specify otherwise. A pop-up message, shown in Figure 7.2b, will indicate that a reboot is required. You can either finish what you are doing and reboot now into the upgraded snapshot, or ask the system to remind you again at a later time. To configure the time of the next warning, click the "Next Reminder" drop-down menu where you can select 1, 5, 12, or 24 hours, 30 minutes, or never (for this login session). Note that the system will not apply any more updates or allow you to start another manual update or install additional software using AppCafe® until you reboot.
- as the update is running, a log is written to /var/log/pc-updatemanager.log and is then saved to /var/log/pc-updatemanager-auto.log when the update is complete. This way you can see which software is being updated and if there are any updating errors. The logs can also be viewed in the "View Log" tab of the graphical Update Manager utility, shown in Figure 7.2c.
- you no longer need to initiate updates manually. PC-BSD® now uses an automated updater that automatically checks for updates, no more than once per day, 20 minutes after a reboot and then every 24 hours. You can configure what gets updated using the "Configure Automatic Updates" tab of Update Manager, shown in Figure 7.2d. Choices are "Security & Packages" (all updates), "Security" (only security patches and operating system updates), "Packages" (only installed software), or "Nothing" (disables automatic updating).
Updates can still be initiated manually using either a GUI or a command-line application. The rest of this section demonstrates how to manually update using either the GUI or the command-line method.
Manual Updates (GUI Method)
Beginning in version 10.1.1, the automatic updater will automatically keep your system up-to-date. You will know that an update has completed when the pop-up menu, shown in Figure 7.2b, indicates that a reboot is needed to complete the update process. The automatic updater will only update what it has been configured to update. If you would like to double-check or change what gets updated, start Update Manager, enter your password, and use the drop-down menu in the "Configure Automatic Updates" screen shown in Figure 7.2d.
Due to its schedule, the automatic updater will never check for new updates more than once in a 24 hour period. To manually check for updates, right-click the Update Manager in system tray and click "Check for Updates". Alternatively, start Update Manager. If any updates are available, an "Updates Available" tab will appear, as seen in the example in Figure 7.2e. If no updates are available, this tab will not appear.
In this example, the system has been configured to automatically update "Security & Packages" and a security update is available. Click the "Start Updates" button to manually start the update. When prompted, reboot so that the system can boot into the newly patched operating system.
Figure 7.2f shown an example of a system that has package updates available. The user has clicked the "View Package Updates" box to see which packages will be upgraded.
Manual Updates (CLI Method)
TrueOS® users, or those who prefer to use a command-line utility, can use pc-updatemanager to manually apply updates. If you type pc-updatemanager, it will show its available options:
/usr/local/bin/pc-updatemanager - Usage ---- branches - List available system branches chbranch <tag> - Change to new system branch check - Check for system updates install <tag>,<tag2> - Install system updates pkgcheck - Check for updates to packages pkgupdate - Install packages updates fbsdupdate - Install freebsd-update patches fbsdupdatepkgs - Install freebsd-update patches and any package updates syncconf - Update PC-BSD pkgng configuration confcheck - Check PC-BSD pkgng configurationcron - Perform delayed check for system and pkgng updates.
To determine if any system updates are available, type the following command:
Checking for FreeBSD updates... The following updates are available:
NAME: FreeBSD system update TYPE: System Update
Install: "freebsd-update fetch && freebsd-update install"
NAME: Remove fdescfs TYPE: PATCH TAG: fdesc-rollback-02132014 DETAILS: http://trac.pcbsd.org/wiki/patch-20140211-fdesc DATE: 02-13-2014 SIZE: 1Mb
To install: "pc-updatemanager install fdesc-rollback-02132014"
NAME: PKG conflict detection bug fixes TYPE: PATCH TAG: pkgng-conflict-03122014 DETAILS: http://trac.pcbsd.org/wiki/patch-20140312-updater DATE: 03-12-2014 SIZE: 1MbTo install: "pc-updatemanager install pkgng-conflict-03122014"
If any updates are available, follow the instructions to install each update. For example, this will apply the "Remove fdescfs" patch:
DOWNLOADING: fdesc-rollback-02132014 /usr/local/tmp/patch-fdesc-rollback-02132014.t100% of 312 B 14 kBps 00m00s DOWNLOADFINISHED: fdesc-rollback-02132014 Creating new boot-environment... GRUB configuration updated successfully Created successfully Pruning old boot-environments... TOTALSTEPS: 3 SETSTEPS: 1 umount: /dev/fd: not a file system root directory SETSTEPS: 3INSTALLFINISHED: fdesc-rollback-02132014
If no system updates are available, the check command will indicate "Your system is up to date!".
To determine if package updates are available, use this command:
Updating repository catalogue Upgrades have been requested for the following 253 packages: list of packages snipped The upgrade will require 70 MB more space 439 MB to be downloadedTo start the upgrade run "/usr/local/bin/pc-updatemanager pkgupdate"
In this example, newer versions are available for 253 packages. The list of package names was snipped from the sample output. If no updates were available, the output would have instead said "All packages are up to date!".
If updates are available, you can install them with this command:
Updating repository catalogue snip downloading and reinstalling output [253/253] Upgrading pcbsd-base from 1374071964 to 1378408836... doneExtracting desktop overlay data...DONE
While the output has been snipped from this example, the update process will download the latest versions of the packages which need updating, displaying the download progress for each file. Once the downloads are complete, it will display the reinstallation process for each file. The last step of the update process is to extract the desktop (or server) overlay and then to return the prompt.
After performing any updates, reboot the system.
Upgrading from 9.x to 10.x
Upgrading from 10.x to 10.1.1
Upgrading from any 10.x version to 10.1.1 is the same as applying any package update. This means that the update to 10.1.1 will either appear in Update Manager as a package update, for both "Edge" and "Production" users, or in the listing of pc-updatemanager pkgcheck.