site  news  contact

Easy version upgrade and downgrade

August 11, 2020 — BarryK

Page updated March 17, 2019. Last update August 11, 2020

A significant feature of EasyOS is the ease of upgrading to new versions, and rollback to older versions and snapshots, and roll-forward again.

A fully-automatic GUI could be created for this, for now it is partially-GUI with some manual steps -- very easy steps though, and possibly more personally satisfying to have that personal input than have everything done automatically.

As from EasyOS 2.3.8, updating is now fully automated, via an icon on the desktop. The manual method still works and and at the risk of cluttering up this page somewhat, both methods are explained. To clearly distinguish the new automatic method, it is shown in bold green text. 

Any installation of EasyOS can be upgraded and downgraded, whether running off a USB-stick or an internal drive.

The case study in this tutorial is the installation to Kingston 240GB SSD that the Author performed on his Mele PCG35 Apo mini-PC, see that tutorial here:

The Mele PCG35 Apo has 32GB SSD on-board, with interfaces for 2.5inch SATA3 HDD/SSD and M.2 SSD. It is a nice unit, passively-cooled and with snappy performance. A snapshot taken soon after it arrived, booting up Easy from a USB-stick:


Here, in a nutshell, is how to upgrade:

How to upgrade
Replace the three files
vmlinuz, initrd and easy.sfs in the boot-partition, with those of the new version.
Click on
initrd to automatically "fix" the BOOT_SPECS file inside it.
Reboot, and you have upgraded.

...that's it, you have upgraded! It is easy-peasy. We don't really need a tutorial, however it is useful to read through the rest of this tutorial to get clear confirmation of the steps and some explanation of how-and-why.

How to upgrade
New automatic method, click the "update" icon on the desktop:


In the case study, Easy is installed to drive sda. The Author set the boot-partition as sda1, vfat filesystem, and sda2 is the working-partition, ext4 filesystem. He also set WKG_DIR='easy' in the BOOT_SPECS file, so that Easy will do its "thing" in /mnt/sda2/easy, keeping everything clear of the rest of the partition, making it simpler to use the rest of sda2 for anything else.

Here is a view of the content of the "easy" folder, showing folders that Easy has created:


...if you would like to read some more about those folders, see here: 

Now for the great part, the actual upgrade...

Upgrading the boot-partition

Firstly describing the manual method:

You need to obtain the new version of EasyOS. This could be the .img.gz image-file, or you may already have written to a USB-stick.

Whatever, it will have inside it, the files vmlinuz, initrd and easy.sfs. if it is the *.img.gz file, all that you have to do is click on it twice -- first time will uncompress it, second time will open it up -- in practice, you will find that is quite simple.

For the case-study, the Author has the new version on a USB-stick. When plugged-in it showed up as drive sdb. So, upgrading simply consists of replacing those files in the boot-partition, by dragging, as shown:


...sda1 is the boot-partition, in the Kingston SSD, and the files have been upgraded by dragging across.

There is just one more teensy thing to do. File initrd has inside it a file named BOOT_SPECS, that has some variables needed at bootup. Those variables are OK for initrd in the USB-stick, but need to be fixed in the new location.

Fortunately, this fix is automated. Just click on initrd, and this pops up:

image3 is quite safe to choose "Yes" here, despite that caution. Then, another window pops up:


You do need to look carefully at those variables, make sure they are correct. Auto-fixing was not quite right in versions prior to 1.0.12, but now it is looking good.

They are pretty self-explanatory. Every partition has a unique UUID (Universal Unique Identifier), so BOOT_UUID is the UUID of the boot-partition, WKG_UUID the UUID of the working-partition.

If you want to confirm that the auto-fixing got it right, open a terminal and run blkid, like this:

# blkid /dev/sda1
/dev/sda1: UUID="1D44-5E30" TYPE="vfat"

Notice WKG_DIR='easy/', which, as mentioned early in this tutorial, was the Author's decision. The trailing "/" is required, but if you leave it off, no problem, as the scripts that read this file will append it if missing.

If you had left WKG_DIR='', then Easy would create all those working folders "containers", "home", "releases", "sfs", etc., at the top-level of the working-partition.

One tiny extra note: depending on which version of EasyOS you are using, file BOOT_SPECS may have one or two more variables in it -- just leave those as-is, they are not relevant to upgrading.

Those variables in the above snapshot look good, so click "Yes", and installation is done. Next, reboot...

The automatic method requires that you click the "update" icon on the desktop of your running EasyOS. These snapshots show updating from version 2.3 to 2.3.5. After clicking the desktop icon (or from the menu Filesystem -> EasyUpdate)... 


...yes, currently it is a text-mode script. It doesn't matter if you don't have the current *.img.gz file, the script can reconstruct it, from the files 'vmlinuz', 'initrd' and 'easy.sfs'. Press ENTER, to reconstruct 'easy-2.3-amd64.img.gz'... 


Now it is downloading 'easy-2.3.5-amd64.img.gz'. The file is 544MB, so it will be very interesting how much rsync is able to reduce the size of the download... 


...great, the download was only 120MB, so a significant saving. Press ENTER to continue... 


...success, updated! 

Version management

After rebooting, you will be running the new version, The snapshot below shows an older upgrade, the Author upgraded from 0.9.13 to 0.9.14. At the time of writing, Easy has reached 1.0.12, but the earlier snapshot gives you the idea about how the version management GUI works.

It is fruitful to have a look around in those "releases" and "sfs" folders -- you will see that the older versions are still there.

Which means that you can roll back to an earlier version if desired, or to any earlier snapshot. There is a really great GUI to handle this, via the Filesystem menu:


And here is Easy Version Control:

image6 this example, the Author had created one snapshot, "Snapshot 201812172141". The other one, "Release 0.9.13" is the status at first startup of version 0.9.13.

"Release 0.9.14" is the status at first startup of version 0.9.14.

The really great thing is, you can roll forwards and backwards to any of these "Release*" and "Snapshot*" status captures.

Technically, what is being referred here as the "status" is the content of the /mnt/wkg/.session folder, which is the read-write folder in the aufs/overlay layered filesystem.

Note the little button with picture of a page -- click on that to see commentary on snapshots, which makes it easier to decided what snapshot you might like to roll back/forward to.

Note also, the "Depth" parameter, set to "3". This means that the history is set to only three versions. When you make the fourth version upgrade, the oldest one is deleted. This is to save space.

In the Author's case, having the 240GB SSD to play in, he will probably increase that depth. Not that most users would want to roll back many versions, but it is something that developers might want to do.


As you can see from the above GUI snapshot, it does a lot more, such as snapshots and rollback for containers. That is pretty much self-explanatory when you play with it.

The secret of such easy upgrading and downgrading is, of course, due to everything being in a single squashfs file, easy.sfs (and use of the aufs/overlay filesystem). Unlike many other distributions that have to do a per-package upgrade. 

(c) Copyright Barry Kauler, December 2018, March 2019, August 2020, all reproduction rights reserved.
A disclaimer: Barry Kauler has provided these instructions in good faith, however there is a disclaimer of all responsibility if something does go wrong. It shouldn't, but if you type in something incorrectly and wipe your C: drive, that is entirely your own responsibility. If in doubt, find a Linux-knowledgeable guy to help. 

Tags: user