Score:2

Ubuntu Server 18.04.5 upgrade to 20.04 fails

co flag

My server is driving me nuts, I'm trying to change the current hdd to a new ssd and after that setting up Raid and a valid backup system. But that's other question...

I already made a copy of the current system to the SSD, so I thought, it's a backup, let me try to put in the latest LTS, so the quick command to do that was:

sudo do-release-upgrade

Fails with the message:

Checking for a new Ubuntu release  
Please install all available updates for your release before upgrading.

So i had to:

sudo apt-get update
sudo apt-get upgrade

The first time it installed a bunch of things and stopped or I had to restart, don't remember very well did this in the past. Now I have this error, when I run the upgrade:

Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
You might want to run 'apt --fix-broken install' to correct these.  
The following packages have unmet dependencies.  
 lxd : Depends: lxd-client (= 3.0.3-0ubuntu1~18.04.1) but 1:0.9 is installed  
 lxd-client : Depends: lxd (>= 1:0.9) but 3.0.3-0ubuntu1~18.04.1 is installed  
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

So I did what the message says:

sudo apt --fix-broken install

And new error:

Setting up udev (245.4-4ubuntu3.10) ...  
Failed to restart udev.service: Unit systemd-udevd.service is not loaded properly: Exec format error.  
See system logs and 'systemctl status udev.service' for details.  
invoke-rc.d: initscript udev, action "restart" failed.  
 systemd-udevd.service - udev Kernel Device Manager  
   Loaded: error (Reason: Exec format error)  
   Active: inactive (dead)  
     Docs: man:systemd-udevd.service(8)  
           man:udev(7)  
Aug 12 11:36:10 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 11:39:00 AtomServer systemd[1]: systemd-udevd.service: Cannot add dependency job, ignoring: Unit systemd-udevd.service is not loaded properly: Exec format error.  
Aug 12 11:41:35 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 11:41:35 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 11:41:35 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 11:41:35 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:00:56 AtomServer systemd[1]: systemd-udevd.service: Cannot add dependency job, ignoring: Unit systemd-udevd.service is not loaded properly: Exec format error.  
Aug 12 12:00:59 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:00:59 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:01:00 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
dpkg: error processing package udev (--configure):  
 installed udev package post-installation script subprocess returned error exit status 1  
dpkg: dependency problems prevent configuration of snapd:  
 snapd depends on udev; however:  
  Package udev is not configured yet.  
dpkg: error processing package snapd (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because the error message indicates it's a follow-up error from a previous failure.                                                                                                      Errors were encountered while processing:  
 udev  
 snapd  
E: Sub-process /usr/bin/dpkg returned an error code (1)

At this point I can't do anything, read several posts and similar questions, issued some commands, like:

dpkg --configure -a 
sudo dpkg --force-all -i /var/cache/apt/archives/udev_245.4-4ubuntu3.10_amd64.deb

Same problem:

Setting up udev (245.4-4ubuntu3.10) ...  
Failed to restart udev.service: Unit systemd-udevd.service is not loaded properly: Exec format error.  
See system logs and 'systemctl status udev.service' for details.  
invoke-rc.d: initscript udev, action "restart" failed.  
 systemd-udevd.service - udev Kernel Device Manager  
   Loaded: error (Reason: Exec format error)  
   Active: inactive (dead)  
     Docs: man:systemd-udevd.service(8)  
           man:udev(7)  
Aug 12 12:00:59 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:01:00 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:09:00 AtomServer systemd[1]: systemd-udevd.service: Cannot add dependency job, ignoring: Unit systemd-udevd.service is not loaded properly: Exec format error.  
Aug 12 12:10:38 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:10:38 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:10:38 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:11:50 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:11:51 AtomServer systemd[1]: systemd-udevd.service: Cannot add dependency job, ignoring: Unit systemd-udevd.service is not loaded properly: Exec format error.  
Aug 12 12:11:51 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:11:51 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
dpkg: error processing package udev (--install):  
 installed udev package post-installation script subprocess returned error exit status 1  
Processing triggers for systemd (237-3ubuntu10.44) ...  
Processing triggers for ureadahead (0.100.0-21) ...  
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...  
Errors were encountered while processing:  
 udev  

Any help?

Thanks

EDIT Output apt-get update:

Hit:1 http://gb.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://gb.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://gb.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Fetched 328 kB in 2s (140 kB/s)
Reading package lists... Done
guiverc avatar
cn flag
I would `sudo apt update` and look at what output you get. Your installed packages don't match a single release; some matching *bionic/updates* and others matching *focal/universe*. It would help if you'd used {code} formatting and not quoting (in your question; it's hard to read), and if you were clear with what you actually did.. Either way I'd start with by reading the output of `sudo apt update` & scanning your sources. Why are you trying to install that version of `udev` as it's outdated! and not a currently used package for *focal* or *focal-updates*; again `sudo apt update` & why?
ExploitFate avatar
zm flag
Could you add output of `file /usr/bin/udevadm` please?
co flag
@guiverc At this point I don't know what I'm doing... To many tests. The udev version that I'm trying to install it's something that I read somewhere... :/ Edited my question with the output of the Update. Thanks
co flag
@ExploitFate I don't have that file...
Score:2
zm flag

UPD:

Looks like you trying to install wrong udev version. For bionic download and install http://mirrors.kernel.org/ubuntu/pool/main/s/systemd/udev_237-3ubuntu10.50_amd64.deb

You can try to comment out line /lib/systemd/system/systemd-udevd.service:26 till upgrade will be finished

sudo sed -i '/ExecReload/s/.*/#\0/g' /lib/systemd/system/systemd-udevd.service


sudo systemctl daemon-reload

Than try to upgrade once again

sudo do-release-upgrade
co flag
Thanks Disabled the line in the file and after that installed the package. When I tried to run the do-release-upgrade, it said that I need to install the pending updates. So run apt upgrade, and I got new errors complaining about the lxd-client package e lxd, so I used the same techinque, and download the deb files and forced the installation with the dpkg. Now it's installing all updates... Let's see how it ends.
co flag
Problem solved. 20.04 installed Thanks
ExploitFate avatar
zm flag
you are welcome
cn flag
works on debian too
Tofandel avatar
in flag
You don't need to comment the line, the issue is the path of `ExecReload` is not absolute just replace `ExecReload=udevadm` with `ExecReload=/bin/udevadm`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.