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 8, 2013 7:11 AM in response to mdesignffm

There's another way to solve your problem: rather than preventing it from mounting, you could have it automatically dismount after you log in to your user account.


This might not seems as neat as not mounting it at all (after all, the system has to mount then dismount it), but it does have some advantages:


1. It's very quick and simple to set up, and to disable at any time if you wish.

2., It means your disk is still available if you ever have to do some troubleshooting in the recovery HD or Safe Mode (say if your SSD is playing up or something).



Here's how to do it if you wish:


1. Open the Applescript editor (click on Spotlight in the menu bar and type 'applesc' and hit 'return' on your keyboard).


2. Copy and paste the following in the editor window:


tell application "Finder" to eject (first disk whose name starts with "Name")


3. Replace the word "Name" with the first word of the name of your disk as it appears in the Finder sidebar (not the first word in its pathname),. E.g., in Finder sidebar, my disk is called 'Buffalo 500GB HDD', so I'd put 'Buffalo' in the script).


IMPORTANT: be sure to retain the double quotation marks "" around the name of the disk.


4. Now let's test it. Click the 'Compile' button in the task bar and, assuming there's no errors, then 'Run'. Check in Finder sidebar that your disk has disappeared.


If you get any errors on compile or run try deleting the script and typing it by hand. Sometimes copying and pasting text over introduces buggy characters. If you type it, watch the punctuation. If you get errors and can't solve them, post back.



5. Assuming the test works, choose 'Save as' from the Applescript File menu and in the dialogue box change 'File Format' to Application. Choose a location to save to ( /Applications is preferred ) and click the 'Save' button.


6. Go to



 > System Preferences... Users & Groups | Login Items.



Click the '+' sign in the Login Items tab, and add your new application to the list.


7. Restart the mac and test. The disk should dismount after the login process has finished.

Feb 8, 2013 8:31 AM in response to mdesignffm

You have the SSD in the second (DVD) location.

In the early 13" mbp the second location is either 3 or 6GB/s (Sata 2 or Sata 3).

When you have the Sata 2 connector in the DVD location I propose to switch the SSD to location 1 and the HD to location 2: this will have the SSD in the fastest connector.

That being you can also follow another way of thinking: as Softwater rightly says, it has disadvantages to have the HD unmounted completely, with having the possibility to have the second disk bootable in case the SSD will not start is very important. Therefore I propose to not unmount the disk but partition it and regularly make a clone on partition 1, so that you can immediately start with the HD to attack problems.

The life of a normal HD is probably much longer than the SSD, and even longer than the MBP alltogether.

I know that Softwateris a "backup promoter" of the clearest water (sic!) and also promotes making a clone as a bootable backup (as I do).

Think about it.

Feb 8, 2013 9:07 AM in response to Lexiepex

hi lex,


thank you for your advice. the SSD is in the faster location already. and the macbook is basically a clone of my desktop mac. and when i am abroad, i always carry another clone on an external HD.


i have learnt my lessons a long time ago, and - like most people - i have learnt them the hard way. ;-)


so: it is never too often to point these things out.

Feb 8, 2013 9:22 AM in response to softwater

sawwaddee softwater,


i think the script would be perfect for me. thank you!


but i am afraid it does not work. neither when copying nor when retyping. neither when running inside the editor nor when running as a stored application.


there is no response whatsoever, no dialogue. there just happens - nothing...


my drive is called 'Media 300 GB", so the script is:


tell application "Finder" to eject (first disk whose name starts with "Media")


ผมจะทำอะไรดีนะ?

Feb 8, 2013 5:54 PM in response to mdesignffm

จริงๆไม่แน่ใจครับ แล้ว...open a new editor window and put this in:


tell application "Finder" to get name of every disk


Hit 'compile' and 'run'. In the 'Result' window at the bottom should be a list of your disk names. Use the name that corresponds to the disk you're trying to unmount in the script I gave you earlier and try again.

Feb 9, 2013 3:30 AM in response to softwater

hi softwater,


thank you for getting back.


with no response i meant no dialogue and the disk still present in finder as before.


i tried your script for checking names. it works perfectly.


using the names, though, yields no result with your script provided. :-(


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.


so, i made my own script by simply recording actions in apple script: start recording, click into finder, highlight partition one, press shift, highlight partition two, press command E (eject), end recording. after the recording process, both partitions are unmounted and have disappeared from the finder - as intended.


this is the resulting script:


tell application "Finder"

activate

eject {disk "Media 300GB", disk "Data 200GB"}

end tell



if i reactivate (remount) my partitions through disk utility and run the script (both from the script editor and as saved application), again no reaction - no dialogue, partitions stay mounted and untouched.


maybe a problem with apple script in mountain lion?


clueless...


Message was edited by: mdesignffm

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

I'm also "clueless" 😮.


It works fine on my machine (I have exactly this set up for dismounting an unwanted volume on an external disk while keeping the other volumes on the same disk mounted).


The only difference I can see is that you're trying to eject a disk that is connected through the DVD bus (whereas I'm doing it on disks mounted through the USB bus).


I can't see why that should make a difference, but I'll look into it further. In the meantime, try this.


Mount the disk in Disk Utility, and then try this version of the script:


try

tell application "Finder" to eject disk "Media 300GB"

on error

display dialog "The disk could not be found or was not ejected."

end try




Does it give you the error message? If not, does it remove the disk from the sidebar?

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.