Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post Reply
rockla
Posts: 313
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: English
ODROIDs: C1,C2,N2+
Has thanked: 2 times
Been thanked: 1 time
Contact:

Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by rockla »

How to upgrade without losing anything ?

User avatar
mad_ady
Posts: 10148
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 815 times
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by mad_ady »

First of all, do a full backup (either with dd, odroid-backup, or some other method).
Next, run sudo apt-get dist-upgrade and reboot. And try sudo do-release-upgrade. It will disable 3rd party repos, likw hardkernel's, so aftwr upgrade you'll need to reenable it and do apt-get dist-upgrade once more.
If it complains about python2, search the net - it's a common problem.

rockla
Posts: 313
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: English
ODROIDs: C1,C2,N2+
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by rockla »

mad_ady wrote:
Wed Dec 02, 2020 4:33 pm
First of all, do a full backup (either with dd, odroid-backup, or some other method).
Next, run sudo apt-get dist-upgrade and reboot. And try sudo do-release-upgrade. It will disable 3rd party repos, likw hardkernel's, so aftwr upgrade you'll need to reenable it and do apt-get dist-upgrade once more.
If it complains about python2, search the net - it's a common problem.

What exactly would be disabled i have backed my sources.list though i see it is creating backp with distUpgrade as file ? What do i need to revert ?

User avatar
mad_ady
Posts: 10148
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 815 times
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by mad_ady »

After you run do-release-upgrade it will calculate what needs to be done and then it will tell you (if there are no issues) what packages will be uninstalled, what is new and what is to be upgraded. You can safely abort the upgrade at this step if you want to.

rockla
Posts: 313
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: English
ODROIDs: C1,C2,N2+
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by rockla »

I went with upgrade everything worked well.
These users thanked the author rockla for the post:
mad_ady (Tue Jan 19, 2021 11:20 pm)

rockla
Posts: 313
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: English
ODROIDs: C1,C2,N2+
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by rockla »

Is there a upgrade coming to 20.10 ?

User avatar
mad_ady
Posts: 10148
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 815 times
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by mad_ady »

You'd need to change APT to look for non LTS releases. However, I wouldn't recommend it, because HardKernel doesn't have non-LTS repos for C2, so if you upgrade, you'd lose kernel/uboot and some other packages. It's best to way wait for 22.04.

eldesperado
Posts: 8
Joined: Sun Feb 26, 2017 6:44 pm
languages_spoken: english
ODROIDs: C2
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by eldesperado »

mad_ady wrote:
Wed Mar 31, 2021 3:20 pm
you'd lose kernel/uboot and some other packages. It's best to way wait for 22.04.
What does that mean, to lose kernel/uboot, in practical terms?

Another comment (above) said it worked well for them, so I'm curious what's the significance of losing custom kernel/uboot.
And Ubuntu 20.04 kernel seems available (now) at https://wiki.odroid.com/odroid-c2/os_im ... ntu/ubuntu.

I use my C2 as a "micro server", so as long as it runs and the network works, I'd be willing to try...

Also, does anyone know 22.04 will be supported on C2? If it's not sure, then I might as well try now...

User avatar
odroid
Site Admin
Posts: 38528
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2211 times
Been thanked: 1295 times
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by odroid »

We have no plan to release Ubuntu 22.04 image for C1/C2 series due to our limited resources. Sorry about that.
Note that Ubuntu 20.04 packages will be maintained until middle of '2025 by Canonical.
These users thanked the author odroid for the post:
eldesperado (Thu Dec 02, 2021 9:10 pm)

User avatar
mad_ady
Posts: 10148
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 815 times
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by mad_ady »

I meant you'd lose updates for kernel/uboot. Granted, c2 is EOL now, so I don't expect huge updates in the future...
Unless the update process uninstalls the kernel, you should be ok.
You can try dist-upgrading to 22.04, but I'd do it only after backup, and after 22.04 has been officially released.
These users thanked the author mad_ady for the post:
eldesperado (Thu Dec 02, 2021 9:08 pm)

