1

I need to upgrade my ubuntu 16.04 LTS notebook to 18.04 LTS. I read this page : https://www.liquidweb.com/kb/how-to-upgrade-ubuntu-16-04-to-ubuntu-18-04/ That page says if I follow the procedure, it will upgrade to 18.04 LTS, but I'm afraid it will upgrade directly to 20.04. (I guess by the time the article was written, there was no 20.04).
How can I go from 16.04 LTS to specifically 18.04 LTS (not to 20.04 LTS)? Is there any choice provided during the upgrade?

ADD :
After reading comments and other documents, I processed 'sudo do-release-upgrade' command.(before that I added sudo apt dist-upgrade to let it upgrade more packages considering dependencies) It took a while, and saw many update-initramfs was executed several times for several kernel versions. so I was afraid. Now it stopped with this last log and asks me if I can proceed with removing obsolte packages. (I don't know what was going on before..) I hope it's just fine to remove obsolete files.

Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-141-generic
Found initrd image: /boot/initrd.img-4.15.0-141-generic
Found linux image: /boot/vmlinuz-4.15.0-140-generic
Found initrd image: /boot/initrd.img-4.15.0-140-generic
Found linux image: /boot/vmlinuz-4.15.0-118-generic
Found initrd image: /boot/initrd.img-4.15.0-118-generic
Found linux image: /boot/vmlinuz-4.15.0-117-generic
Found initrd image: /boot/initrd.img-4.15.0-117-generic
Found linux image: /boot/vmlinuz-4.15.0-112-generic
Found initrd image: /boot/initrd.img-4.15.0-112-generic
Found linux image: /boot/vmlinuz-4.15.0-107-generic
Found initrd image: /boot/initrd.img-4.15.0-107-generic
Found linux image: /boot/vmlinuz-4.15.0-106-generic
Found initrd image: /boot/initrd.img-4.15.0-106-generic
Found linux image: /boot/vmlinuz-4.15.0-101-generic
Found initrd image: /boot/initrd.img-4.15.0-101-generic
Found linux image: /boot/vmlinuz-4.13.0-37-generic
Found initrd image: /boot/initrd.img-4.13.0-37-generic
Found linux image: /boot/vmlinuz-4.13.0-36-generic
Found initrd image: /boot/initrd.img-4.13.0-36-generic
Adding boot menu entry for EFI firmware configuration
done
Processing triggers for linux-image-4.15.0-140-generic (4.15.0-140.144) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.15.0-140-generic
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf: No such file or directory
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-141-generic
Found initrd image: /boot/initrd.img-4.15.0-141-generic
Found linux image: /boot/vmlinuz-4.15.0-140-generic
Found initrd image: /boot/initrd.img-4.15.0-140-generic
Found linux image: /boot/vmlinuz-4.15.0-118-generic
Found initrd image: /boot/initrd.img-4.15.0-118-generic
Found linux image: /boot/vmlinuz-4.15.0-117-generic
Found initrd image: /boot/initrd.img-4.15.0-117-generic
Found linux image: /boot/vmlinuz-4.15.0-112-generic
Found initrd image: /boot/initrd.img-4.15.0-112-generic
Found linux image: /boot/vmlinuz-4.15.0-107-generic
Found initrd image: /boot/initrd.img-4.15.0-107-generic
Found linux image: /boot/vmlinuz-4.15.0-106-generic
Found initrd image: /boot/initrd.img-4.15.0-106-generic
Found linux image: /boot/vmlinuz-4.15.0-101-generic
Found initrd image: /boot/initrd.img-4.15.0-101-generic
Found linux image: /boot/vmlinuz-4.13.0-37-generic
Found initrd image: /boot/initrd.img-4.13.0-37-generic
Found linux image: /boot/vmlinuz-4.13.0-36-generic
Found initrd image: /boot/initrd.img-4.13.0-36-generic
Adding boot menu entry for EFI firmware configuration
done
Processing triggers for resolvconf (1.79ubuntu10.18.04.3) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Reading package lists... Done
Building dependency tree
Reading state information... Done

Checking for installed snaps No snaps are installed yet. Try 'snap install hello-world'.

Installing snap gnome-3-26-1604

Installing snap gtk-common-themes

Installing snap gnome-calculator

Installing snap gnome-characters

Installing snap gnome-logs

Installing snap gnome-system-monitor

Searching for obsolete software Reading state information... Done

Remove obsolete packages?

212 Packages are going to be removed.

Removing the packages can take several hours.

Continue [yN] Details [d]

I pressed y here to remove the packages. and saw update-initramfs messages and updating grub several times, and it asked me if it can restart the machine so I pressed 'y' and it rebooted. Now it's 18.04LTS! Hew.. Thanks guys.

Chan Kim
  • 1,969
  • It can not upgrade at all unless you tell it to. It never can never did and never will upgrade 2 versions at a time. – David Apr 15 '21 at 04:45
  • @David ah, so you mean it upgrades incrementally to 18.04 LTS? or does it let me select the next version? What if it upgrades to 17.0? sorry I've never upgraded release in ubuntu. On second look, the original post was updated this last March. so it looks like it'll upgrade to 18.04 LTS. – Chan Kim Apr 15 '21 at 04:50
  • 1
    16.04 upgrades to 18.04 and 18.04 upgrades to 20.04 and 20.04 upgrades to 21.04 after April 22. But like I already said only if you tell it to. – David Apr 15 '21 at 04:52
  • I'll be repeating what @David has already said (but in different words). There are two upgrade paths from 16.04, to the next release or 16.10 (gone now as 16.10 is EOL & the upgrade tool won't allow upgrade to a EOL release), or to the next LTS release which is 18.04. Those are the only upgrade paths available using the Ubuntu upgrade tools (unless you've polluted your sources or system...) – guiverc Apr 15 '21 at 04:56
  • 4
    Does this answer your question? Can I skip over releases when upgrading? (this isn't what you're asking; it's the opposite - but still answers your question.. ie. the upgrade tool will only do what you want, not what you fear) – guiverc Apr 15 '21 at 04:57
  • For best result I'll suggest using official documentation and not 3rd party blogs... ie. https://wiki.ubuntu.com/BionicBeaver/ReleaseNotes/18.04.1 which has a "Upgrading from Ubuntu 16.04 LTS or 17.10" section that was fully QA (Quality Assurance) tested... (Note: the two releases it supports was the directly prior release [17.10] or the prior LTS release being 16.04) – guiverc Apr 15 '21 at 04:59
  • hi all, I found the /etc/update-manager/release-upgrades file lets us select to what release to upgrade(to show the candidate maybe). According to the Prompt value, if its normal it shows all the intermediate upgrades, if it's lts it shows the next LTS version. In my notebook it is set as lts so it'll upgrade to 18.04LTS I guess. Thanks. – Chan Kim Apr 15 '21 at 05:07
  • Thanks. I've successfully upgraded to ubuntu 18.04.5 LTS. I've updated my question for reference to people like me. – Chan Kim Apr 15 '21 at 06:18

0 Answers0