LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I access another partition? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-access-another-partition-600700/)

1968eric 11-18-2007 06:56 PM

How do I access another partition?
 
I am dual booting between openSUSE and Ubuntu. I'm unfamiliar with KDE and can't seem to figure out how to get at my files on the Ubuntu partition.

I've tried just going to /dev/sda2 in konqeror but that doesn't work.

Thanks.

dkm999 11-18-2007 07:21 PM

This is a problem of confusing a block device (/dev/sda2) with a file system. In order to look at the filesystem that lives on /dev/sda2, you will need to mount it somewhere within your existing filesystem. The conventional place to mount stuff (at least temporarily) is /mnt. Whatever is in the /mnt folder will be hidden when you mount a new filesystem there, so you might want to create a new directory, say
/mnt/tmp, and then mount the OpenSUSE filesystem on your Ubuntu system.

Very probably, after you have created the directory /mnt/tmp, the command
Code:

# mount /dev/sda2 /mnt/tmp
will do the trick, because the mount command tries its best to figure out what you want. But it might not be able to figure out what kind of filesystem you are asking for; in that case, Read The Fine Manpage :study:

mrrangerman 11-18-2007 07:34 PM

Yep just fallow dkm999 advise,

commands as root,

Code:

# mkdir /mnt/tmp

# mount /dev/sda2 /mnt/tmp

to view contents
# cd /mnt/tmp

to unmount after your done, make sure you are not in the /mnt/tmp directory.

# umount /dev/sda2 /mnt/tmp


1968eric 11-18-2007 07:38 PM

That worked. Thanks very much! I'd kind of like the stuff to be in more of a permanent location tho - any tips on how I'd do that? Can I have it so it always mounts to a folder in my home directory?

I've tried stuff like

mount /dev/sda2/home/ /home/ubuntu

ubuntu is the folder I created in my home dir. I get various errors, one of them is /home/ubuntu is not a mount point.

All my music and pictures are on that other partition and I'd like them more readily available than going to /mnt/tmp

jschiwal 11-18-2007 09:02 PM

Quote:

Originally Posted by 1968eric (Post 2963547)
That worked. Thanks very much! I'd kind of like the stuff to be in more of a permanent location tho - any tips on how I'd do that? Can I have it so it always mounts to a folder in my home directory?

I've tried stuff like

mount /dev/sda2/home/ /home/ubuntu

ubuntu is the folder I created in my home dir. I get various errors, one of them is /home/ubuntu is not a mount point.

All my music and pictures are on that other partition and I'd like them more readily available than going to /mnt/tmp

Take the "/home/" off the device name. You won't want to mount it under a home directory if you want other to be able to read the files. You could create a symbolic link to /mnt/tmp/ if you wanted to. Also, if /home/ubuntu already has files in it, they well be concealed if you mount a partition over the directory.

mrrangerman 11-18-2007 09:22 PM

Quote:

Can I have it so it always mounts to a folder in my home directory?
So you want every time you boot openSuse it will mount your Ubuntu?


Quote:

I've tried stuff like

mount /dev/sda2/home/ /home/ubuntu
No that wouldn't work your /home on the ubuntu would need to be on it's own partition before you would be able to mount it by its self.

mount /dev/sda2 /home/ubuntu

If you want this to happen each time you boot then you will have to edit your /etc/fstab

It would look something like this

Code:

/dev/sda2  /home/ubuntu  ext3    defaults  1  1
This is assuming the ubuntu is using the ext3 file system.

NOTE: It would be smart to make a backup of your fstab incase something goes wrong. as root do # cp /etc/fstab fstab.old


All times are GMT -5. The time now is 03:01 PM.