eldesperado
Posts: 8
Joined: Sun Feb 26, 2017 6:44 pm
languages_spoken: english
ODROIDs: C2
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by eldesperado »

@odroid, that's fine, I didn't expect it, as C2 is a bit old (I do have the C2 successor with 20.04, runs great).

@mad_ady, so dist-upgrade on Ubuntu 18.04 on C2 doesn't do anything for me, with either -c or -d, and I also tried changing lts to normal. Should I replace APT sources or how else to get it to work (apart from reimaging the unit)?

User avatar
mad_ady
Posts: 10148
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 815 times
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by mad_ady »

Try sudo do-release-upgrade

eldesperado
Posts: 8
Joined: Sun Feb 26, 2017 6:44 pm
languages_spoken: english
ODROIDs: C2
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by eldesperado »

Code: Select all

user@c2:~$ sudo apt-get update; sudo apt-get upgrade
Get:1 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]
Hit:2 http://ppa.launchpad.net/longsleep/golang-backports/ubuntu bionic InRelease                          
Hit:3 http://ports.ubuntu.com/ubuntu-ports bionic InRelease                                              
Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease [88.7 kB]                            
Hit:5 http://archive.canonical.com/ubuntu bionic InRelease                          
Hit:6 http://deb.odroid.in/c2 bionic InRelease                                               
Get:7 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease [74.6 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease [88.7 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted Sources [24.5 kB]
Get:10 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main Sources [519 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 Packages [1,390 kB]
Get:12 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main Translation-en [448 kB]
Get:13 http://ports.ubuntu.com/ubuntu-ports bionic-updates arm64 Contents (deb) [119 MB]
Get:14 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted Translation-en [76.4 kB]                                                   
Get:15 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe arm64 Packages [1,577 kB]                                                    
Get:16 http://ports.ubuntu.com/ubuntu-ports bionic-security arm64 Contents (deb) [111 MB]                                                        
Fetched 234 MB in 4min 54s (797 kB/s)                                                                                                            
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Code: Select all

user@c2:~$ sudo do-release-upgrade -c
Checking for a new Ubuntu release
Upgrades to the development release are only 
available from the latest supported release.

Code: Select all

user@c2:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Code: Select all

user @c2:~$ sudo do-release-upgrade -c
Checking for a new Ubuntu release
Upgrades to the development release are only 
available from the latest supported release.

Code: Select all

user@c2:~$ sudo do-release-upgrade -d
Checking for a new Ubuntu release
Upgrades to the development release are only 
available from the latest supported release.
--
I also tried the above with "lts" and "normal".

As I mentioned, I have a C4 with Ubuntu 20.04.3 LTS. There doing do-dist-upgrade updated two packages: linux-libc-dev linux-tools-common.

On C2 (Ubuntu 18.04.6 LTS), I found update-manager-core wasn't installed, so I installed it (version 18.04.11.13). But that didn't make any difference, so I wonder if I should just change bionic to focal in all APT sources and run an update.

That's what I'm doing now, but it's going to take some time for this monster apt-upgrade to complete (or not).

EDIT:

- upgrade worked and after a reboot I was still able to login via SSH, all OS data is in place, /etc/lsb-release showing 20.04.3 LTS now
- what I did exactly: replaced bionic with focal in all APT sources, updated, upgraded, and then ran dist-upgrade, and rebooted

User avatar
mad_ady
Posts: 10148
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 815 times
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by mad_ady »

You were lucky! Congrats!
I tried do-release-upgrade on my 18.04, and it behaves the same way. In summer 2020 it used to work, because I was able to use it. Not sure why it doesn't work right now.

eldesperado
Posts: 8
Joined: Sun Feb 26, 2017 6:44 pm
languages_spoken: english
ODROIDs: C2
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by eldesperado »

Thank you!
I repeated the procedure on another C2 of mine and it also worked fine.

eldesperado
Posts: 8
Joined: Sun Feb 26, 2017 6:44 pm
languages_spoken: english
ODROIDs: C2
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by eldesperado »

I'm baaack to say that I let Ubuntu to notify me of normal releases (forgot to change to lts in /etc/update-manager/release-upgrades) which it did. I couldn't decline the offer and after I said "Y" I realized it's 22.04 ("beta"). Then it stopped because of AUFS (more on that below), so I had a chance to give up but I didn't take it.

Approximately 2-3 hours later (this depends on IO performance), both of my C2 were upgraded from 20.04.3 to 22.04. Jammy didn't jam me.

In my simple environment I had to make only one change to be able to upgrade, which was to nuke the aufs subdirectory in /var/lib/docker because AUFS is no longer supported in 22.04. The other may be - as I slowly discovered what no longer works - to fix Python-related stuff because a lot of Python packages and modules have been upgraded.
I had a problem with usrmerge (was creating dpkg errors after upgrade) but I removed usrmerge with apt without apparent consequences.

Code: Select all

$ cat /etc/lsb-release 

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu Jammy Jellyfish (development branch)"

$ cat /proc/cpuinfo 

Hardware	: ODROID-C2
Revision	: 020c
These users thanked the author eldesperado for the post:
odroid (Tue Dec 28, 2021 8:59 am)

User avatar
mad_ady
Posts: 10148
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 815 times
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by mad_ady »

Congrats for your bleeding edge! Are you still on kernel 3.16, or are you on mainline?

eldesperado
Posts: 8
Joined: Sun Feb 26, 2017 6:44 pm
languages_spoken: english
ODROIDs: C2
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by eldesperado »

:D

Good question - I was wondering if I should add that info.
Incredibly, 22.04 works with kernel 3.16.85-65 that I have:

Code: Select all

$ uname -a
Linux c2a 3.16.85-65 #1 SMP PREEMPT Mon Jan 18 13:32:38 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
I wouldn't be surprised if some things turned out to not work now. For example, I removed AUFS (and Docker, as I wanted to unclutter and delete various junk that's been piling up for months) which was blocking upgrade to 22.04, but given the old kernel who knows if I could reinstall and use latest Docker now. On the other hand, some things that needed newer libraries may be able to work now.

Code: Select all

$ ldd --version
ldd (Ubuntu GLIBC 2.34-0ubuntu3) 2.34
I have other (newer) Odroid systems where I can run Docker so this outcome is acceptable and if nothing breaks by time 22.04 LTS comes out (4 months?) I'll just let these C2 systems run non-containerized apps.

User avatar
mad_ady
Posts: 10148
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 815 times
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by mad_ady »

Thanks for the info. I feared that maybe systemd needs a newer kernel. Docker should still work, but maybe not all features will still be supported.

eldesperado
Posts: 8
Joined: Sun Feb 26, 2017 6:44 pm
languages_spoken: english
ODROIDs: C2
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Ubuntu Minimal 18.04 Upgrade to 20.01 ?

Post by eldesperado »

1) One new problem I came up against is the old kernel doesn't have a newer API method for random numbers required by Apache2.

Error:

Code: Select all

(38)Function not implemented: AH00141: Could not initialize random number generator
Workaround: use NGINX or other/older web server (or try a new kernel).

More info on this issue:
https://bugs.debian.org/cgi-bin/bugrepo ... bug=978045

2) As mentioned earlier, AUFS is out and Overlay FS is in but "you need version 4.0 or higher of the Linux kernel, or RHEL or CentOS using version 3.10.0-514 and above" [1], so I suspect that wouldn't work without a kernel upgrade either (I use OverlayFS on newer Odroid devices with Ubuntu 20.04 and kernel 4.9+ without a problem).

[1] https://docs.docker.com/storage/storage ... fs-driver/

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 3 guests