Upgrade to Ubuntu 18.04 minimal

Moderators: mdrjr, odroid

Upgrade to Ubuntu 18.04 minimal

Unread postby Pienoet » Tue Jun 05, 2018 8:18 am

Hi can i upgrade from Ubuntu 16.04.4 LTS (GNU/Linux 4.14.24-113 to Ubuntu 18.04 minimal on my XU4?
Pienoet
 
Posts: 385
Joined: Sun May 10, 2015 10:04 pm
languages_spoken: english Dutch

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby odroid » Tue Jun 05, 2018 8:31 am

If you don't care the GPU driver, you can upgrade it.

Otherwise, freshly flash the 18.04 minimal image.
https://wiki.odroid.com/odroid-xu4/os_images/linux/ubuntu_4.14/20180531

Anyway, before upgrading, you have to update your system software first.
https://wiki.odroid.com/odroid-xu4/os_images/linux/ubuntu_4.14/20171213#how_to_update_system_and_kernel_software_don_t_forget_dist-upgrade
User avatar
odroid
Site Admin
 
Posts: 28741
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby monzer4819 » Wed Jun 06, 2018 10:33 pm

How does one upgrade it?

Code: Select all
root@odroid:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:        16.04
Codename:       xenial
root@odroid:~# do-release-upgrade
Checking for a new Ubuntu release
No new release found.
root@odroid:~#
monzer4819
 
Posts: 1
Joined: Wed Apr 18, 2018 7:36 pm
languages_spoken: english
ODROIDs: ux4

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby mad_ady » Wed Jun 06, 2018 11:52 pm

do-release-upgrade --devel-release until 18.04.1 hits stable.
User avatar
mad_ady
 
Posts: 4609
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby odroid » Thu Jun 07, 2018 8:49 am

Try the following steps. You have to backup your important data first before upgrading.

Answer "Yes" to all questions. Only one answer "No" when you meet a dialog box of "Do you want to abort removal now?" in the last step.
Code: Select all
sed -i "s/xenial/bionic/g" /etc/apt/sources.list
sed -i "s/xenial/bionic/g" /etc/apt/sources.list.d/odroid.list
rm /etc/apt/sources.list.d/saiarcot895-ubuntu-myppa-xenial.list
apt-get update
apt-fast dist-upgrade
apt-get remove linux-image-xu3
apt-get remove linux-image-4.14*


And finalize the upgrade process.
Code: Select all
apt-get install linux-odroid-5422
apt-get autoremove
reboot


After that, I could see this message.
Code: Select all
Ubuntu 18.04 LTS odroid ttySAC2                                                 
                                                                               
odroid login: root
Password:
Last login: Thu Jun  7 08:20:30 UTC 2018 on tty1
Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.14.47-139 armv7l)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

root@odroid:~#



NOTE:
I freshly flashed “ubuntu-16.04.3-4.14-minimal-odroid-xu4-20171213.img.xz” to a spare 8GB micro-SD card.
And followed above steps and it worked well.
But it is very hard to guarantee the upgrade feature if your OS has a different configuration.
User avatar
odroid
Site Admin
 
Posts: 28741
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby abnoeh » Thu Jun 07, 2018 9:07 am

It's a weird idea, but can the gpu driver by edit disk directly outside of odroid?
like mount sdcard/emmc on x86 linux machine and change needed files?
abnoeh
 
Posts: 3
Joined: Fri Apr 27, 2018 8:09 pm
languages_spoken: english
ODROIDs: XU4

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby mad_ady » Fri Jun 08, 2018 6:48 pm

I've upgraded a production xu4 that was running as a headless nas to 18.04. No problems during the upgrade, but once rebooted I had these issues:
* would reboot every minute because of the watchdog. The cause was a custom watchdog script which didn't have a shebang and was reported as invalid exec format. Used to work before. Fixed it by fixing the shebang.
* nfs would not start due to deprecated/missing options in /etc/exportfs

So, when doing an upgrade, backup and allocate enough time for post troubleshooting.
User avatar
mad_ady
 
Posts: 4609
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby DrThisGuy » Sat Jun 09, 2018 6:20 am

Code: Select all
(non-root user)@odroid:~$ sudo apt-get install linux-odroid-5422
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-odroid-5422


I get the following error (E: Unable to locate package linux-odroid-5422) even after adding the repositories in line one and two. Any ideas. I would rather not have to re-flash
DrThisGuy
 
