Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Mount Mac Partition at Startup

  1. #1
    Join Date
    Jul 2010
    Location
    California
    Beans
    34
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Mount Mac Partition at Startup

    As many of us dual-booters, I keep most of my files on my mac partition. Specifically, my music. One of my favorite things to do is to point Rhythmbox to my iTunes music folder, and just play from there. iTunes keeps it up to date/organized (I rip/add music on my mac partition), and when I'm on Ubuntu Rhythmbox keeps right up (mostly). However, I do have to manually mount my mac partition before Rhythmbox will play, and it seems to work better if I do it before I launch the application.

    So, I ask: is there a simple, clean way to mount my mac partition at startup?
    Windows-free since Ubuntu 8.10 Intrepid Ibex.

  2. #2
    Join Date
    Oct 2005
    Location
    Southampton, UK
    Beans
    1,385
    Distro
    Hardy Heron (Ubuntu Development)

    Re: Mount Mac Partition at Startup

    the easiest way is to add a mount point in your fstab file. this way, when ubuntu loads it automatically mounts the partition at your specified location everytime you boot.

    sadly, having never done this for a mac partition (only for XP) i wouldnt know the settings you have to specify in the fstab file. that might be a start for some googling research.

    failing that, could you not just create a script to run the mount commands you use now and set that script to execute on login?

    sorry, not much help i know but it might be a start
    ======================================
    Explosion at pie factory in Huddersfield.
    3.14159265 confirmed dead !!
    ======================================

  3. #3
    Join Date
    Oct 2010
    Beans
    71

    Re: Mount Mac Partition at Startup

    Well... three things:

    1. You need to install the HFS/HFS+ components to be able to access Mac-formatted partitions;
    2. HFS+ Journaled is the default filesystem and has been since 10.3.
    3. Linux HFS/HFS+ support does not include WRITE support for HFS+ Journaled filesystems.

    So, the question here is do you need to be able to write data TO your Mac partition. At present, there's no really clean solution for this. I think that Journaling can be disabled on an HFS+ Journaled filesystem (making it capable of being written to) but I have no idea how to make that happen.

  4. #4
    Join Date
    Jul 2007
    Beans
    29
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Mount Mac Partition at Startup

    I do exactly the same thing you do, Kennethsime. Here's how I did it:

    1. Create the folder where you want to mount the drive. I did mine at /media/MacintoshHD
    2. Edit your fstab by opening Terminal and typing sudo gedit /etc/fstab
    3. Add the following line at the end. Here my Mac partition is at /dev/sda2:

      Code:
      /dev/sda2	/media/MacintoshHD	hfsplus	defaults	0	0
      **Note that the large spaces between those arguments are tabs**
    4. Save your fstab and reboot
    5. Profit
    Last edited by pc_michael; October 14th, 2010 at 02:56 AM.

  5. #5
    Join Date
    Jan 2008
    Location
    USA
    Beans
    3
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Mount Mac Partition at Startup

    Quote Originally Posted by pc_michael View Post
    1. Create the folder where you want to mount the drive. I did mine at /media/MacintoshHD
    2. Edit your fstab by opening Terminal and typing sudo gedit /etc/fstab
    3. Add the following line at the end. Here my Mac partition is at /dev/sda2:

      Code:
      /dev/sda2	/media/MacintoshHD	hfsplus	defaults	0	0
    I set my fstab slightly differently:

    Code:
    UUID=cea5d65a-62b5-33fa-b6a5-8c7426e66606 /media/MacintoshHD hfsplus defaults 0 0
    If you only have one drive, it doesn't matter that much, but using UUIDs are unique to the drive and will be robust to drive additions, e.g., SD cards & USB drives.

    You can find the UUID with ls -l /dev/disk/by-uuid/ and looking for the match to the target partition, in my case /dev/sda2. You can get a lot of information from gparted here if you don't know which partition you want (but do not to make partition edits!).

    Quote Originally Posted by pc_michael View Post
    **Note that the large spaces between those arguments are tabs**
    Spaces should work just as well as tabs.


    Quote Originally Posted by pc_michael View Post
    Save your fstab and reboot
    You could reboot, but you don't have to. After setting fstab:

    Code:
    sudo mount -a
    ls /media/MacintoshHD/ # should show files
    I recommend doing this to be sure that you set fstab correctly.

    -Ron


    PS - You might have to install the hfsplus package if mounting fails.

  6. #6
    Join Date
    Apr 2006
    Beans
    14

    Re: Mount Mac Partition at Startup

    Ow! This topic fits my recent needings too...
    Is there a way to mount the unjournaled hfsplus partition at boot with read/write rights for users too? I'm able to write the partition but just as super user.

  7. #7
    Join Date
    Mar 2010
    Location
    Woonsocket, RI USA
    Beans
    3,195

    Re: Mount Mac Partition at Startup

    Quote Originally Posted by kesiev View Post
    Ow! This topic fits my recent needings too...
    Is there a way to mount the unjournaled hfsplus partition at boot with read/write rights for users too? I'm able to write the partition but just as super user.
    Exactly the same procedure described by others for read-only access will work. The trick is user ID and group ID numbers. The best solution is probably to set your Ubuntu accounts to use the same UID, and perhaps GID, numbers as are used under OS X. You can do this with usermod, but you'll then have to change the ownership of all your files:

    Code:
    sudo usermod -u 1234 -g 5678 fred
    sudo chown -R fred: /home/fred
    This example changes the user fred's UID value to 1234 and GID value to 5678. You'll need to figure out the correct values based on whatever OS X is using. (Try examining files you know were created by your normal user in OS X; but if you think the value is 0, it's not; that's the root account, and you should never set any other account to use UID 0.)

    After you make the UID/GID change, log out immediately. In fact, this change is best made from a direct root login, but that's discouraged with a default Ubuntu install. (In principle, you could boot to single-user mode, though.)

  8. #8
    Join Date
    Apr 2006
    Beans
    14

    Re: Mount Mac Partition at Startup

    Clever suggestion! It worked! Thank you very much (and added to Delicious too). I've seen that the user is no longer shown on the login dialog as a list - but doesn't matter for now (obviously help is appreciated!)

    Really, very very interesting trick! Thank you again!

  9. #9
    Join Date
    Apr 2006
    Beans
    14

    Re: Mount Mac Partition at Startup

    Partially self-answered. I've done quite like the suggested workaround here here:

    Code:
    sudo vi /etc/login.defs
    change UID_MIN to 1 <--- (I've put 500 instead of 1)
    ...and my username appeared. I'm not sure that is clean enough but is working for now. Is there a cleaner way to do the same thing?

  10. #10
    Join Date
    Jan 2008
    Location
    USA
    Beans
    3
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Mount Mac Partition at Startup

    Unless you are planning on syncing several account IDs between Mac OS X and Ubuntu, I'd recommend using usermod manually for the accounts you need, as @srs5694 shows above.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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