I wanted to do the same and got the same issue with the method you used.
Here's another approach which I used successfully:
sudo losetup --find --show ./MacImage.img
/dev/loop9
sudo partprobe /dev/loop9
sudo mount /dev/loop9p2 /mnt/Mac-part-2
Hope this helps.
Changing your mountpoint needs three actions: changing the entry in /etc/fstab
(be careful), creating the directory where it should be mounted (if necessary, but in your case it possibly exists already), and you will probably want to change the partition label as well (if necessary), to have the right name appear in the devices overview in nautilus.
No need to say that you ALWAYS need to make backups before you change anything.
if it is a data only partion:
1. Edit the existing entry in fstab
Run in terminal:
sudo gedit /etc/fstab
Lookup the entry with mountpoint: "stuff1", change it to "stuff" (check first if there is no entry with "stuff" already), do not touch the rest. In the line, you can see in what directory the partition is mounted (the section that ends with "stuff").
2. Create a directory to mount into
Create (if necessary) in the same directory a folder named "stuff", but as said, it probably exists already":
sudo mkdir /path_to_stuff/stuff
On next restart, you will find your documents in "stuff".
3. Changing the partition label:
There is a chance that you need to change the partition label. You can check that by looking in the device overview in nautilus. If that is "stuff" already, skip step 3. If not: the best is to do it with Gparted, which you will have to install. Open Gparted. In the partition overview, right-click on the partition with label "stuff1", choose "unmount". When it is unmounted, right-click again and choose "label". Rename it to "stuff". After renaming the label of the partition, close Gparted and run:
sudo mount -a.
Probably you will also have to rename the nautilus bookmark: open a nautilus window, from the menu, choose Bookmarks > Bookmarks
. Rename the bookmark.
Best Answer
This seems to happen when three conditions are met:
udisksctl mount
/media/$username/$partition_label
, so in this case, probably/media/dinesh/Name
So, there are three solutions:
1. Delete the existing dir(s)
This is quick and dirty - more of a workaround than a solution.
With the drive unmounted, run this command:
Note that rmdir will only delete empty dirs, so if you accidentally run this while the drive is mounted, it shouldn't do any harm.
2. Create an entry for the partition in /etc/fstab
From nathwill's answer on a related question:
If you prefer GUI, you can use Disks (
gnome-disks
) to set up an fstab entry:gnome-disks
3. Mount the partition using CLI
This uses
sudo mount
, which IMO is way more hassle than the other two options, so I won't even bother explaining it.More details
When using
udisksctl mount
, if the default mount point already exists, it will append1
. If the mount point with1
already exists, it will iterate the number (2
,3
, etc). It seems like earlier versions of Ubuntu usedudisks --mount
in the backend, which would mount to/media/$partition_label
, and append an underscore if the mount point already existed. For example, see Why does the mount point keeps changing, and how can I prevent it?