Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a number of Ubuntu partitions on my computer. This allows me to run previous, current and development versions concurrently.

I'd quite like to install updates to the other partitions, without actually booting into them. So I'd like to be able to run sudo aptitude update followed by sudo aptitude safe-upgrade.

How do I do this?

share|improve this question
Are they all the same architecture? What about just chrooting it? – izx Jun 5 '12 at 17:36
@izx yep they are – 8128 Jun 5 '12 at 18:07
up vote 3 down vote accepted

There are a couple of techniques, the simplest is to use a chrooted environment. In this environment you can then run sudo aptitude update and most other command line tools.

Alternatively you could create a number of virtual box virtual machines that used the partitions as their hard drives - I have not tried this.

For the chroot environment mount each partition in a directory for example:

sudo mkdir /mnt/partition_penguin
sudo mount /dev/sda8 /mnt/partition_penguin

Bind in the system directories to give access to the hardware:

sudo mount --bind /dev /mnt/partition_penguin/dev
sudo mount --bind /proc /mnt/partition_penguin/proc
sudo mount --bind /sys /mnt/partition_penguin/sys

And then enter the chroot environment and run your commands:

sudo chroot /mnt/partition_penguin /bin/bash
sudo aptitude update
share|improve this answer
I get a few errors: sudo: unable to resolve host greg-precise and E: Could not open lock file /var/lock/aptitude - open (2: No such file or directory) but it seems to have worked. – 8128 Jun 5 '12 at 18:07
If you plan on doing this regularly, also look at schroot to automate some of the above steps. – izx Jun 5 '12 at 18:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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