image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
LinkBack Thread Tools
  #1  
Old November 25th, 2007, 03:46 PM
Registered User
 
Join Date: Oct 2002
Posts: 286
Thanks: 0
Thanked 0 Times in 0 Posts
pedz is on a distinguished road
Unmount (or hide) other partitions

I split my hard drive into three partitions. One is the Mac drive. The other two are not used yet.

When I log in, the other two partitions are on my desktop. I can drag them to the unmount and get rid of them. But, is there a way to do this for me at boot time?

If not, I can write a script to do it and stick it in /etc/rc or somewhere like that but I thought I'd ask first.

Thanks,
Reply With Quote
  #2  
Old November 28th, 2007, 09:30 PM
Registered User
 
Join Date: Nov 2007
Location: Toronto, ON, Canada
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
darrell888 is on a distinguished road
The Mac OS X is different from most UNIX/Linux systems. Rather than using the /etc/rc?.d script system it uses a command call launchd. Look at the man page for launchd. It will list the files it uses. It uses the plist files to launch daemons and services.

The launchctl command lets you interact with the launchd. Somewhere in the many plist files, e.g. /System/Library/LaunchDaemon/, is the command that does the automounting of hard drives. You'll need to understand how that works and modify it so it does not attempt to mount your other two partitions. I've only been looking at this for 2 days but it looks like the automounting just mounts everything by default. If your partitions are showing up in /dev then they probably get mounted.

You can also create a /etc/launchd.conf file. This will contain a set of launchctl commands. If you figure out the launchctl command to unmount the partitions this should help.
Reply With Quote
  #3  
Old November 28th, 2007, 10:20 PM
jbarley's Avatar
One more, for the road!
 
Join Date: Jul 2005
Location: An Island called Vancouver
Posts: 432
Thanks: 0
Thanked 10 Times in 9 Posts
jbarley will become famous soon enough
in a terminal window type and run

"diskutil list" without the quotes.

from this list, note the name of the drive you want to unmount (in my case it is disk1s3)

Now write yourself a little shell script like this
--------------------
#!/bin/bash
diskutil umount disk1s3
--------------------
save it as a text file with a name such as "unmount.sh"
finally to make it executable
in a Terminal window type
chmod +x unmount.sh.

This leaves you with an tiny app that you can put in your Login Items, this will unmount your drive each time you login.

jb.
__________________
ROFL: (Rolling on the floor laughing.) Typically used by people who are too lazy to press the rest of the keys on their keyboard needed to communicate in English.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT -5. The time now is 01:56 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.