2

I just installed Ubuntu 14.04.1 onto a drive with existing partitions. I want to make a link/shortcut to one of my games installed on one of the partitions (/media/emily/ Gaming). After making a link of the .jar file (FTB.jar) and moving that link to desktop it works. But after restart it says the link is broken and asks me to trash it.

The drive currently says it's mounted. Any suggestions as to why this is happening?

I'm very new to linux, so a detailed description of what might be happening and suggestions to fix it would be appreciated.

After restart:

$ lsblk
NAME    MAJ:MIN  RM  SIZE    RO  TYPE  MOUNTPOINT
sda     8:0      0   298.1G  0   disk
├─sda1  8:1      0   28G     0   part  /
├─sda2  8:2      0   1K      0   part
├─sda3  8:3      0   6.5G    0   part  [SWAP]
├─sda4  8:4      0   65.6G   0   part  /home
├─sda5  8:5      0   100G    0   part
└─sda6  8:6      0   98G     0   part  
sr0     11:0     1   1024M   0   rom

$ cat /etc/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>
# / was on /dev/sda1 during installation
UUID=2fee48ec-8d63-4125-9eca-5b2e1061602d /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda4 during installation
UUID=b3804a77-7d80-40a6-8f92-212bed16a151 /home           ext4    defaults        0       2
# swap was on /dev/sda3 during installation
UUID=8fff87b8-2128-48ae-bfd4-bc959458f99d none            swap    sw              0       0

After making a link from the gaming partition:

$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sda4 on /home type ext4 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup         (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=emily)
/dev/sda5 on /media/emily/ Gaming type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
23
  • Correct me if I'm wrong but "/media/emily/ Gaming" indicates to me that you are linking to an external USB drive. Is this correct?
    – Elder Geek
    Feb 19, 2015 at 23:53
  • No. I just have 1 drive with 3 partitions. 1 for Ubuntu, 1 labeled pictures & 1 labeled gaming. However, in order for me to use my drive I had to buy an adapter to convert the drive to Sata. (old IDE hard drive. New computer with Sata only ports)
    – Emily L
    Feb 19, 2015 at 23:56
  • and the output of cat /etc/fstab please?
    – Elder Geek
    Feb 20, 2015 at 0:09
  • How do I do that? I'm a beginner in Linux.
    – Emily L
    Feb 20, 2015 at 0:11
  • 1
    LOL! Thank you so very much! You've been a huge help! And yes, lets remove the many comments =)
    – Emily L
    Feb 20, 2015 at 20:45

1 Answer 1

4

In Ubuntu, partitions may be automatically mounted when you first click on one in Nautilus, and unmounted by right-clicking and selecting "unmount". While it was mounted, you could create a working link, but after restarting, it isn't mounted until you click on it again; then, the link would work.

The solution is to explicitly mount the partition. This connects it to the filesystem at some directory of your choosing. So, there are several steps required, but none of them are very complicated, although slightly problematic because of permissions, especially when the partition is formatted as NTFS, which seems to be the case with yours.

For learning, you can use the mount command in a terminal, and the umount command to unmount. But in the end, you will want to make a permanent entry in /etc/fstab, although there is a method to experiment there, too, using a form of the mount command to tell it to mount everything in the file, and see if you get errors. If things are not to your liking, you would issue the umount command to unmount the new partition, edit the file, then try again.

This is probably not clear, but I'll explain later.

One problem is that I don't have any NTFS partitions, so I can't really tell you exactly what options to use to get the right permissions, which is why I tried not to post an answer, but commented instead.

Now, notice that the mount command gave you a line like this:

/dev/sda5 on /media/emily/ Gaming type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)

I don't know why there is a space before "Gaming", though. That looks like an error, but it doesn't matter, as we will create a directory to use.

A... First of all, you need to create an empty directory to use for mounting, because it needs to exist. So, to keep from getting too confused with the automatic mountpoint, create it under the directory /mnt, like so:

sudo mkdir /mnt/gaming
sudo chown emily:emily /mnt/gaming

I'm assuming emily is your username; if not, substitute whatever it is.

B... Next step is to find a better identifier for the partition. You could use "/dev/sda5", but that's not the most reliable label, because it can change. I personally use the disk label, for clarity, but most people seem to want to use the UUID, which is assigned at format time, and is always unique. To find this ID, you would enter sudo blkid and look for the line starting with "/dev/sda5". There should be a section with something like UUID="nnnnnnnnnnnnnnnn", some combination of numbers and digits. You will copy that into the fstab file (highlight the big number, copy using shift-ctrl-C, then paste it into the file (later, though).

C... Next, open /etc/fstab for editing; I'll assume you will use gedit, but any basic editor is OK. Enter gksu gedit /etc/fstab (because the file is owned by root). Add a line to the end of the file:

UUID=nnnnnnnnnnnnnn /mnt/gaming ntfs-3g defaults,user_xattr 0 0

D... Save, but don't close the file. Go to a terminal, and type mount -a. This will mount everything in /etc/fstab, and hopefully will not give any errors. If you get any errors for the line you added, and don't understand the reason, then add a pound sign (#) to the beginning of the line to disable it, save, close, and post back for help.

If it works OK, try finding the directory /mnt/gaming, and see if the partition is accessible. Try creating a link to that directory, and see if it works the way you want.

I hope this will help. If not, perhaps someone else can do better, as I need to leave for now.

EDIT

I tried to add bullets and it messed up some formatting, which I didn't notice because I had to leave in a hurry. So, 2 lines got unseparated into one, and the result was:

 sudo mkdir /mnt/gaming sudo chown emily:emily /mnt/gaming

I feel bad about this; what it did was to make more directories than the one - it created /mnt/gaming, sudo, chown, and emily:emily, and then tried again to create /mnt/gaming, resulting in the error message. No real harm done except for some strange directories (owned by root because of sudo). All of them except /mnt/gaming are in whatever directory you were in when you issued the command (maybe your home directory, /home/emily). I will help you delete them when you're ready. I'm really sorry about that; I didn't initially want to answer because I didn't have enough time, and perhaps it was a mistake to try.

Edit 2

When you typed /mnt/gaming, The system tried to run a file named "gaming" in the "/mnt" directory. You need to do cd /mnt/gaming and then ls to see the files, or use Nautilus to find that directory under the filesystem root directory.

I don't know what the gedit error was, but it may not have been related to anything. When you typed sudo mount -a, it should do nothing if it works; this is the linux way. If there's an error, it tells you; otherwise it just quietly does what you expect. So, assuming the partition shows up, it worked.

Note

I will keep checking back until solved

4
  • When I tried making an empty directory (sudo mkdir /mnt/gaming sudo chown emily:emily /mnt/gaming) It told me that directory already exists. I continued on and when I typed 'mount -a' nothing happened. So I saved and closed gedit, when I went back to the terminal it gave me this error: (gedit:2556): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files I went back and put the # where you said to put it if I got an error, saved it, then closed it.
    – Emily L
    Feb 20, 2015 at 3:28
  • I also went ahead and typed '/mnt/gaming' into the terminal and got this: 'bash: /mnt/gaming: Is a directory' any further help would be appreciated.
    – Emily L
    Feb 20, 2015 at 3:31
  • Sorry, I messed up the formatting when I tried adding bullets. Please see my edits. Feb 20, 2015 at 4:23
  • I think you can probably leave the added line without the '#' in front. I can't see how that error would be caused by the edit, but perhaps by something to do with gedit (I don't normally use it, I use a different editor). Feb 20, 2015 at 4:30

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