Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'How can launchd be used to keep a secondary drive from mounting?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How can launchd be used to keep a secondary drive from mounting?
Authored by: tedw on Aug 12, '09 03:14:15PM
I'd like my secondary drive to not mount every time I start up. (FWIW I have six partitions on my secondary drive and prefer not to have to go through your detailed steps six times.)
fstab (so far as I know) only works with volumes/partitions (file systems), not with actual drives. there doesn't seem to be a way to specify "all the volumes on drive X". so (sorry), you're going to have to write 6 lines into fstab (1 for each file system) rather than just 1. you can use the cookie cutter approach, though. start with this template:
UUID=   none    hfs   rw,noauto
LABEL=   none    msdos   rw,noauto
copy it 6 times into fstab, then open Disk Utility and copy the UUID into the UUID=spot (or the volume name into the LABEL= spot), making sure you don't add any spaces after the equals or lose the space before the 'none'. save that, and the volumes will not mount.

getting the volumes to mount at need, though, depends on how you want to do it. do you always want to mount them all at once? do you want to be able to choose which you want to mount? do you want them to mount automatically at certain times? diskutil has a command for mounting all the volumes on a disk at once (diskutil mountDisk /dev/disk1, though you'll have to check which disk number it actually is), but the others will take a little programming, depending on your needs.

[ Reply to This | # ]

How can launchd be used to keep a secondary drive from mounting?
Authored by: Ronald Lanham on Aug 16, '09 02:06:49PM

Thanks tedw for the post.

I may try this, but with my limited knowledge of the Terminal it makes me a little nervous.

Too bad there is not a little app or script that can do this or that DU has an option to keep HDs unmounted at startup.

Anyway... thanks again.



[ Reply to This | # ]