I need to hide an NTFS partition from listing in the nautilus. How can I achieve that?
Is there any tool to do that?
And how can I hide files in ubuntu (except . operator)
|
I need to hide an NTFS partition from listing in the nautilus. How can I achieve that? Is there any tool to do that? And how can I hide files in ubuntu (except . operator) |
||||
Hiding partitions from Nautilus via »Disks«In Ubuntu 12.10 and onward, there is a utility called Disks which shows all the available disks and allows to modify mount options for each partition. Amongst the various options, you can decide if the partition will be mounted at boot time or not, and if it will appear in the user interface. Admin privileges are needed to apply changes. |
|||||||||||||||||||||
|
|
This guide may help you.
|
|||||||||||||||||||||
|
|
Thanks for this, very handy tutorial. I actually found a much easier way to do this in Ubuntu 14.04
No terminal required, maybe this is a new feature for 14.04 ? Not sure either way this was much easier and effective. I rebooted again to double check windows system after this task was complete and dual boot worked perfectly. This is an awesome way if you don't have time to stuff about in case something goes wrong OR if you are still learning the fine art of terminal commands :P Hope this helps. Cheers |
|||
|
|
|
Tachyons presents a great answer that shows how to hide a partition to udisks applications (such as Dolphin). Relying on a fixed partition name is error-prone though, it's better to use UUID that are unique to a partition. This answer was tested with Kubuntu 13.10. To do so, one first has to find a UUID. That can be found in multiple ways, one of them is by running the command
/org/freedesktop/UDisks2/block_devices/sda1:
org.freedesktop.UDisks2.Block:
Configuration: []
CryptoBackingDevice: '/'
Device: /dev/sda1
DeviceNumber: 2049
Drive: '/org/freedesktop/UDisks2/drives/...'
HintAuto: false
HintIconName:
HintIgnore: false
HintName:
HintPartitionable: true
HintSymbolicIconName:
HintSystem: true
Id: by-id-ata-...-part1
IdLabel: SystemReserved
IdType: ntfs
IdUUID: A10CDE7682786D73
IdUsage: filesystem
IdVersion:
MDRaid: '/'
MDRaidMember: '/'
PreferredDevice: /dev/sda1
ReadOnly: false
Size: 104857600
Symlinks: /dev/disk/by-id/ata-...-part1
/dev/disk/by-id/wwn-...-part1
/dev/disk/by-label/SystemReserved
/dev/disk/by-uuid/A10CDE7682786D73
Now, in order to hide this partition, create a udev rule that matches the partition by this UUID and hide it from udisks. For instance, if you want to hide the above NTFS partition (with UUID A10CDE7682786D73), and another ext4 partition (with UUID faae2c6a-0545-4bfa-a545-440c63467467), your
# hide "SystemReserved" partition in UI
SUBSYSTEM=="block", ENV{ID_FS_UUID}=="A10CDE7682786D73", ENV{UDISKS_IGNORE}="1"
# hide /home partition in left panel
SUBSYSTEM=="block", ENV{ID_FS_UUID}=="faae2c6a-0545-4bfa-a545-440c63467467", ENV{UDISKS_IGNORE}="1"
The comments are optional, but recommended so that the UUID becomes less magic. Be sure not to mix up After creating the rules file, apply it by rebooting or by running:
Now run the
HintIgnore: true
|
|||||
|
|
The answer should now be updated. You can follow this guide, but with a difference: you don't have to write this (as was originally written in the other answer)
Instead, you should write this:
The rest is the same :) |
||||
|
|
|
You can't really hide partitions so that they absolutely 100% can't be mounted in Linux, short of physically removing the disks on which they reside. That said, I don't think you need that level of safety. I suspect you just don't want to accidentally click an icon and get into the NTFS partition. To do that, you can edit the /etc/fstab file. Add an entry like this for each partition you want hidden: Suppose your ntfs partition is dev/sda1 Then use this code
.
See this Answer . Source |
|||||
|
|
In Dolphin, which is not Nautilus but similar application for Kubuntu, I can just right click on the device in the left pane. Then a menu pops up an I can choose |
|||
|
|
|
In my version, 14.04.2, I have a slightly different menu in the Disks option to hide partitions. 1 Open Disks 2 Left click the drive with partitions you want to hide (it turns orange) 3 Left click the partition you want to hide (it turns orange) 4 Click the double-cog in the bar below the partitions 5 Click "Edit Mount Options" 6 Turn Automatic Mount Options Off 7 Uncheck "Mount at startup" 8 Uncheck "Show in user interface" 9 Click "OK" 10 Enter password This took immediate effect in my computer. |
|||
|
|
|
Get your disk UUID:
Edit
Create a protected /media/root folder (to prevent users to access the partition if mounted):
Several independant layers of protection against mounting and visibility:
Documentation: Note that the block device (eg. To go further: After that, if you want to mount the block device invisibly, in a container-like approach, you can use
BEWARE: Most/all answers, including the udev rule answers, just hide the partition from Nautilus but users can still mount it with standard permissions, through the Disk utility ( |
|||||
|
This will be the easiest way to hide the "Weak" Windows Partitions from the "Robust" Ubuntu 14.4.Ubuntu: Click on: Search your computer and online sources Write Disks in the dialog box, then Click on (Disks) Click the partition you want to hide (it changes color) Click the double-star (More Options) in the bar below the partitions Select "Edit Mount Options" Turn Automatic Mount Options (OFF) Uncheck "Mount at startup" Uncheck "Show in user interface" Click "OK" Enter password. ( YOU ARE DONE! ) This will take immediate effect but, reboot is necessary.Windows: No need to hide Ubuntus Partition from Windows! Windows automatically Ignores other non windows OS's Partitions. |
||||
|
|
|
You may set a partition as hidden in gparted if your disk has a GUID Partition Table (GPT). Simply install and run gparted, right-click your partition, manage flags, and set the partition as hidden. |
|||||
|
To unmount
./.test/is hidden you can only mount a device if its not mounted already by the command I given or u have to use
oldmount and newmount are folder names |
||||
|
|
fstabor otherwise. If it is external then it gets more complicated withudevrules. – Huckle Apr 22 '12 at 2:02