Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.