Super User is a question and answer site for computer enthusiasts and power users. 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

my hard disk has two xubuntu 9.04 installation.

one installation in partition /dev/sda1

and another installation in partition /dev/sda5

if I running xubuntu installation in partition /dev/sda5, how to browse other Xubuntu installation files in partition /dev/sda1?

share|improve this question

First, you need to make files in /dev/sda1 accessible under the running operating system. The underlying operation is called mounting. I think under default Ubuntu settings there will be an entry for /dev/sda1 in the “Places” menu; I don't know how that translates to the Xubuntu interface.

To mount your other installation manually, you can use the following command:

sudo mkdir /media/sda1
sudo mount /dev/sda1 /media/sda1

The files from /dev/sda1 will now be available under /media/sda1. When you've finished browsing:

sudo umount /media/sda1
sudo rmdir /media/sda1

You don't need the rmdir part unless you want to completely clean up after yourself. And the umount will happen automatically when you shut down your computer.

If you'd like to have /dev/sda1 permanently accessible, add an entry corresponding to it in /etc/fstab, which contains information about filesystems to mount at boot time.

sudoedit /etc/fstab

Add the following line near the bottom of the file:

/dev/sda1  /media/sda1  auto  auto

You may be interested in the chroot command. It lets you run a program pretending to restrict the filesystem to a subtree. For example, if you run

sudo chroot /media/sda1 bash

you will get a shell where it appears that only the files from /dev/sda1 exist. This shell will run as root; you can use su to switch to a user that exists inside the other installation. Some commands may not run in this environment, complaining about a missing proc; you can satisfy them by running (as root, inside the chroot)

mount -t proc proc /proc

Running GUI applications inside the chroot is possible but the setup is a little complicated.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .