Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'How *I* finally got it to work' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How *I* finally got it to work
Authored by: DeusExMachina on Dec 12, '03 05:07:21AM
Man, I sure had a lot of trouble with this hint!


I don't know what the problem was, but neither of the hfs.util invocations seemed to have any effect for me, and like someone else commented, the documentation seems to be quite out of sync with the actual tool versions we have installed.


For the record, I'm using 10.3.1 (build 7C107) on a 2x2GHz G5. I have partitioned the one SATA drive into 3 partitions, which show up at /dev/(r)disk0s(3|5|7) and the 0s3 one is labeled "Swap" (for now) and intended for use as dedicated swap space.


Anyway, without hfs.util I was SOL for setting or querying UUIDs for these partitions, but as I looked various sources seemed to indicate that the partitions would likely already HAVE UUIDs, so it should just be a matter of finding them out. I think it was some of the documentation for pdisk or one of the other tools that alluded to this fact, which turned out to be true.


But how do you determine these UUIDs? Google pointed me to sysctl, procfs, etc. when referring to UUIDs and partitions on the same page... but none of this stuff applies to Mac OS X. Then I looked in /var/db for some reason, and saw the file /var/db/volinfo.database. Hmm, catting this file reveals 3 lines with 16 character hex strings at their heads, and meaningless other stuff... just the right number of lines for my partitions.


I tried sticking those values into fstab and rebooting... no dice. Anyone know what the heck that file contains?


So then I started thinking about whether the format of the fstab line was correct. After all, the example says


UUID=blah blah /mountpoint hfs 1 2


I assumed that first space was not intended to be replicated... ie


UUID=blahblah /mountpoint hfs 1 2


But is this line space-delimited, or tab-delimited? And why does it have "1 2" where the examples IN the fstab file all have "rw" or "ro" or "noauto"?


Well in the course of experimenting with my by now VERY messed up fstab file, I completely fubarred my system. I couldn't even restart into single-user mode! I couldn't even open the drive tray to boot from a CD! (there's no button I could find on a G5 superdrive, inside or out). I finally got it back by shutting it down completely, and leaving it off for 5 minutes. Then it booted normally, although my fstab still didn't work.


In the course of looking through the system.log that episode had generated, however, I finally solved the problem of finding my UUIDs, and shortly thereafter puzzled out the correct fstab format.


So, to summarize!


Find your UUIDs by looking in system.log with Console and observing the messages generated during a boot. You'll see diskarbitrationd checking all your partitions, and it nicely names them, UUIDs them, device-numbers them, and ices them. The UUIDs are even the long 32char ones like in the fstab samples!


Insert them info your fstab file in space-delimited form like so (assuming FFFF represents your UUID, /mountpoint is an existing folder you want to mount it on, etc.)


UUID=FFFF /mountpoint hfs rw 1 2


NOTE: the hint seems to leave out the "rw" part above, but it IS necessary! Also, the mountpoint must exist as a directory before you try this!


Do all that, and it should work. Anyway, it's 2AM, so I'm going to put any further testing off until tomorrow! :)


DeusExMachina

[ Reply to This | # ]

How *I* finally got it to work
Authored by: BraindeadMac on Jul 07, '04 10:18:30PM

Uh, there's a bit of misinformation in this hint. The UUIDs already exist for drives, use /System/Library/Filesystems/hfs.fs/hfs.util -k to get the UUID for any given device; you don't need to generate a UUID with -s.

To learn more about hfs.util just do type "man hfs.util".....



[ Reply to This | # ]