Announcement

Collapse
No announcement yet.

How I overcame upgrade failure and did a full upgrade from the previous LTS to the next

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How I overcame upgrade failure and did a full upgrade from the previous LTS to the next

    I have a pretty "fancy" setup which is derived from oshunluvr's work on multi-booting with btrfs. I also removed snap support using Schwarzer Kater's scripts from gitlab. (worked great btw)

    IOW, I have a non-standard installation. Nevertheless I was able to do full system upgrade from 22.04 to 24.04 with some difficulty. The difficulty had nothing to do with my setup. I just didn't do proper system maintenance, so my systems were feeling icky and wanted to stay home from school.

    When I ran the upgrade, it usually failed with a blank error pop-up. Here's how I fixed it and successfully full-upgraded my systems.

    This was all trial and error and zero actual understanding. If I can, you can.

    Firstly, if your efforts earn you a "kernel panic", then boot to grub menu choose "advanced options" and load the next lower kernel in normal mode. Then continue as normal. You may have to manually re-select a newer kernel after the kernel panic is fixed.


    Here is a direct Copy-Paste of my command history:

    1938 sudo dpkg --configure -a | tee ~/Documents/repair.log
    1939 sudo apt --fix-broken install | tee -a ~/Documents/repair.log
    1940 sudo apt-get update | tee -a ~/Documents/repair.log
    1941 sudo apt-get upgrade | tee -a ~/Documents/repair.log
    1942 sudo apt list upgradable | tee -a ~/Documents/repair.log
    1943 sudo apt list not-upgradable | tee -a ~/Documents/repair.log
    1944 man apt list
    1945 uname -r
    1946 sudo apt-get clean | tee -a ~/Documents/repair.log
    1947 sudo apt-get autoclean | tee -a ~/Documents/repair.log
    1948 sudo apt-get autoremove | tee -a ~/Documents/repair.log
    1949 sudo apt-get upgrade | tee -a ~/Documents/repair.log
    1950 sudo apt-get -f | tee -a ~/Documents/repair.log
    1951 sudo apt-get -f install | tee -a ~/Documents/repair.log
    1952 sudo apt-get --with-new-pkgs upgrade grub-efi-amd64-bin grub-efi-amd64-signed | tee -a ~/Documents/repair.log
    1953 sudo apt-get --with-new-pkgs upgrade ubuntu-advantage-tools ubuntu-pro-client ubuntu-pro-client-l10n | tee -a ~/Documents repair.log
    1954 reboot | tee ~/Documents/reboot.log
    1955 sudo apt-get autoremove | tee -a ~/Documents/repair.log
    1956 sudo do-release-upgrade | tee -a ~/Documents/upgrade.log



    My explanations would be clumsy and waste your time by being wrong. If you want to know what a command does, look it up.

    What I will explain is that tee takes whatever you pipe to it and saves it as a file. -a means "append to the existing file if one exists, otherwise make a new one."


    do-release-upgrade is the CLI version of the automatic upgrade. This is an attended upgrade. Meaning you have to occasionally interact with it, usually to tell it to not overwrite your custom config files.

    I will post my logs in subsequent posts for those who are interested.​
    Last edited by TwoFistedJustice; May 06, 2025, 08:23 PM. Reason: typo

    #2
    My reboot log is blank.
    And my upgrade log is too large to post. So I'm not really sure how to share it.

    Here are my repair logs:


    hoo@ares:~$ sudo apt --fix-broken install | tee -a ~/Documents/repair.log
    Reading package lists...
    Building dependency tree...
    Reading state information...
    0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

    #######
    hoo@ares:~$ sudo apt --fix-broken install | tee -a ~/Documents/repair.log
    Ign:1 http://packages.linuxmint.com vanessa InRelease
    Hit:2 http://us.archive.ubuntu.com/ubuntu jammy InRelease
    Hit:3 http://packages.linuxmint.com vanessa Release
    Hit:4 https://download.docker.com/linux/ubuntu jammy InRelease
    Hit:5 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease
    Hit:6 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease
    Get:7 https://updates.signal.org/desktop/apt xenial InRelease [5,887 B]
    Hit:8 http://security.ubuntu.com/ubuntu jammy-security InRelease
    Hit:9 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/jammy pgadmin4 InRelease
    Get:11 https://updates.signal.org/desktop/apt xenial/main amd64 Packages [74.0 kB]
    Hit:12 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy InRelease
    Fetched 79.8 kB in 1s (76.2 kB/s)
    Reading package lists...

    #######
    hoo@ares:~$ sudo apt-get upgrade | tee -a ~/Documents/repair.log
    Reading package lists...
    Building dependency tree...
    Reading state information...
    Calculating upgrade...
    The following packages have been kept back:
    grub-efi-amd64-bin grub-efi-amd64-signed ubuntu-advantage-tools
    ubuntu-pro-client ubuntu-pro-client-l10n
    0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

    #######
    hoo@ares:~$ sudo apt list upgradable | tee -a ~/Documents/repair.log
    Listing...

    #######
    hoo@ares:~$ sudo apt-get autoclean | tee -a ~/Documents/repair.log
    Listing...
    Reading package lists...
    Building dependency tree...
    Reading state information...

    #######
    hoo@ares:~$ sudo apt-get autoremove | tee -a ~/Documents/repair.log
    Reading package lists...
    Building dependency tree...
    Reading state information...
    0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

    #######
    hoo@ares:~$ sudo apt-get upgrade | tee -a ~/Documents/repair.log
    Reading package lists...
    Building dependency tree...
    Reading state information...
    Calculating upgrade...
    The following packages have been kept back:
    grub-efi-amd64-bin grub-efi-amd64-signed ubuntu-advantage-tools
    ubuntu-pro-client ubuntu-pro-client-l10n
    0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.


    #######
    hoo@ares:~$ sudo apt-get --with-new-pkgs upgrade grub-efi-amd64-bin grub-efi-amd64-signed | tee -a ~/Documents/repair.log
    Reading package lists...
    Building dependency tree...
    Reading state information...
    0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
    Reading package lists...
    Building dependency tree...
    Reading state information...
    Calculating upgrade...
    The following packages have been kept back:
    ubuntu-advantage-tools ubuntu-pro-client ubuntu-pro-client-l10n
    The following packages will be upgraded:
    grub-efi-amd64-bin grub-efi-amd64-signed
    2 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
    Need to get 3,070 kB of archives.
    After this operation, 55.3 kB of additional disk space will be used.
    Do you want to continue? [Y/n] Get:1 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 grub-efi-amd64-signed amd64 1.187.12+2.06-2ubuntu14.8 [1,391 kB]
    Get:2 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 grub-efi-amd64-bin amd64 2.06-2ubuntu14.8 [1,679 kB]
    Fetched 3,070 kB in 0s (7,148 kB/s)
    (Reading database ...
    (Reading database ... 5%
    (Reading database ... 10%
    (Reading database ... 15%
    (Reading database ... 20%
    (Reading database ... 25%
    (Reading database ... 30%
    (Reading database ... 35%
    (Reading database ... 40%
    (Reading database ... 45%
    (Reading database ... 50%
    (Reading database ... 55%
    (Reading database ... 60%
    (Reading database ... 65%
    (Reading database ... 70%
    (Reading database ... 75%
    (Reading database ... 80%
    (Reading database ... 85%
    (Reading database ... 90%
    (Reading database ... 95%
    (Reading database ... 100%
    (Reading database ... 300590 files and directories currently installed.)
    Preparing to unpack .../grub-efi-amd64-signed_1.187.12+2.06-2ubuntu14.8_amd64.deb ...
    Unpacking grub-efi-amd64-signed (1.187.12+2.06-2ubuntu14.8) over (1.187.6+2.06-2ubuntu14.4) ...
    Preparing to unpack .../grub-efi-amd64-bin_2.06-2ubuntu14.8_amd64.deb ...
    Unpacking grub-efi-amd64-bin (2.06-2ubuntu14.8) over (2.06-2ubuntu14.4) ...
    Setting up grub-efi-amd64-bin (2.06-2ubuntu14.8) ...
    Setting up grub-efi-amd64-signed (1.187.12+2.06-2ubuntu14.8) ...
    Installing grub to /boot/efi.
    Installing for x86_64-efi platform.
    Installation finished. No error reported.

    #######
    hoo@ares:~$ sudo apt-get --with-new-pkgs upgrade ubuntu-advantage-tools ubuntu-pro-client ubuntu-pro-client-l10n | tee -a ~/Documents repair.log
    tee: /home/hoo/Documents: Is a directory
    Reading package lists...
    Building dependency tree...
    Reading state information...
    Calculating upgrade...
    The following packages will be upgraded:
    ubuntu-advantage-tools ubuntu-pro-client ubuntu-pro-client-l10n
    3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Need to get 267 kB of archives.
    After this operation, 110 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Get:1 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 ubuntu-pro-client-l10n amd64 35.1ubuntu0~22.04 [20.6 kB]
    Get:2 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 ubuntu-pro-client amd64 35.1ubuntu0~22.04 [236 kB]
    Get:3 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 ubuntu-advantage-tools all 35.1ubuntu0~22.04 [10.9 kB]
    Preconfiguring packages ...
    Fetched 267 kB in 0s (861 kB/s)
    (Reading database ... 300590 files and directories currently installed.)
    Preparing to unpack .../ubuntu-pro-client-l10n_35.1ubuntu0~22.04_amd64.deb ...
    Unpacking ubuntu-pro-client-l10n (35.1ubuntu0~22.04) over (34~22.04) ...
    Preparing to unpack .../ubuntu-pro-client_35.1ubuntu0~22.04_amd64.deb ...
    Unpacking ubuntu-pro-client (35.1ubuntu0~22.04) over (34~22.04) ...
    Preparing to unpack .../ubuntu-advantage-tools_35.1ubuntu0~22.04_all.deb ...
    Unpacking ubuntu-advantage-tools (35.1ubuntu0~22.04) over (34~22.04) ...
    Setting up ubuntu-pro-client (35.1ubuntu0~22.04) ...
    Installing new version of config file /etc/apparmor.d/ubuntu_pro_apt_news ...
    Installing new version of config file /etc/apt/apt.conf.d/20apt-esm-hook.conf ...
    Setting up ubuntu-pro-client-l10n (35.1ubuntu0~22.04) ...
    Setting up ubuntu-advantage-tools (35.1ubuntu0~22.04) ...
    Processing triggers for man-db (2.10.2-1) ...


    #######
    hoo@ares:~$ sudo apt-get autoremove | tee -a ~/Documents/repair.log
    Reading package lists...
    Building dependency tree...
    Reading state information...
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

    Last edited by TwoFistedJustice; May 06, 2025, 08:26 PM. Reason: format for emphasis

    Comment

    Working...
    X