Bering-uClibc 5.x - User Guide - Upgrade LEAF Bering-uClibc

From bering-uClibc
Revision as of 15:52, 13 December 2015 by Kapeka (Talk | contribs) (Upgrade LEAF Bering-uClibc)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Upgrade LEAF Bering-uClibc
Bering-uClibc 5.x - User Guide

Upgrade LEAF Bering-uClibc

Starting with LEAF Bering-uClibc 5.2.2 the new tool upgrade is available. It allows to upgrade your LEAF software online using the git-based Packages repository at


upgrade is a command line tool. Establish a terminal connection to your LEAF box and run upgrade with your preferred options. Without any option, upgrade will use the current stable version as defined on the repository server. Options you can use with upgrade are shown below.

SALT# upgrade --help
Usage: upgrade [-s] [-c] [-vv | --vvv] [--stable | --latest | --release x.y.z] [--compact-modules] [-u | --use_apkg]

-c			just check the version on the server
-s			be silent
-vv | -vvv		be more chatty  
--stable		upgrade to stable release, this is the default behaviour
--latest		upgrade to latest release
--release x.y.z		upgrade to release x.y.z
--compact_modules	remove unloaded modules
-u | --use_apkg		use apkg -u to handle modified packages
			instead of the internal routines
-h | --help		show this page


Your LEAF box must have the software stored on a RW medium, which excludes all CD based systems. There must be some free space on the storage medium as the distribution tends to grow. You need a working internet connection and use either shorewall as your firewalling software or your router must be able to open a http connection to

How does it work

upgrade connects to the git repository at and tries to find the software you specified according to the chosen options. It investigates the running system, selects the Packages to be upgraded and downloads modified Packages to your storage media. upgrade then inspects your configuration files and tries to detect the modifications you made. It patches the new configuration files using those modifications with the goal to provide a seamless upgrade. All operations are logged to syslog with the syslog facility local0 for you to inspect and, if needed, fix inconsistencies before you reboot the system. If a configuration file cannot be patched safely, copies of the old and new files are left in the /tmp directory. If an error occurs by upgrade, it returns a non null status code. If you decide to look into your changes manually, the option -u lets you invoke the apkg tool with option -u, to check and select your configuration files for each package. You must save the newly built configuration files to storage before you reboot.

Suggestions and hints

Before you start upgrade, save your configuration files using the web GUI or leaf.cfg. Save your current software by connecting to the LEAF box and copying everything from storage using a tool like scp. It is advised, to run upgrade on a dual boot system, so you have a fallback in case a problem booting the new software occurs.


Check for the current stable release

SALT# upgrade -c

Check for the latest available release

SALT# upgrade -c –latest

Run upgrade to latest

SALT# upgrade –latest
upgrade: starting
upgrade: retrieve
upgrade: retrieve
upgrade: retrieve
upgrade: retrieve
upgrade: retrieve
upgrade: retrieve
upgrade: retrieve
upgrade: build /tmp/moddb.lrp
upgrade: retrieve
upgrade: retrieve
upgrade: retrieve
upgrade: retrieve
upgrade: retrieve
upgrade: upgrade terminated successfully