Posts: 2
Joined: Sat Jun 09, 2018 6:16 am
languages_spoken: english
ODROIDs: c2 and xu4

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby mad_ady » Sat Jun 09, 2018 4:02 pm

Did you run an apt-get update after the edits? I haven't removed the kernel package because I use a self-compiled kernel.
User avatar
mad_ady
 
Posts: 4609
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby DrThisGuy » Sat Jun 09, 2018 10:47 pm

fixed it.

there were two problems

1. when I upgraded to bionic it commented out "deb http://deb.odroid.in/5422-s/ bionic main" in /etc/apt/sources.list.d/odroid.list

2. I was coming from the 4.9 kernel so

Code: Select all
apt-get remove linux-image-4.14*

needed to be changed to
Code: Select all
apt-get remove linux-image-4.9*


hope this helps someone
DrThisGuy
 
Posts: 2
Joined: Sat Jun 09, 2018 6:16 am
languages_spoken: english
ODROIDs: c2 and xu4

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby crazyquark » Wed Jul 18, 2018 3:51 pm

Hiya,

I performed the same upgrade last night on my odroid-xu4 and odroid-hc1 and it worked.
I used do-release-upgrade -d plus the last part with installing the right kernel.

Had some issues with mono runtime, doesn't matter.

My question is, do we get HW accelerated h.264 ffmpeg with this upgrade?
And if yes, how do I use it in Emby? Do I need some extra switches passed in?

Thank you, odroid!

P.S.
I installed this package: xserver-xorg-video-armsoc-exynos
crazyquark
 
Posts: 282
Joined: Thu Jan 15, 2015 4:22 pm
languages_spoken: english, french, romanian
ODROIDs: C1,C1+,C2,HC1,XU4

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby mad_ady » Wed Jul 18, 2018 4:11 pm

You can add memeka's repository: https://oph.mdrjr.net/memeka/bionic/ and install ffmpeg from there.
User avatar
mad_ady
 
Posts: 4609
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby crazyquark » Wed Jul 18, 2018 5:51 pm

Ah, yes, of course. I somehow assumed it was in the official repo.
But is the kernel/kernel module support already there if I went with this upgrade path?
Not sure what I need other than the exynos video driver.
crazyquark
 
Posts: 282
Joined: Thu Jan 15, 2015 4:22 pm
languages_spoken: english, french, romanian
ODROIDs: C1,C1+,C2,HC1,XU4

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby memeka » Wed Jul 18, 2018 6:35 pm

crazyquark wrote:Ah, yes, of course. I somehow assumed it was in the official repo.
But is the kernel/kernel module support already there if I went with this upgrade path?
Not sure what I need other than the exynos video driver.


you need the 4.14 kernel.
User avatar
memeka
 
Posts: 4051
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby crazyquark » Thu Jul 19, 2018 9:16 pm

Ubuntu 18.04 comes with kernel 4.14.55 so that's covered.
crazyquark
 
Posts: 282
Joined: Thu Jan 15, 2015 4:22 pm
languages_spoken: english, french, romanian
ODROIDs: C1,C1+,C2,HC1,XU4

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby ulfben » Mon Jul 23, 2018 8:15 pm

So... are these two equivalent (eg. will leave my XU4 with 18.04)? If they're different - which approach should I prefer? Thanks. :)


mad_ady wrote:do-release-upgrade --devel-release until 18.04.1 hits stable.


[...]


odroid wrote:Try the following steps. [...]

Code: Select all
sed -i "s/xenial/bionic/g" /etc/apt/sources.list
sed -i "s/xenial/bionic/g" /etc/apt/sources.list.d/odroid.list
rm /etc/apt/sources.list.d/saiarcot895-ubuntu-myppa-xenial.list
apt-get update
apt-fast dist-upgrade
apt-get remove linux-image-xu3
apt-get remove linux-image-4.14*


And finalize the upgrade process.
Code: Select all
apt-get install linux-odroid-5422
apt-get autoremove
reboot

ulfben
 
Posts: 103
Joined: Thu Jul 20, 2017 11:56 pm
languages_spoken: english
ODROIDs: XU4Q

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby mad_ady » Mon Jul 23, 2018 8:24 pm

