Add the entry of partition in '/etc/fstab' file with 'hidden' option
# egrep -v "^#|^$" /etc/fstab
....
/dev/sda7 /VM ext4 defaults 0 0
UUID=96a1Dxxx hidden ext4 ro,noauto 0 0 #------>Partition to Hide
UUID=B40EAxxx hidden ntfs ro,noauto 0 0 #------>Partition to Hide
UUID=3AE8Cxxx hidden ntfs ro,noauto 0 0 #------>Partition to Hide
#
Run 'blkid' command to Get the UUID of PArtition
# blkid
/dev/sda1: UUID="B40EA1870EA1436A" TYPE="ntfs"
/dev/sda2: LABEL="Box" UUID="3AE87394E8734CDF" TYPE="ntfs"
/dev/sda4: UUID="12a0fdf8-36a2-4229-8eb1-61974bc96e9e" TYPE="ext4"
/dev/sda5: UUID="404dcc26-a3ef-456d-b582-0de7f31e68c9" TYPE="swap"
/dev/sda6: UUID="96a1d938-558d-448f-847b-6e407a7eed0a" TYPE="ext4"
/dev/sda8: UUID="8ec6b507-13f9-42c9-8bba-f57445efd0a5" TYPE="ext4"
#
In Old Version of Ubuntu
----------------------------------------------
Add the '/etc/udev/rules.d/hide-partitions.rules ' file with 'ENV{UDISKS_PRESENTATION_HIDE}="1"' entry
# cat /etc/udev/rules.d/hide-partitions.rules
ACTION!="add|change", GOTO="hide_partition_end"
SUBSYSTEM!="block", GOTO="hide_partition_end"
KERNEL=="loop*|ram*", GOTO="hide_partition_end"
KERNEL=="sda6", ENV{UDISKS_PRESENTATION_HIDE}="1"
LABEL="hide_partition_end"
#