Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

how to NOT mount a harddrive on startup?

hi,


on my macbook pro 13" (2,3 GHz, early 2011, macosx 10.8.2), i replaced the DVD drive with an SSD. so now, the macbook has a 256GB SSD and a 500GB harddrive inside. i only use the harddrive as a media drive for final cut pro editing, all other things are done by the SSD alone.


right now, on every startup the harddrive would mount, although i most often do not need it.


question: is there a way to keep the harddrive from mounting, so the default startup would bring up only the SSD? is there even a control panel or utility like that to manage that task?


thank you!

Posted on Feb 8, 2013 4:14 AM

Reply
30 replies

Feb 9, 2013 4:34 AM in response to mdesignffm

mdesignffm wrote:



actually, in my macbook, there is not one harddisk, there are two partitions of the same disk. but this should not affect the process - it should work with one partition just as well.



Actually, I believe you should use the volume name, rather than the physical disk name. But if you did the


"tell application "Finder" to get name of every disk" thing, then any name returned there should work.

Feb 9, 2013 4:34 AM in response to softwater

I entered a message, but it seems not to have been posted.

The message to softwater was:

indeed: I tried your last script:

works perfectly well on the USB connected disk/partition (external);

it did not do anything to a disk/partition connected to the DVD sata connector (inside): not even the error message.

Obviously the script does not reach the internal dvd sata connector. ???

Feb 9, 2013 4:41 AM in response to Lexiepex

...yes, that is it.


connected an external drive with 2 partitions via firewire. recorded clicks to eject (as described in above post), then remounted and tried script.


script works fine - ejects both partitions without any problem on first try.


so what works on HD SATA, USB and firewire does not work on DVD SATA. strange.


now that we have cornered the problem, a solution still does not seem any closer to me than before... :-(

Feb 9, 2013 5:07 AM in response to mdesignffm

Thanks Lex and mdesignffm. Yup, it does seem to be the fact that we're dealing with the DVD bus that is the issue.


OK then, let's try a different approach. This time we're telling Applescript to invoke the Bash shell to do the dirty work:


set theDisk to "Media 300GB"

do shell script "diskutil umount " & quoted form of ("/Volumes/" & theDisk)


There's no error dialog in this one, but if you look in the bottom panel of the Applescript editor under 'Results' you should see whether the disk was unmounted or not.

Feb 9, 2013 7:10 AM in response to Lexiepex

I'll leave you to solve the mystery of ประเทศไทย on your own (Google, as ever, is your... )... 😉


However, for the sake of completeness (and learning), and since we're in one of those all-too rare but nevertheless heart-warming 'caring and sharing' moments on ASC, I'd like to point out that there's a third way of tackling this problem. So far we have:


1. Don't mount the disk at all (see Leroy's link to Topher's article, marked as the Answer to the thread).


2. Unmount the disk automatically (as we've discovered together; don't forget to save the script as an .app and add to your login items)


3. Leave the disk mounted but have it power down if not in use.


The third option may be more suitable for some, particularly laptop users. After all, once the disk is powered down, it's not affecting system resources even though mounted.


By default, on battery power OS X powers down any disk after 10 minutes of inactivity. You can reduce this default time by manipulating the pmset power management settings in Terminal.


In Terminal.app, copy/paste this command:


sudo pmset -b disksleep 5


After pressing 'return' on your keyboard, you will need to enter an Admin password, which will be invisible when you type it (so type carefully!).


This tells OS X to power down any disk that has not been accessed for 5 minutes (if you want to change it back to the default setting use the same command and replace '5' with '10').


Note that this setting also applies to your startup disk, but since your startup disk is in more or less constant use, it's unlikely to be affected. However, the good thing about this command is OS X will immediately and automatically power the disk back up as soon as you do anything that calls a file on the disk (i.e., you don't have to do anything to get it to power up, OS X will handle it without your intervention).


Personally, I have this set to 5 minutes for my startup disk (I don't have a secondary internal) simply because my battery is 69% health and well past the stage it needs servicing. Having the disk power down after 5 instead of 10 minutes eeks out a bit of extra battery time when I'm not connected to the mains.


You can of course set the disksleep time to less than 5 minutes, but you probably don't want to for two reasons. One, because it affects all connected disks. And two because powering the disk up repeatedly after every, say, 2 minutes (say you're reading something on the net) will likely use more power over all than leaving the disk on. 5 minutes is a useful compromise, but it depends on the user. For your secondary disk, if you're not using it at all, it'll stay powered off after 5 minutes (but still mounted and available) until or unless you access it or call a file that resides on it.

Feb 9, 2013 7:51 AM in response to softwater

So moved to Thailand, I remember something like Wales or so before ???

1. I do not want to unmount the HD that is in the DVD location: It is partitioned in 2 partitions: one for the daily clone, and one for some backups and the large Photo and Music libraries accessed by iTunes and the Photo apps that reside on the startup SSD.

2. I do not need to unmount the HD because it is accessed very regularly, and I not sure about the startup-gravel down procedure being non destructive.

3. Aha, I am aware of this but I did not find conclusive evidence that is is good or bad for the SSD. The battery is my least important issue in the MBP. When this "put the disks to sleep when possible" command (either in preferences or in Terminal) should be separate for each Sata port, so no, I have them powered continuesly.

4. I will use your script for the 2 external portable disks, that have together 3 partitions: one for (you guessed it already) a clone, and two for backups of my libraries.

Thanks for the lessons taught here, was fun....

Lex (Davos 1641m)

how to NOT mount a harddrive on startup?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.