I did the first option, but I'm running a custom kernel and will not upgrade the kernel from the repo anyway. To have the new kernel as well, after you do-release-upgrade, you should follow @odroid's steps as well.
User avatar
mad_ady
 
Posts: 4609
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby ulfben » Mon Jul 23, 2018 8:29 pm

Thanks for the clarification!

Is 18.04.01 still in dev?
ulfben
 
Posts: 103
Joined: Thu Jul 20, 2017 11:56 pm
languages_spoken: english
ODROIDs: XU4Q

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby mad_ady » Mon Jul 23, 2018 8:41 pm

No idea. Haven't upgraded lately :)
It should be safe to upgrade to it.
User avatar
mad_ady
 
Posts: 4609
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby ulfben » Thu Jul 26, 2018 10:32 pm

Gah. Despite opting to keep all my own configs during the
Code: Select all
do-release-upgrade
process, it seems Apache, SSH and/or UFW have had their settings reset or aren't loading their configs correctly. After reboot SSH refuses connections on my custom ports and the default ports, including the "emergency" port set up during upgrade (1022). pihole seems to have survived, but apache is no longer running PHP so all my websites are borked at the moment.

Le sigh.

What's the easiest way to regain access over SSH? From the top of my head I'm thinking "plug the Ubuntu SD card into the laptop, find an EXT4 filesystem driver for windows, and check all configs there". Any other ideas?
ulfben
 
Posts: 103
Joined: Thu Jul 20, 2017 11:56 pm
languages_spoken: english
ODROIDs: XU4Q

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby mad_ady » Thu Jul 26, 2018 10:45 pm

If it's a config issue, ssh should still start with the default options (port 22) and the old settings should have been keept next to the current ones in a different file.
I suggest if you're in the same lan to run a nmap against the odroid's ip and scan for all ports and see if you find a ssh open.
Otherwise, if it's a xu4 you can log in with a keyboard/monitor and check.
If it's a HC1/2 you can still log in with a keyboard, but you won't have video output. You can type in the blind to start a manual shell (like login, reverse shell with netcat) https://null-byte.wonderhowto.com/how-t ... h-0132658/
User avatar
mad_ady
 
Posts: 4609
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby ulfben » Thu Jul 26, 2018 11:08 pm

A port scan tells me that only Apache with 80 and 433 remain open. It's an XU4 - I'll shut her down (pihole admin panel is via Apache and is able to reboot the server, so there's probably a clean shutdown in here somewhere too. :)) and move her to a monitor and check, thanks for the advice!
ulfben
 
Posts: 103
Joined: Thu Jul 20, 2017 11:56 pm
languages_spoken: english
ODROIDs: XU4Q

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby mad_ady » Thu Jul 26, 2018 11:15 pm

I see you're taking it personally - calling the xu4 a "her" and all :D
User avatar
mad_ady
 
Posts: 4609
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby ulfben » Fri Jul 27, 2018 7:06 am

I've made some progress! First issue was my 16.04 install was from the Mate image so the dist-upgrade had brought back and was booting to desktop. Disabled that and was back in terminal, and ran through Odroid's instructions to update the apt package lists and upgrade everything. I'm now on 18.04, still with broken apache / php and ssh though. :)

Issue number the first:
odroid wrote:And finalize the upgrade process.
Code: Select all
apt-get install linux-odroid-5422

apt can't find this package. What is it, and does it exist under some other name?

Issue number the second: SSH refuses to start because /run/sshd doesn't exist ("privilege separation folder"). I can create it manually and the start the ssh service fine, but the folder is gone again after reboot. I should be able to run something like "mkdir -p -m0755 /var/run/sshd" from a startup script somewhere but /etc/init/ does not contain any ssh.conf file.

While waiting for advice on those, I'll go look at what PHP / Apache is cranky about. :P
ulfben
 
Posts: 103
Joined: Thu Jul 20, 2017 11:56 pm
languages_spoken: english
ODROIDs: XU4Q

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby memeka » Fri Jul 27, 2018 7:45 am

looks like it would have been easier to start with a 18.04 image and port your configs :)
User avatar
memeka
 
Posts: 4051
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby mad_ady » Fri Jul 27, 2018 12:53 pm

You can try to fix ssh like this:
Code: Select all
sudo cp /lib/systemd/system/ssh.service /etc/systemd/system/ssh.service
sudo vi /etc/systemd/system/ssh.service

Add a line
Code: Select all
ExecStartPre=-/bin/mkdir /run/sshd

