Mac UFS partition unreadable
Charles Sprickman
spork at fasttrackmonkey.com
Tue Dec 21 12:10:29 PST 2004
On Sun, 19 Dec 2004, Bram Van Steenlandt wrote:
> Hi,
>
> I use both mac and freebsd and would like to have the abbility to use my
> external firewire drive on both plattforms.
There is another way to do this, but it's a tremendous hack. That said,
I've been doing it for more than two years...
>From what I gather, the partitioning is the real issue. BSD can't read a
OS-X partition "map" (for lack of understanding, I'll use that word), and
vice-versa.
Here's what I did... I had a large drive and I first ran disk utility
under OS-X and left about half of the space unallocated. I went ahead
with the normal HFS+ formatting. Then I ran "pdisk" under OS-X to see
where the partition started and ended, same for the free space.
I then moved the disk to FreeBSD. To grab all the OS-X labelling, I did
"dd if=/dev/da0 of=osx-label count=6". Hold onto that file. Next I ran
the BSD fdisk and disklabel. I took the OS-X start/end numbers and
plugged those in and labelled that as unused in BSD. I then made a new
partition with what was the "unused" area of the drive under OS-X.
I then ran the following command: "dd if=/dev/da0 of=bsd-label count=1"
and saved that file.
So the disk at that point could be mounted under FreeBSD. But if you take
it back to OS-X, no-go, since it can't make heads or tails of the label.
To make this vaguely usable, I "switch" the disk from one "mode" to the
other. So if I've been using it under FBSD and want to use it on the Mac,
after unmounting it, I do:
"dd if=os-x-label of=/dev/da0"
Then if I unplug it and throw it back on the Mac, all is well.
When I want to use it on FBSD, before mounting I do:
"dd if=bsd-label of=/dev/da0"
And then it mounts.
Very hackish, but the only thing I could find. I thought about FAT32, but
since I needed to have HFS+ stuff on there that requires resource forks
and other oddities on the Mac side, and on the BSD side I needed real
perms, FAT32 didn't cut it.
YMMV, all that is from memory, but you get the gist of what's going on...
Charles
> This should be possible because both are BSD and both can use UFS.
> However when I plug an freebsd formatted drive into my mac he is rather
> confused by first saying that he can't read this drive and I should format
> it. Then when I try to mount it from the terminal he complains about the
> superblocks, when I run some utils they sometimes say they can't determine
> the partition type, also when I look into /dev there is nothing that
> indicates that this drive has partitions.
>
> So I formatted the drive on my mac into UFS. Same thing happens on freebsd. I
> did some googling and it appears to be so that this could be because of
> little vs big endian. I am however rather new to freebsd and have no idea
> what the difference is.
>
> So what can I do to have a drive readable to both OSes ?
> note:
> drive is 160 Gig seagate
> mac is running 10.3.5
> freebsd is amd 64 5.3 RELEASE
>
> mac supported disk formats are
> MS-DOS,UFS,HFS,HFS+
> I now that HFS or MS-DOS would work but then I have no support for 160 gig /
> long filenames
>
> I'm out of inspiration
>
> Thanks In advance
>
> Bram
>
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>
More information about the freebsd-hackers
mailing list