What I'm trying to accomplish:

I want to be able to load up my .sparseimage with all the files necessary on the disk, customize the background and layout of the Finder window (including using SetFile to hide some files) then convert the .sparseimage to an .iso file (with HFS, UDF & ISO file systems) for distribution and duplication.

This process works flawlessly, except that the HFS+ file system is not displaying the customized background graphic included in the HFS+ file system.

Problem summary:

.iso images created using hdiutil are not retaining their background picture.

Instead, the background only appears if the original disk image source (.dmg or .sparseimage) is present and mounted (i.e., the link in .DS_Store seems to be a symbolic link instead of a hard link).

Steps I'm taking:

  1. Create empty .dmg or .sparseimage (let's say "test.dmg" on the desktop)
  2. Mount the image
  3. Load necessary files into the mounted volume, including the background image file (let's name it "BG.png")
  4. In View Options for the image, set the background to Picture and Select the background image file (BG.png)
  5. Unmount the volume
  6. Open Terminal and run the command hdiutil makehybrid -o ~/Desktop/test.iso ~/Desktop/test.dmg
  7. Mount test.iso
    observe: background is white, even though BG.png is present on the volume
  8. Mount test.dmg
    observe: background is displaying BG.png image
  9. Close and reopen Finder window for test.iso volume
    observe: background is displaying BG.png (off of mounted .dmg volume)
  10. Eject test.dmg volume
  11. Close and reopen Finder windows for test.iso volume
    observe: background is white again


What am I doing wrong?

How do I do what I want to accomplish?