before the first ExecStartPre line. Save and exit vi and run
Code: Select all
sudo systemctl daemon-reload
sudo service ssh restart


@memeka: trying to fix something broken is a great learning experience. Linux shouldn't be reinstalled every 6 months like Windows XP :). My work linux desktop went from 10.04 -> 12.04 -> 14.04 -> manually migrated to 64 bit -> 16.04 -> 18.04. Each time I had to tweak something out, but didn't have to reinstall.
User avatar
mad_ady
 
Posts: 4609
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby ulfben » Sat Jul 28, 2018 10:18 pm

memeka wrote:looks like it would have been easier to start with a 18.04 image and port your configs :)


Not to mention better feng-shui! It bothers me an unreasonable amount, having all the Mate-bloat and useless services on the system. I'm fairly sure I've disabled most of the default stuff running in the background on the desktop install, but it would feel a lot better just running a clean image to begin with. However, my plan is to "replicate" this setup on a new HC2 while also setting up BorgBackup so that install is going to be when I take the time to right this particular wrong. :)

mad_ady wrote:You can try to fix ssh like this:
Code: Select all
[...]


That worked perfectly - thanks! Everything is now back to normal - once SSSh was up all I had to do was re-enable the php module in apache, and the dnsmasq service for pihole to come up properly.

Code: Select all
sudo a2enmod php7.2
sudo systemctl restart apache2
sudo systemctl enable dnsmasq


Phew. :P

Two last questions:
What is the name of the kernel package? With 16.04 I would apt-get install linux-image-xu3 to get kernel updates. That package can no longer be found.

What about linux-odroid-5422? @odroid recommended we install it after upgrading, but it too can not be found in (my) default repos. What is this package, and how can I get it?
ulfben
 
Posts: 103
Joined: Thu Jul 20, 2017 11:56 pm
languages_spoken: english
ODROIDs: XU4Q

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby mad_ady » Sat Jul 28, 2018 10:22 pm

That's the name of the kernel package. Make sure /etc/apt/sources.list.d/odroid.conf has bionic as repo instead of xenial
User avatar
mad_ady
 
Posts: 4609
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby ulfben » Sat Jul 28, 2018 11:11 pm

mad_ady wrote:That's the name of the kernel package. Make sure /etc/apt/sources.list.d/odroid.conf has bionic as repo instead of xenial


/etc/apt/sources.list.d/odroid.list was commented out:
Code: Select all
# deb http://deb.odroid.in/5422-s/ bionic main # disabled on upgrade to bionic


Uncommented, replaced "bionic" with "xenial" and voila! apt finds the package! However, Installation fails on:

Code: Select all
ulfben$ sudo apt-get install linux-odroid-5422
[...]
The following NEW packages will be installed:
  linux-odroid-5422
[...]
Unpacking linux-odroid-5422 (4.14.55-146) ...
dpkg: error processing archive /var/cache/apt/archives/linux-odroid-5422_4.14.55-146_armhf.deb (--unpack):
 trying to overwrite '/boot/exynos5422-odroidxu3-lite.dtb', which is also in package linux-image-4.14.55-133 20180714
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/linux-odroid-5422_4.14.55-146_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


@odroid instructions included removing the old 4.14* kernel - apt-get remove linux-image-4.14* - but the apt issues some fairly stern warnings about removing the currently running kernel.

... should I go ahead and uninstall 4-14* anyway, to put 5422 in its place?
ulfben
 
Posts: 103
Joined: Thu Jul 20, 2017 11:56 pm
languages_spoken: english
ODROIDs: XU4Q

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby mad_ady » Sun Jul 29, 2018 1:48 am

I think you need to uninstall linux-image-4.14.55-133 and install the other one instead. You'll be left without a kernel for a short while, but should be ok if you don't reboot
User avatar
mad_ady
 
Posts: 4609
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Upgrade to Ubuntu 18.04 minimal

Unread postby Helmut » Fri Oct 19, 2018 5:54 pm

Since July 26, 2018, 18.04.1 is stable (https://wiki.ubuntu.com/Releases) and I successfully installed it with
Code: Select all
sudo apt update && sudo apt full-upgrade


All SSH-settings etc. remained intact.
Helmut
 
Posts: 9
Joined: Sat Jul 21, 2018 5:51 pm
languages_spoken: english


Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 6 guests