Create a temporary UFS partition

Jun 10, '03 10:01:00AM

Contributed by: wgscott

The other day I had to compile a program that required me to use a UFS formatted drive, as (I guess) it had files or something that differed only in having capital vs. small letters. It could not be compiled on an HFS+ formatted drive. Fortunately, I had NFS-mounted UFS drives from other UNIX systems, so this was not difficult. But what if this were not the case? Would I have to reformat my hard drive just to compile one lousy piece of software?

I then realized that one can use /Applications -> Utilities -> Disk Copy to create a temporary virtual UFS partition. You can do this as follows:

  1. From the Disk Copy menu, select   File -> New -> Blank Image
  2. In the "Save as" window type ufs.dmg (or anything you want).
  3. Select "Desktop" (for convenience) in the "Where" dialog.
  4. Leave volume name as Untitled, Size as 10 MB unless you will need more space.
  5. From "Format" select the "Unix File System" option.
  6. Now click on the "Create" button.
  7. Double-click the ufs.dmg icon, and you should get a virtual disk called Untitled.
  8. Change the permissions by issuing:
    sudo chmod 777 /Volumes/Untitled
Now you can copy whatever it is you need to compile to the virtual UFS disk, compile, and then install the software as needed.

Comments (2)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030608025117258