1

Often I come to my mac sitting on my desk in the morning and need to simply unplug it and put it in a bag. While maybe not strictly necessary to properly eject the attached USB drive, it sure would be nice if there were a way to do so without first logging in.

1 Answer 1

1

AFAIK there is no save way to eject an external drive from the lock screen.

You have several options though:

  1. Purchase and install Mountain and enable "Unmount external volumes on sleep". The feature still seems to be experimental.

  2. Create a LaunchDaemon which ejects your external drive(s) gracefully at say 5am. Here is an example of a bash script to start with:

    #!/bin/sh
    /usr/sbin/diskutil list | grep -e 'disk[1-9]s.*' | sed 's/.*\(disk[0-9].*\)/\1/' | xargs -I{}
    /usr/sbin/diskutil unmount {}
    

    If you don't want to write a LaunchDaemon, Sleepwatcher should support your efforts.

  3. Unmount all external volumes before setting your Mac(s) to sleep.

1
  • Thanks for all that. Holding out in hopes someone does have a direct answer. 1-3 aren't ideal.
    – jb510
    Commented Sep 15, 2015 at 21:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .