-1

I help run a server which is on (or: was on, and is now being restored from snapshots back to…) Ubuntu 18.04. It cheerily told me that I should do-release-upgrade to 20.04.1 LTS but after I did so the AWS EC2 instance fails to boot:

xc: error: panic: xc_dom_bzimageloader.c:739: xc_dom_probe_bzimage_kernel: unknown compression format: Invalid kernel
xc: error: panic: xc_dom_core.c:621: xc_dom_find_loader: no loader found: Invalid kernel
xc_dom_parse_image returned -1
close(3)
Error 9: Unknown boot failure

So once again I got burnt by using Ubuntu on EC2, but if 18.04 has support until April 2023 then I guess so long as I stick with that release I can avoid rebuilding this box for a while! (As an aside this is quite frustrating since afaict I could easily spin up a fresh Ubuntu 20 box compatible with AWS but apparently upgrading an existing instance isn't supported??)

My question at this point is: will the dist-upgrade of 18.04 under any circumstances try switch me again to 20.x? Or is that only done if I run do-release-upgrade? (I'm finding conflicting and/or answers from a decade ago and want to avoid this hassle/embarrassment while still keeping my system as up-to-date as practical under the circumstances…!)

1
  • 3
    If you didn't mess with /etc/apt sources.list, apt upgrade or apt-get dist-upgrade, or apt full upgrade won't switch you to another release. But f you did, it can swetch you to completely another release like Kali. Pop_OS, etc. – Pilot6 Jan 5 at 22:48
1

will the dist-upgrade of 18.04 under any circumstances try switch me again to 20.x? Or is that only done if I run do-release-upgrade?

Only if you tell it to do so.

(I'm finding conflicting and/or answers from a decade ago and want to avoid this hassle/embarrassment while still keeping my system as up-to-date as practical under the circumstances…!)

Only use questions and answer that apply to the time frame of an Ubuntu LTS release. That is true for any version of Ubuntu, not just on an instance.

Regarding instances though ...

Instances do not have a grub rescue. Nor does it allow for booting from a live session. If an instance does not boot it is dead and can not be fixed. Avoid any actions on an instance that require rebooting that you can avoid. Upgrading is the number one on the list of actions to avoid. If you need to do that you create a new instance.

You should have TWO partitions on an instance: a system and a personal partition. The system partition should be set up such that you can burn it: all files you need to change need to be on the partition in whatever way you like to use. Webserver files, databases, logs etc etc all need to be on the personal partition. Doing it using symlinks is the easiest method.

Upgrading to a new release means creating a new system disk at the console and move the old one to a backup. And then attaching your personal disk to this new system disk. And executing a script from your personal partition to recreate your whole setup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.