8

I've a lot of partitions named loop they're likely created by a snap app called Anbox, I could care less about lopp0 to loop4 but the partition named loop5 which is mounted at /media/sumeet/disk appears in nautilus

Nautilus screenshot 326mb volume is the loop partition is question

when I opened this partition I found that I don't have the permission to open most of the folders inside it.


output of lsblk

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0 341.2M  0 loop /snap/anbox/16
loop1    7:1    0     4K  0 loop /snap/anbox-installer/11
loop2    7:2    0     4K  0 loop /snap/anbox-installer/12
loop3    7:3    0  78.4M  0 loop /snap/core/1577
loop4    7:4    0  79.5M  0 loop /snap/core/1689
loop5    7:5    0 310.8M  1 loop /media/sumeet/disk
sda      8:0    0 111.8G  0 disk 
├─sda1   8:1    0   7.6G  0 part [SWAP]
├─sda2   8:2    0     1K  0 part 
├─sda5   8:5    0  19.1G  0 part /
└─sda6   8:6    0  85.1G  0 part /home
sdb      8:16   0   1.8T  0 disk 
├─sdb1   8:17   0   220G  0 part /media/sumeet/Stuff
├─sdb2   8:18   0   220G  0 part /media/sumeet/Movies
├─sdb3   8:19   0   710G  0 part /media/sumeet/Hollywood
└─sdb4   8:20   0   713G  0 part /media/sumeet/Series

output of ls /media/sumeet/disk

acct           etc                   init.zygote32.rc     selinux_version
anbox-init.sh  file_contexts.bin     init.zygote64_32.rc  sepolicy
cache          fstab.goldfish        mnt                  service_contexts
charger        init                  oem                  storage
config         init.environ.rc       proc                 sys
d              init.goldfish.rc      property_contexts    system
data           init.rc               sbin                 ueventd.goldfish.rc
default.prop   init.usb.configfs.rc  sdcard               ueventd.rc
dev            init.usb.rc           seapp_contexts       vendor

How can I hide loop5 from being visible in nautilus?

  • 1
    I don't think you can "delete" these loop devices without breaking your snap application. And the loop5 one looks as if this is the internal memory of your emulated Android device. – Byte Commander May 6 '17 at 17:32
  • @ByteCommander I think so too, but I do not have permission to make changes in it. Can I at least hide it? – Sumeet Deshmukh May 6 '17 at 17:34
  • See stackoverflow.com/questions/11092601/…, maybe that does help to hide it in Nautilus? – Byte Commander May 6 '17 at 18:02
  • @ByteCommander seems a bit confusing, reading it. – Sumeet Deshmukh May 6 '17 at 18:04
  • 1
    I have no direct answer, but be aware that these are not partitions; these are loopback devices, which are normally used to mount files as if they were partitions. I point this out so that you don't go on a wild goose chase looking for new partitions on your disk. – Rod Smith May 6 '17 at 22:26
5
+50

The easiest way to do this would be to do it with GUI

  • Go to disk app (through Unity Dash or terminal with gnome-disks command)
  • Choose your partition (that would be loop5)
  • Click the little gear icon Gear icon
  • Select Edit mount options
  • Toggle Show in User Interface to Off

It'll stop showing the partition in Nautilus but will not affect Anbox in any way

  • That simple? now i'm regretting that I started a bounty on this one ;p – Sumeet Deshmukh May 17 '17 at 10:08
  • I'm half a mind to take that bounty – Yoginee Pingale May 17 '17 at 14:26
1

I am using Ubuntu 16.04.3 LTS,

It is a fresh install, with all updates done, for some reason the above solution doesn't work.

Toggle Show in User Interface to Off in the disks application did not work, nautilus still showed the partition after mount -a and even a reboot.

I fixed it by adding x-gvfs-hide in /etc/fstab, like this

UUID=123-some-number-s /home/user/special ext4 defaults,x-gvfs-hide 0 0

after this the partition is mounted properly but hidden in nautilus.

Let me know if there is a better solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.