Loopback mount in OSX

awesome71717 picture awesome71717 · Dec 28, 2010 · Viewed 17.8k times · Source

I am trying to mount an .img file (rootfs.img) so I can modify the features of the firmware for a derivitive of the 4fff N618 (Pandigital Novel).

I have flashed it with the firmware of the bqAvant and it is fully operational, but I cannot find a way to do a loopback mount with OSX 10.5, neither do I have a cd with a linux distro. The efi won't even let me boot from a usb device using rEFIt.

Using:

mount -o loop rootfs.img /mnt/rootfs

replies that loop is not supported.

Answer

S. T. Lee picture S. T. Lee · Feb 11, 2011

Look here https://serverfault.com/questions/174909/mount-block-file-on-osx. Here are the correct parameters for hdiutil:

$ hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount <filename>

Example:

$ hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount /Users/me/backup.rdisk4s2.dd

Example Output:

/dev/disk6