Results 1 to 3 of 3

Thread: Mount USB drive at system boot

  1. #1

    Member Since
    Jan 04, 2011
    Mount USB drive at system boot
    I have a Mac Mini PowerPC with OSX 10.4 installed. The Mac will be used as a "hub" file server for Unison synchronization of several "spoke" computers, each running Linux, Mac OS, or Windows. The Unison file synchronizer software will access the Mac from the spoke computers using ssh from the command line. In somewhat unfamiliar terrain, I still have gotten the basic setup working, except for one bit.

    The drive for backup is a USB 2 hard drive, that I have formatted with hfs. By default, the Mac OS does not mount this drive unless someone logs in through the Mac's GUI. I do not want to have to log in through the Mac's GUI to mount the drive, and, in fact, I don't expect the Mac to have a monitor. With some experimentation, I have found that the following command suffices to manually mount the drive when logged in remotely as root:
    mount -t hfs /dev/disk1s3 /redMyBook/

    However, I would like to have the drive mounted once and only once, every time the system boots, without anyone having being logged in. That way, I can set Unison to sync the spokes using cron (or the equivalent). I am sure I can kludge something but there must be a best/proper way to set this up?


  2. #2

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    /etc/fstab is your key. Take a look at post #3 here. It's older but still looks to be accurate.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  3. #3

    Member Since
    Jan 04, 2011
    Thanks vansmith, that was very useful, although not entirely accurate, for my configuration at least. That post recommends two things, an entry in fstab and an automount. The recommended automount:
    sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisks
    produced the following response:
    2011-01-04 19:15:00.421 defaults[595] 
    Rep argument is not a dictionary
    Defaults have not been changed.
    It turns out that all that was needed was to create fstab and give it an entry. I used:
    UUID=<value of uuid>       /redMyBook      hfs     rw,auto 1       2
    I am not sure this is 100% correct (in particular whether it should be hfs or hfs+; whether I need the ",auto"; whether it should be 1 2 or 0 0 or something else), but it does seem to work. I referred to the last couple posts in the following thread: Apple - Support - Discussions - Leopard and /etc/fstab ...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Manualy mount USB drive.
    By i86i11 in forum Other Hardware and Peripherals
    Replies: 8
    Last Post: 06-25-2015, 01:42 AM
  2. USB backup drive won't mount
    By Zothecula in forum Apple Desktops
    Replies: 5
    Last Post: 07-13-2012, 01:38 PM
  3. External USB Drive won't mount
    By Ricky55 in forum macOS - Operating System
    Replies: 2
    Last Post: 02-11-2010, 09:33 AM
  4. Mount usb-drive via shellscript or automator
    By giantranger in forum macOS - Operating System
    Replies: 0
    Last Post: 08-23-2009, 10:58 AM
  5. How to: Mount an external usb hard drive?
    By stamko in forum macOS - Operating System
    Replies: 8
    Last Post: 09-28-2007, 07:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts