setting view options on burned CDs/DVDs

Dear Lazyweb,

Last year I asked how to set view options on .dmg files, so that when you mount the file system, it shows up in list-mode instead of icon-mode, etc. And I actually got answers, and now know how to do it. And there was much rejoicing.

Now I want to know how to do the same thing, but with a burned CD. I want to burn a CD so that when I put it in the drive, it shows up in list-mode instead of icon-mode. And I want the CD to still be mountable on a non-Mac computer (ISO9660 file system, not HFS+.)

Any ideas?

Things that don't work:

  • Creating a .dmg (that has proper view options) and using Disk Utility to create a .cdr ("CD/DVD Master") file, and then burning that from Disk Utility gives me a CD that mounts with the right view options, but it's HFS, and thus unmountable on Linux.

  • Creating a .iso like this:
        hdiutil makehybrid -o new.iso -joliet -iso old.cdr
    or this:
        hdiutil makehybrid -o new.iso -joliet -iso old.dmg
    creates an ISO9660 file system that does not preserve the view options when mounted, presumably because the .DS_Store seems to have been deleted during the conversion process.

Tags: , , ,

12 Responses:

  1. ninjarat says:

    According to the hdiutil man page:

    -keep-mac-specific Expose Macintosh-specific files (such
    as .DS_Store) in non-HFS+ filesystems
    • duskwuff says:

      The hdiutil man page has a lot of options having to do with burning, actually. One that might particularly interest jwz might be hdiutil makehybrid -hfs -iso, which will let you create a bizarre hybrid ISO9660/HFS+ disc.

    • jwz says:


      When I do
      hdiutil makehybrid -o new.iso -joliet -iso -keep-mac-specific old.dmg
      I get the desired result on the Mac end, but when I put it in a Linux box, a directory that should be named "ant.saver" looks like "antsaver" instead.

      If I omit -joliet, I get that same naming lossage on the Mac side, and also lose the view options.

        • jwz says:

          Yes, I am well aware that ISO9660 is worthless without "extensions" that are supported by every platform. Your link is utterly unhelpful.

      • ninjarat says:

        That's because Linux prefers to use Rock Ridge over Joliet. If you mount the CD on linux with the "norock" option then Linux will use Joliet if it is there and the filesystem will look correct.

        The other method is to lose the -keep-mac-specific option and add -hfs to the filesystem types so that Macs see HFS, Windows sees Joliet, and Linux sees whatever you tell it to see.

      • edouardp says:

        ISO 9660 has very limited support for filenames (8.3 at level 1). And there are ways of creating non-level 1 disks, but everyone basically ignores them and uses custom OS-family specific extensions instead. Joliet on the PC, HFS on the Mac, and RockRidge on UNIX.

        hdiutil might be able to do what you want with -hfs -iso -joliet all on the command line, as each OS should take it's native extension if present first. Maybe. But maybe the Rock Ridge code has some strange paths that mess up with the other stuff turned on. Who knows.

        If I were doing this, however, I'd use another tool for the job - I'd use hdiutil to burn the CD, and mkisofs to make the ISO image (just like I do on Linux and Windows). Grab CDRTools 2.01 from and compile your own copy. It's stable and capable and available on all platforms.

  2. bodyfour says:

    The next tool I would try is good ol' mkisofs since it's got a zillion options for controlling details of the generated .iso image. It compiles easily on OS X. Just grab the tarball, do a "make all", and grab the resulting "mkisofs/OBJ/*/mkisofs" binary.

    • sherbooke says:

      We use mkisofs on Linux for burning our cds - some of our customers get Linux, Windows & MacOS X :-( Some options:

      NT_OPTIONS="-J -hide-joliet-trans-tbl -max-iso9660-filenames -R"
      MAC_OPTIONS="-hfs --ethershare -D"
      UNIX_OPTIONS="-r -hide-rr-moved"
      NOMAC_OPTIONS="-x .rsrc"
      COMMON_OPTIONS="-allow-leading-dots -l -allow-lowercase -allow-multidot -x .DS_Store"

  3. fantasygoat says:

    Related to this, I'd like the default view on AFP mounted volumes to be list view instead of icon view. Is there some way to set this that you're aware of?