Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.3: A fix for local drives not mounting until user login System
I was running into a problem where non-IDE drives would not mount at startup until a user logged in at the GUI. In an all-SCSI system, this meant that I couldn't ssh into the machine and access my volumes (outside of /), and startup scripts that required a separate volume (like moving swap to a different partition/disk) wouldn't run. A solution is to create a file at /Library -> Preferences -> SystemConfiguration -> autodiskmount.plist, with contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" 
   "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>AutomountDisksWithoutUserLogin</key><true/>
</dict>
</plist>
NOTE: The !DOCTYPE entry is shown on two lines; enter it as one with a space between the sets of quotes.

This tells autodiskmount to mount all local volumes at startup regardless of whether they are potentially removable (or whether the user has logged in yet). This was the issue, by the way. Apple decided to mount (potentially) removable volumes only while a user was logged in at the GUI. Users were assuming that removable volumes got unmounted when they logged out, and were causing file system corruption by disconnecting them while they were still live mounted file systems.

This works in Panther. I'm pretty sure that it also works for Jaguar, if this was even an issue. I don't remember anymore since I've been running Panther on my SCSI machine since the developer preview.
    •    
  • Currently 2.36 / 5
  You rated: 2 / 5 (11 votes cast)
 
[66,497 views]  

10.3: A fix for local drives not mounting until user login | 21 comments | Create New Account
Click here to return to the '10.3: A fix for local drives not mounting until user login' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: A fix for local drives not mounting until user login
Authored by: Hes Nikke on Nov 11, '03 11:47:31AM

that is awesome!

i have to ask though.... how did you figure this out?

---
vacuums do not suck. they merely provide an absence that allows other objects to take the place of what becomes absent.



