HFS+ r/w support in freeBSD 7.0?

Hi,


I've searched a lot but have not found anything that informs me for sure whether hfs+ partitions (slices) can be mounted from within freeBSD. I formerly used OS X only, then migrated to dual booting Zenwalk (Slackware based, formerly miniSlack) and OS X, and then read some about the BSDs and really liked what I read. I REALLY want to make the plunge. One thing that would really hinder this is not being able to read/write from the OS X partition.

My approach has been to keep all of my docs, music, etc. on the OS X partition (my fallback if I break something and very, very regularly backed up) and just access that data from within my secondary OS. Can this work in FreeBSD? I have found hfs and hfsutils in ports and references to being able to access hfs via ssh, but these aren't really ideal. I would like seamless access.

Is this possible? It was a kernel option in Linux. I've managed to install FreeBSD successfully and can boot into either it or OS X via rEFIt but have not had the time to dig in. One of the things I've liked hearing about the BSDs is the emphasis on knowing your system, the BSD methodology, it's workings, etc. so I kind of want to take this initial process slower than I did with Linux, where it took some learning, but it was mainly geared at just solving a problem by following steps vs. knowing what I was doing. I'd rather take the time to understand the directory structures, how BSD works, etc. this time around rather than take the 'just get it working and I don't care how' mentality.

Sorry for the lengthy post. I'm quite excited to embark further and have been extremely excited about all I've read about FreeBSD, the mentality of it's development and approach to a logical OS, etc.

Thanks for any help.

-John
 
I'll try both of those suggestions. I had come across the page you referenced, but was hesitant due to how long it has been since it appeared updated.

I'm quite new and have limited time, so I'm slowly learning about FreeBSD and have not even gotten to post-installation configuration (wish to get X up and running, get my internet figured out, figure out ports, etc.). Once I get to that stage I'll probably dig into this more.

I appreciate the suggestions!


-John
 
update

Hi,


I am trying to get this to work. As stated, this is my first encounter with FreeBSD in general, so it's been a definite learning experience from Linux/OS X...

I'm trying to compile the kernel with 'option GEOM_APPLE', but when I 'make buildkernel KERNCONFIG=MYCONFIG' I get
Code:
unknown option "GEOM_APPLE"
*** Error code 1

Forgive me if this is a ridiculously stupid problem. The FreeBSD handbook is quite comprehensive, but it's difficult to find a list of ALL kernel config options (unless the list in the handbook where the generic config is walked through DOES have ALL options...) somewhere to reference. I also am not sure if order matters in the config file - I just put it around where I saw options for msdosfs support - seemed to be logical.

Thanks for any help,
John
 
I'm having the same sort of issues here.

>options GEOM_APPLE
That doesn't work (at least not on 7.1-RELEASE) because there is no source for the geom_apple module. Yes, there's a makefile, which refers to the /usr/src/sys/geom/geom_apple.c file, but it's nowhere to be found in /usr/src/sys/geom, or anywhere else on the filesystem.

>Also have a look at this page, the project is
>stopped, but it should work for you.
The compilation fails with a number of errors. I've fixed a few of them already, but need some more time to work on it.
 
Maybe this is useful: (a java app, I haven't tried it)
http://hem.bredband.net/catacombae/hfsx.html

Or if all else fails I guess you could boot a Linux livecd iso in qemu, pass it the disk device in question, mount hfs in there and scp the needed data out... (assuming Linux can mount it ofc, but I'd be surprised it not :) )
 
Hi sorry for taking soo long to answer.

After reading the FreeBSD 7 release notes, There is no more GEOM_APPLE in the kernel, sorry for the bad info.

What ive found what the following entry that you can make in your generic file to compile :

options GEOM_PART_APM # Apple partitioning

But i dont know if this will work.

You can have a look at everything you can include in your custom kernel configuration in the following path :

/usr/src/sys/conf/NOTES
 
make lint [or make LINT, don't remember exactly]
make file that contains all available options, that you can include in kernel

run make lint in GENERIC config directory [for i386: /usr/src/sys/i386/conf]
 
nox@ said:
Maybe this is useful: (a java app, I haven't tried it)
http://hem.bredband.net/catacombae/hfsx.html

Or if all else fails I guess you could boot a Linux livecd iso in qemu, pass it the disk device in question, mount hfs in there and scp the needed data out... (assuming Linux can mount it ofc, but I'd be surprised it not :) )

I've used that for a windows machine when my Mac crashed once. It allowed me to mount my external (HFS+) drive from WinXP. Very helpful. Perhaps it could be useful... I'd be nice to have a seamless mount, though, rather than having an 'explorer' window up... I'm not sure how that program handled mounting. I think hfsutils in FreeBSD gives you access to drives, but not flat out r/w mounting ability, which is what I'm looking for.

Maurovale said:
options GEOM_PART_APM # Apple partitioning

But i dont know if this will work.

I think that's just to allow booting from an Apple Partition table (GUID Partition Table) as opposed to an MBR. I believe that this is what rEFIt takes care of - allows one to dual boot from either a GPT entry or MBR entry. I'm not positive that this is the case, but I think I'll need something more in the filesystem realm vs. partition reading realm. I need the hfs+ equivalent to mounting msdosfs...

I'll keep trying to find workarounds. For now I'm just not able to mount at all. When Apple releases Snow Leopard (OS 10.6), they will be using ZFS, so I hope to just switch over my FreeBSD install to ZFS and have no troubles from either side ;)


-John
 
You definitely want hfsplus, not hfs. Hfs is the old filesystem; OS X is hfsplus now.


Best regards,
John
 
DutchDaemon: Thanks. I took your advice and tried hfsutils.

jwhendy is correct though, I need to find hfs+ support. When I mounted the disk with hfsutils, I got the once-familiar readme file explaining where my files had gone.

"This hard disk is formatted with the Mac OS Extended format. Your files and information are still on the hard disk, but you cannot access them with the version of system software you are using."

Well, the search continues, but thank you to everyone who has offered advice so far.
 
I wouldn't hold your breath, unfortunately. I just could not for the life of me figure out how to work things... so what I ended up doing was creating a 4 partition structure:

- 1: Mac efi
- 2: Mac HFS+ for all files in / on OS X
- 3: ZFS for shared files
- 4: FreeBSD slice

Since FreeBSD is ZFS workable, I could share all the files I cared about accessing on my OS X side (namely, those in my /Users/jwhendy folder).

Practically, this worked out to creating a zpool. Then I mirrored the file structure of the OS X /Users/username/ folder. So... one pool created Documents, Music, Picture, etc.

Then, I symlinked /Users/jwhendy/* to /Volumes/zpool/* with the exception of /Users/jwhendy/Library. When I was doing this you HAD to export the zpool prior to rebooting from OS X into FreeBSD and if your Library folder is being used, exporting the zpool is bad news since OS X is using information in that folder.

Once you reboot into FreeBSD, you do a quick 'zpool import -a' and you're golden. I'm sure you could automate that and symlink to whatever directories you wanted.

It's a bit of work, but I found it reasonably satisfactory. I never really got into zfs snapshots because OS X is pretty glitchy about zfs. Storing data worked great; using some of the other features did not because it always seemed that both zfs and OS X were trying to manage the partition even though zfs does not rely on 'legacy' partition management tools. I found it annoying to do a 'zpool export tank' and get 'could not export, tank busy', then do 'diskutil umount /Volumes/tank' and repeat the export successfully. Though zfs should not need diskutil management, it still always did. Not a huge deal, but not perfect. Trying to rollback to a snapshot gave me problems too. Though snapshots are all the rave, I didn't seem to be able to use them, so I would have much rather just stuck with Carbon Copy Cloner... instead I had to just CCC everything in / except /Users and use rsync to do the rest.

Hopefully this ramble proved helpful... I think OS X can read Ext2 or something as well. Never looked into it, but there might be some other filesystems that would be options for you?


Best regards,
John

P.S. References:
- zfs on os x: http://zfs.macosforge.org/trac/wiki
- Igor's blog on setting up zfs on os x: http://blog.igorminar.com/2009/01/using-zfs-with-mac-os-x-105.html
- Another zfs on os x blog: http://osholes.blogspot.com/2008/07/zfs-and-os-x-does-it-work.html
- CCC: http://www.bombich.com/software/ccc.html
 
jwhendy: My situation is a bit odd:
The HFS+ volume I need to access is a rescued Raid 0 array (It used to be a LaCie BigDisk attached externally to my Mac) Both drives that comprised the raid are now installed inside an old dell running FreeBSD. (There's no room inside my powermac g5 to install the drives) I was able to use gstripe to recombine the drives.

If I had a way to allow FreeBSD to read the HFS+ filesystem I could use netatalk (which already works wonderfully) to share the disk with my mac and throw the files onto DVDs. Then I could reformat the raid with a more BSD friendly filesystem.

Alternatively, if I could get ahold of geom_gate for OS X I could mount the filesystem on my mac.
 
I'm not familiar with netatalk... Just fyi, I'm not actually using FreeBSD anymore... I had too much trouble with it on my Macbook. While I really, really, really wanted it to work and liked the idea of a BSD vs. Linux, everything being from source, and better documentation... in practice the warnings I read became true: in use I could not have told you the difference between the two (integrated kernel/user tools and separate kernel and gnu tools).

I figured that using Linux often was better than not using FreeBSD at all.

Anyway, the point of that was that I'm back on Zenwalk (Slackware derivative) and have netatalk in my repo so I'm sure it's available in Linux. Why don't you try downloading a Linux distro, burning it to a CD and using it to do what you need to do? I bet since Ubuntu is so 'feature heavy' they have HFS+ support built into their bootable CDs.

There's USB bootable distros too (I think Puppy and Damn Small Linux)... you could get them to work with HFS+ and netatalk long enough to recover your data onto DVDs?

Just a thought.


Best regards,
John
 
Back
Top