Skip navigation
This discussion is archived

SparseImage image file not mounting at startup

3305 Views 11 Replies Latest reply: Oct 23, 2010 1:25 PM by jsd2 RSS
N@poleone Calculating status...
Currently Being Moderated
Oct 20, 2010 10:43 AM
Hi all,
I'm trying to mount a sparseimage file at account login without success.
I have already a Samba volume mounting at login so I thought it just needed to put the volume mounted on the login items... but nothing.

When I login next time I don't see the sparseimage mounted and in Account Preferences the item is marked as Unknown instead of Volume like the Samba one.

Any suggestion?? I can even change the image file in a dmg if necessary...
iMac, Mac OS X (10.6.4)
  • jsd2 Level 5 Level 5 (6,200 points)
    Currently Being Moderated
    Oct 20, 2010 11:13 AM (in response to N@poleone)
    Try adding the actual .sparseimage file as the login item, not the mounted volume.
    Mac Mini, Mac OS X (10.6.4)
  • KJK555 Level 4 Level 4 (2,895 points)
    Currently Being Moderated
    Oct 20, 2010 2:47 PM (in response to N@poleone)
    You will have write an automator script (app) to mount it first.

    put your sparse image in the root of your home folder,
    Open automator > workflow > shell script:

    Place the following lines in the shell script window:

    #!/bin/bash
    #script to mount sparsebundle
    hdiutil attach "~/my.sparse";
    exit;

    note: adjust the name of the sparse image as necessary.

    run it. If it works save workflow as an app, add your new app to the user login items.

    Message was edited by: KJK555
    Mac Pro, Mac OS X (10.6.4), , Win XP  "What!?, you didn't back it up?" 
  • KJK555 Level 4 Level 4 (2,895 points)
    Currently Being Moderated
    Oct 20, 2010 3:11 PM (in response to N@poleone)
    You will have to write a logout script to automate shutting down the sparse image,
    using diskutil eject command.

    http://codesnippets.joyent.com/posts/show/1763

    Message was edited by: KJK555
    Mac Pro, Mac OS X (10.6.4), , Win XP  "What!?, you didn't back it up?" 
  • jsd2 Level 5 Level 5 (6,200 points)
    Currently Being Moderated
    Oct 20, 2010 4:13 PM (in response to N@poleone)
    I'm not sure I understand - does your second account also list the sparseimage file as a login item? And where is the sparseimage file?

    I just put a sparseimage file onto an local external drive that has ownership ignored, added it to the login items of my first account, and then logged out and logged back in to that account, mounting the image. I then logged out of that account without unmounting the image, and logged into a second account that did not list the sparseimage file as a login item. The image did not stay mounted for the second account.

    Message was edited by: jsd2
    Mac Mini, Mac OS X (10.6.4)
  • jsd2 Level 5 Level 5 (6,200 points)
    Currently Being Moderated
    Oct 22, 2010 12:56 PM (in response to N@poleone)
    It sounds as if you are using the second method described here:
    [iPhoto: Sharing libraries among multiple users|http://support.apple.com/kb/HT1198]

    I tried to duplicate your setup and did not have a significant problem. I listed the sparseimage file in /Users/Shared as a login item on both accounts. I did get a "locked" warning initially from iPhoto on the second account, but I hadn't checked the "ignore ownership" box on the mounted disk image. After I checked it, I was able to log in and out of each account in turn, with iPhoto in each account able to access the shared iPhoto library in the automatically mounted disk image.

    As a test, try removing the sparseimage file from each account's login items, and mounting it manually. From account #1, mount the image, open iPhoto, close iPhoto, unmount the image, and log out. Then log into account #2, mount the image, and open iPhoto, Does iPhoto on that account have access to the library on the image?
    Mac Mini, Mac OS X (10.6.4)
  • jsd2 Level 5 Level 5 (6,200 points)
    Currently Being Moderated
    Oct 22, 2010 4:40 PM (in response to N@poleone)
    A few things seem strange-

    6) Logged in on first account (administrator)
    7) Image already mounted??!!! *??!!!


    Is there anything else currently in the login items of the first account that could have mounted the image? Is there any other account (including a 3rd account) still active via fast user switching?


    Also, normally when you look at the ownership of a volume that is marked "ignore ownership", whichever account is currently logged-in appears to be the owner. Your admin account seems to be named "Luca", but the only individual user I see on the mounted volume's permissions is "Nicoletta", even when you are logged into the "Luca" account.

    For my own test, I used admin accounts "t1" and "t2". I first changed the permissions of the sparseimage file to read-write for all, and also checked the box for "ignore ownership" on the mounted image. Here are my GetInfo results for the sparseimage file, the mounted image, and the iPhoto-9 library, first as seen from account t1:
    .
    !http://i53.tinypic.com/2uj0f7n.jpg!
    .
    and then as seen from account t2:
    !http://i55.tinypic.com/258w8rb.jpg!
    .
    This way each individual user has read-write privileges to all three items.
    Mac Mini, Mac OS X (10.6.4)
  • jsd2 Level 5 Level 5 (6,200 points)
    Currently Being Moderated
    Oct 23, 2010 1:25 PM (in response to N@poleone)
    Glad you got it going!

    The next step is to port the same process to iTunes


    Take a look here first:
    [iTunes: How to share music between different accounts on a single computer|http://support.apple.com/kb/HT1203]
    Mac Mini, Mac OS X (10.6.4)

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.