0

Just did a fresh install of ubuntu 12.04 and decided to try something new. I have 1Tb internal hard drive that I use for storage. I found a guide to mounting it, and have followed it, here's my fstab:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sdc1 during installation
UUID=34b6be44-858b-42dc-a730-08ea8f622ef6 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sdc5 during installation
#UUID=835004e4-cfab-4d20-b4f8-27327d8ce6ef none            swap    sw              0       0
# swap was on /dev/sdd5 during installation
#UUID=d0a5e5b8-c644-465a-82ab-46e561c19f9c none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0
/dev/mapper/cryptswap2 none swap sw 0 0
UUID=697A-2902 /home/nicola/Storage/    vfat    uid=1000,gid=1000,umask=0022,sync,auto,rw   0   0

I rebooted and was amazed to see Storage pop up as mounted, as well as in my home directory. Here's the issue though, when I open it, it appears empty. I have checked the code and it seems to be correct, what could be causing this? any help would be greatly appreciated

1 Answers1

1

In terminal:

$ sudo df -H    
/dev/sdb1  1.0T  155G  846G  16% /media/F1FD-B614

This is my 1tb second internal hard drive. It is located at /media/F1FD-B614.

Note that it's boot location is /dev/sdb1.

$ sudo blkid
/dev/sdb1: UUID="F1FD-B614" TYPE="vfat"

I find my boot location in the list. Now I have my UUID and my type info.

$ cd /etc
$ sudo gedit fstab

Now go to the bottom of fstab and enter the following lines. The first is just a comment to remind you what the entries are. The second is an example of what you would get using values from the procedure above. You will undoubtedly get different values for UUID and mount locations, and perhaps also the boot location. Don't use the sample values. Use the values you get from your own terminal session. I had to go through about 10 different web sites to consolidate this information so nobody really gets the credit.

Here are the lines to add in fstab:

#UUID= 'uuid from blkid' 'location from sudo df -H' 'type from blkid'  defaults 0 2
UUID=F1FD-B614 /media/F1FD-B614 vfat    defaults    0   2

Save the file and reboot the system. It worked fine for me. When you get it working with its original location in the /media directory, you may be able to change its mount location, but what's the point- it already works.

UPDATE: I found that the above method has a problem in that 'Create new folder' and other options are greyed out. The reason for this is because the method creates a mount that only has root permissions. To fix this do the following in terminal:

$ id -u
1000

$ id -g
1000

$ cd /etc
$ gksudo gedit fstab

The first two commands give you your user id and group id respectively. The values must be added to the options field of the fstab entry for the drive to be auto-mounted. In fstab I modified my entry as follows:

UUID=F1FD-B614 /media/F1FD-B614 vfat defaults,umask=007,uid=1000,gid=1000    0    2

Apparently I had to use this tecnique because my second drive is formatted as fat32 (vfat). Apparently NTFS would have the same issue. For a more detailed explanation see this link: Change owner of internal hard drive partition from root to user