[ Reply to This | # ]
10.3: A fix for local drives not mounting until user login
Authored by: wgscott on Nov 12, '03 10:34:13AM

You also just cured a major headache I have had for over a year, introduced in 10.2, that caused my NFS mounted disks to disappear when I was not logged into the GUI. The only way I could fix this was to turn off automount and to put a

mount /filesystem

in a startup script.

This I think will be much much better.



[ Reply to This | # ]
10.3: A fix for local drives not mounting until user login
Authored by: jimothy on Nov 12, '03 04:08:23PM

Incidentally, there should be no harm in having the doctype on a separate line, since its just XML, and it's valid XML to split a tag on multiple lines.



[ Reply to This | # ]
10.3: A fix for local drives not mounting until user login
Authored by: efc on Nov 12, '03 05:30:40PM

Thanks for this hint. It worked on a G5 running Panther attached to an XServe RAID. The RAID drives were unmounting whenever the GUI users logged out. But with this hint everything stays properly mounted. Bravo!



[ Reply to This | # ]
This is awesome!
Authored by: maczac on Nov 12, '03 09:08:04PM

Thank you very much!

This solved a slightly different problem I was having. Upon reboot my external FW HDs were available across the network, but as soon as that local machine was logged out, those external HDs were lost and remained so until a subsequent reboot.

Zac.

---
Chris



[ Reply to This | # ]
10.3: A fix for local drives not mounting until user login
Authored by: sblasl on Nov 12, '03 11:14:01PM

How do I go about doing this? Can someone just send me the file?

Thanks,

sblasl@cox-internet.com



[ Reply to This | # ]
Easier:
Authored by: daniel_steffen on Nov 13, '03 04:39:19PM
just use the following from Terminal, it will create the file automatically if it's not present:
sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin true


[ Reply to This | # ]
Slight difference in syntax
Authored by: magill on Dec 02, '03 10:21:58AM

Note that using the Write Defaults technique generates the following:

<dict>
<key>AutomountDisksWithoutUserLogin</key>
<string>true</string>
</dict>


<string>true</string> instead of <true/>

---
--
William H. Magill
Senior Systems Administrator



[ Reply to This | # ]
Slight difference in syntax
Authored by: daniel_steffen on Dec 04, '03 09:42:34PM
use
sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool true
in that case

[ Reply to This | # ]
Slight difference in syntax -defaults and autodiskmount
Authored by: oakley808 on Dec 18, '04 05:06:05PM

Interestingly enough (to me at least) when I type in that command:
sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool true

...the setting changes to TRUE in:
/Library/Preferences/SystemConfiguration/autodiskmount.plist
while I STILL have a FALSE setting in:
/var/db/SystemConfiguration/autodiskmount.xml

Running 10.3 by the way. Perhaps 10.3.x changes this?
It's problems like this, I believe, that really make havoc out of the OS when you start tweaking things. The left hand doesn't know what the right hand is doing, and each software update changes the rules or over-writes your fix. Grrr.



[ Reply to This | # ]
10.3: A fix for local drives not mounting until user login
Authored by: magill on Dec 02, '03 10:30:41AM

This fix does not work in Jaguar as the directory does not exist.
(/Library/Preferences/SystemConfiguration)

Also, the problem does not exist -- all drives are mounted at boot time in Jaguar.

---
--
William H. Magill
Senior Systems Administrator



[ Reply to This | # ]
10.3: A fix for local drives not mounting until user login
Authored by: jerry_sonus on Dec 13, '04 03:27:12PM

How do you mount scsi drives in Jaguar after startup and loging?

Thanks

Jerry



[ Reply to This | # ]
10.3: A fix for local drives not mounting until user login
Authored by: robg on Jun 06, '05 12:15:17AM

According to an email I received, this trick no longer works in Tiger...

-rob.



[ Reply to This | # ]
10.3: A fix for local drives not mounting until user login
Authored by: gadams on Jun 28, '05 02:30:25AM

This worked just fine for me in Tiger (10.4.1), exactly as you originally described it, using 10.4.1 with SCSI drives in a B&W G3.

This was just the solution I was looking for! Thanks a lot for the help. (I have a separate 36 GB /Users disk, and it was being mounted just after it was needed during the GUI login process. Ugliness ensued. This setting fixes that problem.)

- Geoff



[ Reply to This | # ]
10.3: A fix for local drives not mounting until user login
Authored by: crop on Jun 06, '06 01:12:54PM
It still works for me however, under 10.4.6...
Note that the xml plist syntax has changed to :

  <key>AutomountDisksWithoutUserLogin</key>
    <integer>1</integer>
Instead of :

  <key>AutomountDisksWithoutUserLogin</key><true />
-crop

[ Reply to This | # ]
10.3: A fix for local drives not mounting until user login
Authored by: gnarf1969 on Sep 08, '06 03:40:49AM

I guess the correct way for changing the value in autodiskmount.plist is:

sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool TRUE

At least if your system is 10.4...



[ Reply to This | # ]
10.3: A fix for local drives not mounting until user login
Authored by: dlinsley on Jul 03, '06 07:37:59PM

I tried the modification for Tiger, (I'm on 10.4.7 PPC) and it still wont auto mount for me. I currently have the machine set to login to a locked down guest account instead :(

Thanks for any help,
David.



[ Reply to This | # ]
It works for Leopard, too
Authored by: shamino on May 19, '08 02:53:25PM

This worked for me on Leopard (10.5.2). It helps me enormously, because my Time Machine volume no longer umounts when I log out, and the hourly snapshots are produced 24/7, as I want them.

I created the plist using the Property List Editor application from the developer tools, and set the property as a boolean value. I didn't have to change it to an integer, as some people reported for Mac OS X 10.4.



[ Reply to This | # ]
It works for Leopard, too
Authored by: Whizzbizz on Jun 10, '09 11:18:13AM

Seems like it works for me (Leopard 10.5.7), too. My torrent client used to ask for the disk at startup and would change every single torrents' download folder to another location because of the delay.

Thanks for the hint and to "stephenr" at Transmission's blog for communicating it.



[ Reply to This | # ]
10.3: A fix for local drives not mounting until user login
Authored by: LateAdopter on Mar 24, '10 06:18:09PM
I can attest that this works for Snow Leopard, too. I have a new Drobo that I was sharing a folder from, and the share would drop when I logged off. The exact script that I used was:
sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool true
A file was created here: /Library/Preferences/SystemConfiguration/autodiskmount.plist

[ Reply to This | # ]
10.3: A fix for local drives not mounting until user login
Authored by: gordonlbuchanan on Apr 13, '10 04:25:31PM

On my snow leopard desktop (hackintosh) I installed a 1TB drive just to use for backups. I use it for time machine on the desktop and share it over the network with two Apple laptops, also for time machine. I also use it with Winclone to back up my bootcamp partitions. When the desktop did not have anyone logged, time machine would not work on the laptops because it couldn't find the backup disk, because it wasn't mounted on the desktop. This "defaults write" version of this hint solved my problems!



[ Reply to This | # ]