BACKGROUND
The loop device is available in Ubuntu and is the first step to processing the rPi image with zerofree.
The goal is to reproduce the UBUNTU example with OSX High-Sierra:
UBUNTU example
Raspberry Pi image successfully mounted to /dev/loop9p2:
$ sudo losetup -P /dev/loop9 rpi4_Ubuntu18.1_64GB.image
$ ls -l /dev/loop9*
brw-rw---- 1 root disk 7, 9 Feb 2 19:12 /dev/loop9
brw-rw---- 1 root disk 259, 0 Feb 2 19:12 /dev/loop9p1
brw-rw---- 1 root disk 259, 1 Feb 2 19:12 /dev/loop9p2
zerofree required sudo:
$ sudo zerofree -v /dev/loop9p2
14346339/14348998/15073019
- 14346339 number of nonzero blocks encountered
- 14348998 number of free blocks within the filesystem
- 15073019 total number of blocks within the filesystem
QUESTIONS
- Does OSX have an equivalent for a loop device?
- What are the OSX equivalents for
losetup(brew commands are an option)?
I will save zerofree equivalent questions for a future posting