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”.
his 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
This is for HFS
UUID=CDCDFBA1-EF2C-39FA-998B-94C63B8F23E1 none hfs rw,noauto 0 0
This is for NTFS
UUID=CDCDFBA1-EF2C-39FA-998B-94C63B8F23E1 none ntfs rw,noauto 0 0
UUID= (Insert your drive’s exact UUID here) none ntfs ro,noauto 0 0
For FAT32 formatted drives, replace “ntfs” with “msdos”. Exit and save with ctrl+x (it will prompt you to save the changes).
4. Reboot, and you’ll see that the partition in question hasn’t mounted.
