Automated and efficient updating of EasyOS
This is very exciting. It has been on the to-do list since the
early days of EasyOS.
Users will know that you can update EasyOS to a new version by
downloading the latest 'easy-*.img.gz' file, clicking on it to
uncompress (.img.gz to .img), then click again to open it up. Then
the files 'vmlinuz', 'initrd' and 'easy.sfs' can be copied to the
boot-partition of the current installation, then click on 'initrd'
to "fix" the BOOT_SPECS file inside the initrd.
That is fairly straightforward, but having to "fix" the initrd is
an awkward extra step, and sometimes people forget.
Also, the 'easy-*.img.gz' file is over 500MB, so it is a big
download, especially if you are on a pay-as-you-go or limited data
account. Also, downloading from ibiblio.org can be slow. What we
really want is to only download the "differences" between current
'easy-*.img.gz' and the latest 'easy-*.img.gz'...
Introducing EasyUpdate, that automates the update, so you don't
have to do that "fix" step, and has the efficient "differences"
download.
I have built Easy 2.3.5, and booting it, there is a new icon on
the desktop, labelled "update":
Click on "update", and EasyUpdate starts, with an introductory
message:
This first version is a CLI application. I will probably add a
GUI down-the-track, but for now, CLI works fine.
After pressing the ENTER key:
Each operation spits out to the terminal, so you have something
to watch while it is doing it's thing.
In this case, there is no later version than 2.3.5, so the script
terminates. However, if a later version is online, then things get
very interesting...
Let's say that there is 'easy-2.3.6-amd64.img.gz' online. Rsync
will compare with a local 'easy-2.3.5-amd64.img.gz' and only
download the differences.
However, and this is the really interesting bit, if you don't
have 'easy-2.3.5-amd64.img.gz', which is probably the case when
you are doing these "difference" downloads, no problem, the script
will create 'easy-2.3.5-amd64.img.gz'.
What the script does, is rebuild 'easy-2.3.5-amd64.img.gz' using
the current 'vmlinuz', 'initrd' and 'easy.sfs' files. Currently,
it is leaving out refind and syslinux boot files, but that doesn't
matter much -- will cause only slight differences in the file.
This file is only temporary, just used by rsync.
There is a requirement when woofQ creates the 'easy-*.img.gz', it
uses the 'gzip' utlity to compress the .img file to .img.gz. The
change now is the "--rsyncable" option must be used, for example:
# gzip --rsyncable easy-2.3.5-amd64.img
That option makes it easier for rsync to discover common chunks
within the two .img.gz files. However, it does make the .img.gz
file a bit bigger. I found that 'easy-2.3.5-amd64.img.gz'
compressed normally was 520MB, compressed with "--rsyncable" was
544MB.
However, and this is the important bit: I did a test upgrade from
2.3.4 to 2.3.5, the former was reconstructed by the script, I
uploaded the latter, then ran rsync, and it only downloaded 45MB
and created 'easy-2.3.5-amd64.img.gz'.
This is fantastic, 45MB, compared with
a full download of 544MB!
That's enough for one post. There will probably be a tutorial
written sometime.
Changing the subject, 2.3.5 has another new desktop UI feature,
more options in the Shutdown menu:
These are all great new features!
Tags: easy