Home / Home Lab / EVE-NG / How to Upgrade EVE-NG Without Looking Stupid

How to Upgrade EVE-NG Without Looking Stupid

In the following blog post I am explaining the quick method to avoid issues when upgrading your EVE-NG software to the latest version.
My own copy of EVE-NG is 2.0.3-59
Connect with SSH to the EVE-NG VM. Check the current version.

root@eve-ng:~# dpkg -l eve-ng
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  eve-ng         2.0.3-59     amd64        A new generation software for net
root@eve-ng:~#

do this command

/opt/unetlab/wrappers/unl_wrapper -a stopall

Check available free space on the boot partition

root@eve-ng:~# df -h
Filesystem                    Size  Used Avail Use% Mounted on
udev                          1.8G     0  1.8G   0% /dev
tmpfs                         369M   11M  358M   3% /run
/dev/mapper/eve--ng--vg-root   33G   15G   17G  46% /
tmpfs                         1.8G     0  1.8G   0% /dev/shm
tmpfs                         5.0M     0  5.0M   0% /run/lock
tmpfs                         1.8G     0  1.8G   0% /sys/fs/cgroup
/dev/sda1                     472M  372M  100M  78% /boot

You will see a lot of old files.

root@eve-ng:/boot# ls -l
total 462003
-rw-r--r-- 1 root root  1249214 Nov 10 22:41 abi-4.4.0-101-generic
-rw-r--r-- 1 root root  1244118 Jan 18  2017 abi-4.4.0-62-generic
-rw-r--r-- 1 root root  1246311 May 18  2017 abi-4.4.0-79-generic
-rw-r--r-- 1 root root  1246311 Jun 14 15:24 abi-4.4.0-81-generic
-rw-r--r-- 1 root root  1246511 Jun 26 22:45 abi-4.4.0-83-generic
-rw-r--r-- 1 root root  1246670 Jul 18 18:00 abi-4.4.0-87-generic
-rw-r--r-- 1 root root  1246835 Aug  1 01:25 abi-4.4.0-89-generic
-rw-r--r-- 1 root root  1246835 Aug  8 16:58 abi-4.4.0-91-generic
-rw-r--r-- 1 root root  1246835 Aug 10 14:02 abi-4.4.0-92-generic
-rw-r--r-- 1 root root  1247269 Aug 12 02:40 abi-4.4.0-93-generic
-rw-r--r-- 1 root root  1249161 Sep 12 20:59 abi-4.4.0-96-generic
-rw-r--r-- 1 root root  1249112 Sep 19 23:29 abi-4.4.0-97-generic
-rw-r--r-- 1 root root  1249237 Oct 10 19:19 abi-4.4.0-98-generic
-rw-r--r-- 1 root root   190489 Nov 10 22:41 config-4.4.0-101-generic
-rw-r--r-- 1 root root   190047 Jan 18  2017 config-4.4.0-62-generic
-rw-r--r-- 1 root root   190356 May 18  2017 config-4.4.0-79-generic
-rw-r--r-- 1 root root   190356 Jun 14 15:24 config-4.4.0-81-generic
-rw-r--r-- 1 root root   190356 Jun 26 22:45 config-4.4.0-83-generic
-rw-r--r-- 1 root root   190356 Jul 18 18:00 config-4.4.0-87-generic
-rw-r--r-- 1 root root   190356 Aug  1 01:25 config-4.4.0-89-generic
-rw-r--r-- 1 root root   190356 Aug  8 16:58 config-4.4.0-91-generic
-rw-r--r-- 1 root root   190356 Aug 10 14:02 config-4.4.0-92-generic
-rw-r--r-- 1 root root   190356 Aug 12 02:40 config-4.4.0-93-generic
-rw-r--r-- 1 root root   190517 Sep 12 20:59 config-4.4.0-96-generic
-rw-r--r-- 1 root root   190517 Sep 19 23:29 config-4.4.0-97-generic
-rw-r--r-- 1 root root   190517 Oct 10 19:19 config-4.4.0-98-generic
-rw-r--r-- 1 root root   188144 Dec 20  2016 config-4.4.14-eve-ng-ukms+
-rw-r--r-- 1 root root   201279 Sep 15 02:58 config-4.9.40-eve-ng-ukms-2+
drwxr-xr-x 5 root root     1024 Nov 25 20:13 grub
-rw-r--r-- 1 root root 19896419 Nov 25 18:49 initrd.img-4.4.0-101-generic
-rw-r--r-- 1 root root 18194247 Apr 12  2017 initrd.img-4.4.0-62-generic
-rw-r--r-- 1 root root 18624391 Jun 12 19:28 initrd.img-4.4.0-79-generic
-rw-r--r-- 1 root root 19891453 Jun 20 06:30 initrd.img-4.4.0-81-generic
-rw-r--r-- 1 root root 19889697 Jun 28 23:26 initrd.img-4.4.0-83-generic
-rw-r--r-- 1 root root 19887938 Jul 24 20:05 initrd.img-4.4.0-87-generic
-rw-r--r-- 1 root root 19894643 Aug  4 01:23 initrd.img-4.4.0-89-generic
-rw-r--r-- 1 root root 19894188 Aug 12 12:40 initrd.img-4.4.0-91-generic
-rw-r--r-- 1 root root 19893705 Aug 15 12:46 initrd.img-4.4.0-92-generic
-rw-r--r-- 1 root root 19894580 Aug 28 18:47 initrd.img-4.4.0-93-generic
-rw-r--r-- 1 root root 19896946 Sep 23 16:40 initrd.img-4.4.0-96-generic
-rw-r--r-- 1 root root 19897213 Oct 15 15:56 initrd.img-4.4.0-97-generic
-rw-r--r-- 1 root root 19898024 Nov  4 22:59 initrd.img-4.4.0-98-generic
-rw-r--r-- 1 root root 31940341 Jun 12 20:05 initrd.img-4.4.14-eve-ng-ukms+
drwx------ 2 root root    12288 Apr 11  2017 lost+found
-rw------- 1 root root  3887614 Nov 10 22:41 System.map-4.4.0-101-generic
-rw------- 1 root root  3875553 Jan 18  2017 System.map-4.4.0-62-generic
-rw------- 1 root root  3883279 May 18  2017 System.map-4.4.0-79-generic
-rw------- 1 root root  3883391 Jun 14 15:24 System.map-4.4.0-81-generic
-rw------- 1 root root  3883887 Jun 26 22:45 System.map-4.4.0-83-generic
-rw------- 1 root root  3884173 Jul 18 18:00 System.map-4.4.0-87-generic
-rw------- 1 root root  3884798 Aug  1 01:25 System.map-4.4.0-89-generic
-rw------- 1 root root  3884798 Aug  8 16:58 System.map-4.4.0-91-generic
-rw------- 1 root root  3884798 Aug 10 14:02 System.map-4.4.0-92-generic
-rw------- 1 root root  3885811 Aug 12 02:40 System.map-4.4.0-93-generic
-rw------- 1 root root  3886723 Sep 12 20:59 System.map-4.4.0-96-generic
-rw------- 1 root root  3886693 Sep 19 23:29 System.map-4.4.0-97-generic
-rw------- 1 root root  3887471 Oct 10 19:19 System.map-4.4.0-98-generic
-rw------- 1 root root  3819327 Dec 20  2016 System.map-4.4.14-eve-ng-ukms+
-rw------- 1 root root  3640420 Sep 15 03:43 System.map-4.9.40-eve-ng-ukms-2+
-rw------- 1 root root  7104240 Nov 10 22:41 vmlinuz-4.4.0-101-generic
-rw------- 1 root root  7070992 Jan 18  2017 vmlinuz-4.4.0-62-generic
-rw------- 1 root root  7091696 May 18  2017 vmlinuz-4.4.0-79-generic
-rw------- 1 root root  7092784 Jun 14 15:24 vmlinuz-4.4.0-81-generic
-rw------- 1 root root  7092720 Jun 26 22:45 vmlinuz-4.4.0-83-generic
-rw------- 1 root root  7095888 Jul 18 18:00 vmlinuz-4.4.0-87-generic
-rw------- 1 root root  7098096 Aug  1 01:25 vmlinuz-4.4.0-89-generic
-rw------- 1 root root  7097936 Aug  8 16:58 vmlinuz-4.4.0-91-generic
-rw------- 1 root root  7098032 Aug 10 14:02 vmlinuz-4.4.0-92-generic
-rw------- 1 root root  7097296 Aug 12 02:40 vmlinuz-4.4.0-93-generic
-rw------- 1 root root  7101968 Sep 12 20:59 vmlinuz-4.4.0-96-generic
-rw------- 1 root root  7102864 Sep 19 23:29 vmlinuz-4.4.0-97-generic
-rw------- 1 root root  7103856 Oct 10 19:19 vmlinuz-4.4.0-98-generic
-rw------- 1 root root  6979952 Dec 20  2016 vmlinuz-4.4.14-eve-ng-ukms+
-rw------- 1 root root  7264000 Sep 15 03:43 vmlinuz-4.9.40-eve-ng-ukms-2+
root@eve-ng:/boot#

