Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a 25 gig partition in ext4 for Ubuntu, an NTFS 25 gig partition for Windows 7,a logical swap of 2 gig, and then a logical 60 gig partition in FAT32 which I've read is the correct file system for files as music, pics, videos I want to share with Windows. The problem is that those files are not "asociated" or shown in my personal folder, and it would be great to.

share|improve this question

1 Answer 1

This should be very easy to do. You can easily mount the drive wherever you wish. I would recommend mounting it in the directory /mnt, then possibly creating links to different directories within the drive, to the conventional Music, Pictures, Video, etc directories in you home directory. Here is my suggestion.

Create a directory called /mnt/shared. You will need to use a terminal commandline to create this: sudo mkdir /mnt/shared. You can then take ownership of this directory using the command sudo chown yourname:yourname, where "yourname" is your login name.

Mount the partition in /mnt/shared. To make it permanent, you will create an entry in /etc/fstab using a text editor such as "gedit". The first thing you need to do is to find the UUID of the partition (the UUID is a unique ID for the partition that never changes). To do this, enter sudo blkid and find the correct partition. It will list logical names, labels, UUIDs, and types. You will want to copy the UUID to the clipboard for pasting into the file. This is the part within the double quotes after "UUID=". Also, make note of the "TYPE"; I don't have any FAT32, so I'm not sure what it will say.

As suggested in the comment by ObsessiveFOSS below, you might want to make a backup copy of the fstab file before editing just in case.

Enter the command gksu gedit /etc/fstab and add a line at the end that will look like this (substitute the UUID you copied for the ###### part):

UUID=######### /mnt/shared vfat user,rw,umask=111,dmask=000 0 0

Save the file, but don't close it yet, and test using this command: sudo mount -a. This will mount everything in fstab, and output an error if there is one. If there is no error, you should be able to access the drive at /mnt/shared.

If there are any errors, you can try correcting them right away and repeating the command sudo mount -a if you think you see the error. If not, and you need more advice, I would advise disabling the command temporarily by adding a pound sign at the beginning, which makes it into a comment. This way, you won't inadvertently reboot with errors in the file, although this is usually harmless, especially with the new entry at the end of the file. A disabled entry would look like this:

# UUID=nnnnnnn /mnt/shared vfat user,rw,umask=111,dmask=000 0 0

Then, if you have a directory such as "Pictures" in this directory, you can create a soft link to it in ~/Pictures if the existing Pictures is empty by deleting the existing directory, and creating a link. The easiest way to do this is to use Nautilus, and in your home directory, right-click on "Pictures" and choose "Make Link", delete the existing "Pictures", rename the new link to "Pictures", then copy and paste the files from /mnt pictures folder into this one.

Alternatively, you can create links with new names in your Home directory.

Edit: Creating links to FAT32 files/folders

It seems that Nautilus will not create a link on a FAT32 partition, and there's no way to use Nautilua to create a link on the target drive, so I think the links will have to be made using the terminal (I can't test due to no FAT32 partitions).

To create a link to the entire shared directory, you can enter something like this command:

ln -s /mnt/shared ~/shared-drive (-s is for symbolic link)

You can also create multiple links to directories within the shared drive. You must specify the entire path to the linked drive - it can't be a relative path.

share|improve this answer
1  
I recommend issuing, in a terminal, sudo cp /etc/fstab /etc/fstab.old to make a backup so if anything goes wrong, the OP may run sudo rm /etc/fstab&&sudo cp /etc/fstab.old /etc/fstab to restore. –  hexafraction Jul 6 '12 at 23:05
    
thank you very much! so useful! –  fat32 Jul 6 '12 at 23:09
1  
@ObsessiveFOSS: Good idea, thanks. I forgot to add something like that as part of the testing phase. I usually leave fstab open while testing so if I have an error, I can either fix it, or disable it until later. I'll add to my answer. –  Marty Fried Jul 6 '12 at 23:12
    
thank you very much! so useful! the links idea (the last one) i tried it, but because of being because of being folders created on windows i had some issues with the names (something about symbols, I suppose is because names have hidden characters) Is my first time on Ubuntu, thank you for your help and understanding. –  fat32 Jul 6 '12 at 23:18
    
It should be able to be done, although I don't usually use FAT32 myself (ntfs works fine and is more robust). There may be additional flags that will help - I copied these from another post. Can you be more specific about the issues, and what it said? –  Marty Fried Jul 6 '12 at 23:23

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.