how to mount with udisks to specified directory

8,240

udisks won't mount your partitions like this. Moreover if you want persistent mount I'd suggest to edit /etc/fstab to add:

UUID=YOUR_OWN_PARTITION_UUID /media/AUX/ ext4 defaults 0 0

Note: edit /etc/fstab using sudo as it requires root privileges

Then reboot to see your drive / partition properly mounted

Share:
8,240

Related videos on Youtube

ungalcrys
Author by

ungalcrys

Updated on September 18, 2022

Comments

  • ungalcrys
    ungalcrys over 1 year

    I have ubuntu 12.04 and I need a portable solution (to work on various linux systems) and to be in my user's home directory for mounting a partition after login or after boot.

    From what I searched on web I saw that using udisks is the best solution but what I did not find is how to mount the auxiliary partition to a specified mount point (directory path)

    What I have so far is (by device name):

    /usr/bin/udisks --mount /dev/sdbX
    

    or (by uuid):

    /usr/bin/udisks --mount /dev/disk/by-uuid/1313-F422
    

    but there is no example on how to specify the mount point.

    For me, it is mandatory to have a specific directory target (/media/AUX/ for example).

    Is there a way to do this (not necessarily using udisks) ?

  • Elder Geek
    Elder Geek about 10 years
    @ungalcrys does the above meet your criterion? If not, why? I'd love to help
  • ungalcrys
    ungalcrys about 10 years
    the portable solution refers to the script file or configuration needed to have the job done (mount the device to a specified directory) but not using the sudo and preferably changes must be in my home directory
  • Elder Geek
    Elder Geek about 10 years
    @ungalcrys When reading your original question I find the statement "For me, it is mandatory to have a specific directory target (/media/AUX/ for example)." 1) sudo is not required for the answer I provided and 2) "preferably changes must be in my home directory" wasn't in the question. If it's mandatory to have access from your home directory, make a link to /media/AUX in your home directory. I hope this helps.
  • Elder Geek
    Elder Geek about 10 years
    @ungalcrys Improve your question by specifying your criteria for an acceptable answer