I'm attempting to use Steam on my Mac, but I set up my system to have case-sensitivity.

Steam has a thread for setting up an image file with a case-sensitive file system, however, I'm finding that it doesn't work.

Regardless of whether I create the sparse image from Disk Utility or from hdiutil, I get a mount-error.

hdiutil: attach failed - no mountable file systems

However, as far as I can tell I've created the file correctly?

#!/usr/bin/env bash
set -e


if [ ! -e "${MOUNTPT}" ]; then
    echo "sudo mkdir -m0777 ${MOUNTPT}"
    sudo mkdir -m0777 "${MOUNTPT}"

if [ ! -e "${SPARSEIMG}" ]; then
    hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 32g "${SPARSEIMG}"

hdiutil attach -mountpoint "${MOUNTPT}" -nobrowse "${SPARSEIMG}"

Can anyone tell me what I am not doing correctly?

UPDATE: The image that's created mounts properly in Disk Utility, but does not with hdiutil

  • The link to the Steam article just goes to the main forum page so it is impossible to see what the thread says - making the question not understandable – mmmmmm Sep 15 '18 at 10:11
  • @Mark - the link is irrelevant to diagnose the error specified in the question. Additionally, this question has an answer that addresses it. – Allan Sep 15 '18 at 11:54

It's a better practice to leave all uppercase variables for the shell and use lower and or mixed case for user variables in scripts. You need to preface the hdiutil attach ... command too with sudo if using /.000 as the mount point.

Here's my version of the script which works.


set -e


[ ! -d "$mountpt" ] &&  sudo mkdir -m0777 "$mountpt"
[ ! -e "$sparseimg" ] && hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 32g "$sparseimg"

sudo hdiutil attach -mountpoint "$mountpt" -nobrowse "$sparseimg"

enter image description here

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .