Re: Mac UFS partition unreadable

From: Charles Sprickman (spork_at_fasttrackmonkey.com)
Date: 12/21/04

  • Next message: Steven Hartland: "Re: gdb not finding shared libraries for emulated binaries"
    Date: Tue, 21 Dec 2004 15:10:24 -0500 (EST)
    To: Bram Van Steenlandt <brampie@no-wackos.com>
    
    

    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@freebsd.org mailing list
    > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    >
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Steven Hartland: "Re: gdb not finding shared libraries for emulated binaries"

    Relevant Pages

    • Re: learning unix w/ fbsd?
      ... Commando taught me that the flag options were both useful ... > Given the loss of commando in OS X and the improvements in FreeBSD ... > Mac, but that was never the point of FreeBSD. ... It is instructive to recall what the first /killer app/ for AT&T unix ...
      (comp.unix.bsd.freebsd.misc)
    • Re: Intel Macs and FreeBSD?
      ... Just install Mac Developer Tools (included in the Applications ... At the risk of digressing on this topic, I want to add that I am actually at this point deciding between FreeBSD for the migration and Ubuntu. ... I considered migrating to OSX on the mini, and I do maintain an OSX Server machine at work, but I don't like the lack of a port system. ...
      (freebsd-questions)
    • Re: Is FreeBSD a suitable choice for a MacBook? --- WHY?
      ... My bottom line was that unless you want to run a very specific port that has not been ported to Mac OSX, I do not see the reason to install FreeBSD on a Mac Book. ... The kernel is mach microkernel based and not even slightly similar. ...
      (freebsd-stable)
    • Re: MAC OS X connection to FreeBSD?
      ... MAC OS X connection to FreeBSD? ... then used it all as the MAC OS X core (without the GUI of course)? ... they used it all as the Darwin core. ...
      (freebsd-questions)
    • Re: Intel Macs, FreeBSD, and drivers
      ... will that driver work under FreeBSD? ... a very new Intel Mac has a new disk controller, ...
      (freebsd-questions)