Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

As relates to an answer to a previous question, I'd like to unmount a built-in hard drive every time I boot up. (Or alternately arrange for it not to be mounted). How do I do this?

share|improve this question
    
I edited my answer to your other question to include a way that you can prevent the drive from being mounted. –  Kyle Cronin Nov 19 '10 at 0:18
add comment

2 Answers

up vote 2 down vote accepted

The following Hint on Mac OS X Hints details a way to do this. Basically you'll create (or modify) the file /etc/fstab and add a line similar to:

UUID=F0E430C1-5558-3BB3-9FA9-6904B663FEEA  none  hfs  rw,noauto

The actual UUID will vary, you can find the UUID for your disk in system.log:

In Mac OS X Panther, Disk Utility and the diskutil command doesn't display the UUID value. But if you look in the system.log file, when the disk is mounted, you can see something similar to this (line breaks added for narrower display):

 ... localhost diskarbitrationd[87]: disk1s9   hfs  
   77F3E84D-E0ED-3194-96A5-BED10893FFF4 

FireWire HD
/Volumes/FireWire HD
... localhost diskarbitrationd[87]: disk1s10 hfs
F0E430C1-5558-3BB3-9FA9-6904B663FEEA Mac OS X Disc /Volumes/Mac OS X Disc

The string before the volume name is the UUID for the disk.

share|improve this answer
add comment

Use a LaunchAgent (see Lingon) that runs at boot to unmount. If it runs too quickly, add a wait/pause/sleep. The action that unmounts can be in whatever you preferred scripting/automation language is (bash (hdiutil), Automator, AppleScript, etc.)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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