In the OS 9 days, there was a low-level disk setting that told the disk whether or not it should automatically mount. OS X does not have this option and, like many good things in the system, it relies on old-school Unix.
I actually use this trick fairly often (and, it can be considered an adjuct to my August 2006 MacTech column "GUI up Your Script). It's great to be able to clone the system disk, and then 'hide' it. The benefit of this is that if the primary drive fails, a cloned disk will just boot, without the operator knowing what happened.
To make sure a partition is 'hidden' or doesn't mount at start up, here's what you need to do. For argument's sake, let's say we need to hide the "StuC_HD_Backup" partition:
1. We need to find the UUID for the disk. We can only get that via the slice number, so, we get that first:
# diskutil list
/dev/disk0
#: type name size identifier
0: Apple_partition_scheme *76.7 GB disk0
1: Apple_partition_map 31.5 KB disk0s1
2: Apple_HFS StuC_HD 76.6 GB disk0s3
/dev/disk1
#: type name size identifier
0: Apple_partition_scheme *279.5 GB disk1
1: Apple_partition_map 31.5 KB disk1s1
2: Apple_HFS StuC_HD_Backup 139.6 GB disk1s3
3: Apple_HFS backup2 139.6 GB disk1s5
Great! Stu_C_HD_Backup is "disk1s3"
2. Now, let's get the UUID:
# diskutil info disk1s3
Device Node: /dev/disk1s3
Device Identifier: disk1s3
Mount Point:
Volume Name: StuC_HD_Backup
File System: Journaled HFS+
Owners: Disabled
Partition Type: Apple_HFS
Bootable: Is bootable
Media Type: Generic
Protocol: ATA
SMART Status: Verified
UUID: CDCDFBA1-EF2C-39FA-998B-94C63B8F23E1
Total Size: 139.6 GB
Free Space: 0.0 B
Read Only: No
Ejectable: No
Device Location: "B (lower)"
Note the "UUID" line. Copy the UUID value.
3. Edit /etc/fstab - the "File System Table".
This file may not exist, so, you'll be creating it from scratch. You can read the fstab man page for more info, but the idea is this: the system looks to this file to gather mount options for disks. Since OS X doesn't guarantee assigning the same device id to the same disk each boot, we need to tell the system to use the same mount options for a particular UUID. The option we need to pass is the 'noauto' flag. Here's the /etc/fstab entry for the disk in question:
# fstab
# Created 28 March 2006
# Ed Marczak
# Identifier, mount point, fs type, options, dump order, check order
UUID=CDCDFBA1-EF2C-39FA-998B-94C63B8F23E1 none hfs rw,noauto 0 0
4. Reboot, and you'll see that the partition in question hasn't mounted.
It's not 100% 'hidden', though. You can still use Disk Utility.app, or diskutil in the shell, to see the presence of the disk and mount it. Short of removing the disk from the system, you can't entirely conceal it. This is good, though. Remember when I mentioned the use of this disk as an ASRed clone? WIth a script, you can automatically mount this hidden partition, update the files on it (so it's current with the master) and unmount it. Here's the two lines that get you there in a script:
#!/bin/bash
theDisk=`diskutil list | awk '/Backup/ {print $NF}'`
diskutil mount $theDisk
Here, we're searching for the disk by name, since we won't know much else about it beforehand. With a little more intelligence, you can write a full-featured script that backs up the master disk with error checking, and more importantly, very little effort on the part of the end-user.
Panther way
Panther users... simple way to get the UUID-
Unmount, then remount the volume in question, and you will see the UUID spelled out clearly in system.log
Here, we're searching for
Here, we're searching for the disk by name, since we won't know much else about it beforehand. With a little more intelligence, you can write a full-featured script that backs up the master disk with error checking, and more importantly, very little effort on the part of the end-user.
essay help | dissertation help | thesis help | assignment help | coursework help
The easiest way to get the
The easiest way to get the UUID is to select the disk in Disk Utility, and hit the "Info" button. The disk identifier, UUID, and all sorts of other info are in there.
I know its hard to fight spam, but you should have a more streamlined way to post comments!
I am looking forward for
I am looking forward for your next post, I will try to get the hang of it!
adult high school | online ged | homeschool online | life experience diploma | adult high school diploma
Mark Ling, the internet
Mark Ling, the internet marketing guru has launched another fantastic product: AffiloJetpack which is highly recommended for both newcomers and experienced internet marketers! Check my AffiloJetpack Review and AffiloJetpack Bonus for more information!
Really, I think that the
Really, I think that the software rocks rocks , but there are a few features that need improvement.
lace wedding dresses|blue topaz earrings
Really cool
Really cool guidelines!
Professional web design
Since OS X doesn't guarantee
Since OS X doesn't guarantee assigning the same device id to the same disk each boot, we need to tell the system to use the same mount options for a particular UUID. The option we need to pass is the 'noauto' flag. Online accredited High School | high school equivalency test
I got the notification in
I got the notification in the mail and am very much interested in being a part of this initiative!The issue of poverty speaks to my heart. Many of society's ills can be traced to this root. online bachelors degree | computer science school
This is really nice blog, I
This is really nice blog, I am very impressed.
du doan bong da
Nice tutorial.. Mounting and
Nice tutorial.. Mounting and hiding a partition is not that easy at all, and sometimes, we encounter mistakes. This guideline helped so much..
--Stephanie03
Your Forex Robot enthusiast
I used bootcamp to install
I used bootcamp to install XP on a MacBook. Everything works fine, except when I boot OS X, the XP partition is mounted on the desktop and everyone has read access. This is a problem, because there will be multiple people using the computer and I do not want them accessing each others files. Is there a way to disable OS X from reading the NTFS partition or at least keep it from mounting on the desktop?
Plumbers4you
I was wondering if this
I was wondering if this tutorial still works I was going to try it on my piano tutorial and debt solutions uk sites not sure if it would work. eurodebt
I wanted to thank you for
I wanted to thank you for this great read!
http://freewayautoinsurance.net - http://wurlitzerjukebox.net
I have an external hard disk
I have an external hard disk with two partitions on it: a principal partition is used for all my stuff (apps, games, user file, music, etc.), and a secondary partition with a minimal OS X installation, containing some diagnostic and recovering software utility, that I periodically use for backup and testing purposes.
StylenGlamour
The principal partition is obviously always active, but ideally the secondary partition would be inactive or hidden on boot, so that it no longer appears on my desktop and would be manually actived when needed (with Disk Utility, the command line or via a automated backup script). For example, I know that TechTool Pro does something similar and calls such partition "eDrive."
Hot Indian Model
There are several hints on this site for unmounting a partition at login, but a better way to make this happen can be used. You need to create an entry point in your filesystem table to tell the OS not to mount that specific volume, and this is relatively easy. In Mac OS X, and under Linux and others unix systems, the volume mounting configuration file is located in /etc/fstab. This file in Mac OS X Tiger is empty (in Panther, it's commented), but type man fstab in Terminal to read some important information.
Best Matrimony
This is a problem, because
This is a problem, because there will be multiple people using the computer and I do not want them accessing each others files. Is there a way to disable OS X from reading the NTFS partition or at least keep it from mounting on the desktop? earth4energy grow taller Electronic Cigarette tava tea error fix
2010 new styles A-line
2010 new styles A-line Wedding Dresses,Beach Wedding Dresses,Evening Dresses,Prom Dresses on sale
evening dresses
Prom dresses
wedding dresses
on best wedding dresses for 2009 and 2010. You can find latest collection of woman's dresses and casual dresses on this site
discount Prom dresses
discount wedding dresses
It's been a helpful resource
It's been a helpful resource for me as i was searching for the same on internet.
SEO Company India|SMO Services|Link Building Services
Thanks for taking the time
Thanks for taking the time to post... this is good info for me!
Columbus DJ
Charlotte Home Remodeling Contractor
Grand Rapids Remodeling
Omaha Remodeling
Columbus DJ
Akron Real Estate Agent
Exterior Window Shutters