delete the old files only, for example the files that age months ago. Here is an example:

rm vmlinuz-4.4.0-83-generic vmlinuz-4.4.0-89-generic

do so until you leave only a couple of recent files.
Then do the following sequence of commands:

sudo dpkg --configure -a
sudo apt-get install -f
 sudo apt-get autoremove
 sudo apt-get update
 sudo apt-get dist-upgrade 

You will notice a lot of space has been freed up.

root@eve-ng:~# df -h
Filesystem                    Size  Used Avail Use% Mounted on
udev                          1.8G     0  1.8G   0% /dev
tmpfs                         369M   11M  358M   3% /run
/dev/mapper/eve--ng--vg-root   33G   15G   17G  46% /
tmpfs                         1.8G     0  1.8G   0% /dev/shm
tmpfs                         5.0M     0  5.0M   0% /run/lock
tmpfs                         1.8G     0  1.8G   0% /sys/fs/cgroup
/dev/sda1                     472M  124M  324M  28% /boot

Now continue the normal upgrade procedure.

apt-get update
apt-get dist-upgrade

My EVE-NG machine was successfully upgraded.

root@eve-ng:~# dpkg -l eve-ng
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  eve-ng         2.0.3-86     amd64        A new generation software for net
root@eve-ng:~#
Top Courses in IT & Software 300x250

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Adsense black background: