Mount OS X on the Fly

While OS X is mounted, you’ll be able to drag files from Ubuntu to Panther (OS X) and vice versa to the ‘Shared’ OS X folder (/home/USER/macOSX/Users/Shared). Other recommendations have you mount OS X under /mnt/ (in gnu-linux), but I find permissions problems with this that do not even allow access to the Shared folder.

To figure out the designation of OS X’s partition, pass:

sudo mac-fdisk -l

The output will say something about HFS. Mine says:

/dev/hda3 Apple_HFS Apple_HFS_Untitled_43 41680896 @ 262208 ( 19.9G) HFS

So this tells you that /dev/hda3 refers to the OS X partition you’re going to mount.

Then pass:

mkdir /home/USER/OSX

You’ve created a directory called OSX; Where USER is your user.

sudo mount -t hfsplus /dev/hda3 /home/USER/OSX

To unmount, simply add an ‘u’ to the start of the above mount command such as in:

sudo umount -t hfsplus /dev/hda3 /home/USER/OSX

Or just log out if the command does not work. Sometimes, terminal will ‘complain’ that OS X is not mounted having just unmounted it. At other times logging out will unmount it because term complains that OS X is busy, and therefore cannot unmount. It might be better to wait when term tells you it is not busy because of important processes that might need resolution.

Update:

sudo mount -t hfsplus -o rw /dev/hda3 /mnt/macos

allows you to mount OS X to /mnt/macos without the permissions problems. Create /mnt/macos if it doesn’t already exist with

mkdir /mnt/macos

Apparently, setting fstab with your OS X user’s UID and GID solves permissions problems, but this does not offer on-the-fly functionality. Furthermore, I wouldn’t want OS X mounted during the entire time I run Ubuntu. Besides, if you really want OS X access, there is Mac On Linux (MOL).

Contributed by Maurice Cepeda
a.k.a. Chascon

This is licensed under the Attribution-NonCommercial-ShareAlike 3.0 Unported Creative Commons License. All brands mentioned are properties of their respective owners. By reading this article, the reader forgoes any accountability of the writer. The reading of this article implies acceptance of the above stipulations. The author requires attribution –by full name and URL– and notification of republications.

This article may be outdated and of historical value.

Advertisements