Linux – How to disable the ‘unmount’ option for the second internal harddisk in Ubuntu

linuxUbuntuubuntu-unityunmountuser interface

Edit: it seems that this is a known bug and that it is impossible.

How can I disable the 'unmount' option for my second internal harddisk in Ubuntu?

My system consists of a 128GB SSD and a 1TB HDD.

The reason I want to disable this button is to prevent accidental clicks when I'm clicking the unmount buttons for USB sticks that I'm unmounting.

There is absolutely no reason for me to unmount this internal HDD, yet I still see the 'unmount' button (underlined triangle) in my Unity filebrowser side pane.

enter image description here

Here is a snippet of my /etc/fstab:

# <file system>                              <mnt>           <type>    <options>                               <dump>    <pass>
/dev/mapper/ssd-root                         /               ext4      noatime,nodiratime,errors=remount-ro    0         1
UUID=8e645641-889d-4eec-b356-8fe90d683bf8    /boot           ext2      defaults                                0         2
/dev/mapper/ssd-swap_1                       none            swap      sw                                      0         0
/dev/mapper/hdd-storage                      /media/storage  ext4      noatime,nodiratime,errors=remount-ro    0         1
/media/storage/home                          /home           none      defaults,bind                           0         0
/media/storage/var/log                       /var/log        none      defaults,bind                           0         0

EDIT: Setting the mount location from /media/* to /mnt/* solved this issue.

Best Answer

As per this bug gnome users were already facing it ,Hope there might be some fix around it soon

Now as of know you could change the mount point to /mnt/"something". Modify your fstab and it shouldn't show the unmount option any longer.

Then you may bind mount it to the directory you want:

UUID=your_uuid_here /mnt/DATA ext4       defaults        0       2
/mnt/DATA             /home/yrogirg/DATA   none bind 0 0
Related Question