Upgrading Ubuntu chroot environment?

What is the proper way to upgrade Ubuntu chroot environment to a newer Ubuntu release? The chroot environment has been originally set up using debootstrap.

The proper way to upgrade a Ubuntu server is to use do-release-upgrade command.

Ubuntu is based on Debian. Debian can be upgraded by replacing the release name in /etc/apt/sources.list with the new release name and running apt-get update, apt-get upgrade and apt-get dist-upgrade.

Which one is the proper way to upgrade a Ubuntu chroot environment? What does do-release-upgrade do differently from the Debian way?


Solution 1:

For the most part, do-release-upgrade is a wrapper around dist-upgrade with some additional functionality. As noted, it is the recommended official way to upgrade Ubuntu minimal/server installations. Unofficially, dist-upgrade after changing your sources.list often works just as well.

The difference is: using do-release-upgrade is recommended because it has the ability to handle system configuration changes sometimes needed between releases.

For an Ubuntu chroot, I suggest you stick with do-release-upgrade unless it keeps failing for some reason.

Solution 2:

Well do-release-upgrade -d works also. Just download in a terminal:

sudo apt-get install update-manager-core 

and then:

do-release-upgrade.