F
FormerUser-400995
Guest
Cosmetic tweaks are something I rarely revisit, however, from time to time I see people struggling with the question of hiding specific Volumes from their desktop, and Finder windows. Finder preferences don't allow hiding of a specific Volume, instead, they provide an "all-or-nothing" approach which doesn't satisfy the need.
Using the /etc/fstab file to prevent a Volume from automatically mounting at boot effectively "hides" any partition/volume. You can still mount the Volume manually.
How do I find the UUID?
The most reliable way to uniquely identify a particular Volume is by having /etc/fstab reference its UUID. To find the UUID of a Volume, start by using DISKUTIL to find its identifier (eg: disk0s3):
How do I hide a Mac or Windows Volume?
Note that (as from OS X Lion) the /etc/fstab file does not exist by default. There is a placeholder file - /etc/fstab.hd - do NOT attempt to use that file as it will be completely ignored. You will need to create /etc/fstab manually. Tou can use TextWrangler or TextEdit, but for the purposes of this example I will use Nano/Pico:
What about Windows "System Reserved"?
Note: Because DISKUTIL does not show a UUID for the Windows "System Reserved" boot volume, /etc/fstab will need to reference the Volume label instead. However, it first needs to be 'Unicode Escaped' as follows:
After a reboot (if all goes well) the Volumes will now be effectively hidden from Finder, and your desktop.
Hope this helps.
Using the /etc/fstab file to prevent a Volume from automatically mounting at boot effectively "hides" any partition/volume. You can still mount the Volume manually.
How do I find the UUID?
The most reliable way to uniquely identify a particular Volume is by having /etc/fstab reference its UUID. To find the UUID of a Volume, start by using DISKUTIL to find its identifier (eg: disk0s3):
- In Terminal, type: diskutil list to list all mounted Volumes.
- Once you have the disk identifier (eg: disk0s3), type: diskutil info disk0s3 to display more detailed information including the UUID (if available). Substitute this example for your own disk identifier.
How do I hide a Mac or Windows Volume?
Note that (as from OS X Lion) the /etc/fstab file does not exist by default. There is a placeholder file - /etc/fstab.hd - do NOT attempt to use that file as it will be completely ignored. You will need to create /etc/fstab manually. Tou can use TextWrangler or TextEdit, but for the purposes of this example I will use Nano/Pico:
- In Terminal, type the following to open Nano/Pico and create the new fstab file:
Code:sudo nano /etc/fstab
- In Nano/Pico, enter one of the following (Substitute XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX for your own UUID):
- For a Mac HFS+ Volume
Code:UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX none hfs rw,noauto
- For a Windows NTFS Volume:
Code:UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX none ntfs ro,noauto
- For a Windows FAT32 (or FAT16) Volume:
Code:UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX none msdos rw,noauto
- For a Mac HFS+ Volume
- Press ^X (CTRL+X) to exit Nano/Pico.
- Press Y and ENTER when prompted to save the /etc/fstab file.
- Reboot.
What about Windows "System Reserved"?
Note: Because DISKUTIL does not show a UUID for the Windows "System Reserved" boot volume, /etc/fstab will need to reference the Volume label instead. However, it first needs to be 'Unicode Escaped' as follows:
Code:
LABEL=System\040Reserved none ntfs ro,noauto
After a reboot (if all goes well) the Volumes will now be effectively hidden from Finder, and your desktop.
Hope this helps.