4

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.

Henry van Megen
  • 175
  • 1
  • 9

2 Answers2

3

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
BlueBerry - Vignesh4303
  • 8,129
  • 22
  • 68
  • 99
1

I know this answer is ancient, but I still needed it today after reinstalling my OS:

As stated by BlueBerry in the accepted answer, I changed my mounting location from /media/storage to /mnt/storage and it works; the unmount button has vanished.

Shown below is my current /etc/fstab :

# Default filesystem setup
# <file system>                 <mount point>           <type>  <options>                                <dump>  <pass>
/dev/mapper/ssd-root            /                       ext4    errors=remount-ro,noatime,nodiratime     0       1
/dev/mapper/hdd-storage         /mnt/storage/           ext4    defaults                                 0       2
/dev/mapper/ssd-swap_1          none                    swap    sw                                       0       0

# Home directories
# <file system>                 <mount point>           <type>  <options>                                <dump>  <pass>
/mnt/storage/home               /home                   none    defaults,bind                            0       0
/mnt/storage/var/log            /var/log                none    defaults,bind                            0       0

# SSD tweak: temporary directories as tmpfs
# <file system>                 <mount point>           <type>  <options>                                <dump>  <pass>
tmpfs                           /tmp                    tmpfs   defaults,noatime,nodiratime,mode=1777    0       0
tmpfs                           /var/tmp                tmpfs   defaults,noatime,nodiratime,mode=1777    0       0

I hope this might help someone in the future.

Henry van Megen
  • 175
  • 1
  • 9