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
  • 207,228
walterb
  • 11

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
  • 207,228
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
  • 207,228