1

I have upgraded my Ubuntu 12.04 to 14.04. After the upgrade I noticed that my external hard disk is being mounted in a separate path.

Earlier, It used to be in /media/u10. Now I see it is mounted on /media/walt/u10.

walt is the root username for my ubuntu PC.

I have to change it manually by running this below command everytime,

sudo  mount -B   /media/walt/u10     /media/u10

How to resolve this issue , I don't want to run above command everytime.

muru
  • 197,895
  • 55
  • 485
  • 740
walterb
  • 11
  • 1
  • Any particular problem with it being mounted there? – muru Oct 05 '14 at 12:26
  • Yes. I have virtual box machines and all related disks in that drive. And Virtualbox machines don't start in that new location. – walterb Oct 05 '14 at 12:29
  • You can add an entry to /etc/fstab. – muru Oct 05 '14 at 12:34
  • What should be the fstab entry for this hard disk. WHen I do df -h for this hard disk it shows below.....

    /dev/sdb1 1.8T 240G 1.5T 14% /media/walt/u10

    – walterb Oct 05 '14 at 12:42
  • The linux file system standard changed the location for mounting remoable media - you can over ride it if you wish – Panther Oct 05 '14 at 13:00
  • 1
    It's just a workaround, but what about a symbolic link from the desired to the actual location? sudo ln -s walt/u10 /media. That's less invasive and permanent than adding an fstab entry. – David Foerster Oct 05 '14 at 13:04
  • 1
    This seems a duplicate of http://askubuntu.com/questions/214646/how-to-configure-the-default-automount-location --- it has the solution in the second (not the accepted) answer. – Rmano Oct 05 '14 at 13:14

2 Answers2

1

Use the blkid command to get the UUID of the partition on the external disk:

$ sudo blkid | grep sdb1
/dev/sdb1: UUID="cdff3742-9d03-4bc1-93e3-ae50708474f2" TYPE="ext4" 

The corresponding fstab entry will look like

UUID="cdff3742-9d03-4bc1-93e3-ae50708474f2" /media/u10 auto defaults,nofail 0 0
muru
  • 197,895
  • 55
  • 485
  • 740
1

The simple configuration would be this:

UUID="01CCD01C97D32280" /media/etc   ntfs       0              0       0

Here

  • /media/etc is the folder where you want to mount your disk
  • ntfs is the format of partition.
  • Rest values wouldn't be neccessary for plain auto-mounting and if you want advanced configuration, manual is always there. Link to the manual page .

Here UUID of any partition can be found out using:

sudo blkid

Complete procedure would be:

  • sudo blkid, to get the UUID of the disk, you can use disk-name too, but I prefer it.
  • gksudo gedit /etc/fstabedit the fstab file.
  • Append this line, to the end of configuration file.
    UUID="01CCD01C97D32280" /media/etc ntfs 0 0 0

Hope it would help :) :)

muru
  • 197,895
  • 55
  • 485
  • 740