Updating LXC Containers Using do-release-upgrade

A while ago i went through the whole rigmarole of updating Ubuntu from a no longer supported version to a supported version and had to go about updating all my LXC containers at the same time.   The later part of this mission might have been made easier with the following information.

I completely do not claim any credit for this, i found it here http://slacy.com/blog/2014/10/running-do-release-upgrade-or-apt-get-dist-upgrade-on-an-lxc-container/ which is a repost of http://ubuntuforums.org/showthread.php?t=1295052 and it all certainly worked for me.

The first thing to make sure of is that do-release-upgrade is definatley installed :

sudo aptitude install update-manager update-manager-core

Once this is done then the process is pretty much as follows (as per the above posts) :-

$ sudo su - 
# cd <directory that contains the lxc image root>
# mount -t devpts devpts ./dev/pts
# mount -t proc proc ./proc
# mount -t sysfs sysfs ./sys
# chroot .
# apt-get dist-upgrade
# do-release-upgrade
# <Ctl-D to exit chroot>
# umount ./dev/pts
# umount ./proc
# umount ./sys

Friday 12 December 2014 at 4:38 pm | | Linux

No comments

(optional field)
(optional field)

Comment moderation is enabled on this site. This means that your comment will not be visible until it has been approved by an editor.

Remember personal info?
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.