0

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

  1. Does OSX have an equivalent for a loop device?
  2. What are the OSX equivalents for losetup (brew commands are an option)?

I will save zerofree equivalent questions for a future posting

muru
  • 72,889
gatorback
  • 1,384
  • 23
  • 48
  • https://apple.stackexchange.com/questions/9284/does-mac-have-something-similar-to-a-linux-loop-device-alternative-to-losetup/9288 – user1133275 Feb 03 '20 at 17:55
  • Add a tag wiki and excerpt to the new tag you created, please: https://unix.stackexchange.com/edit-tag-wiki/5548 – muru Feb 04 '20 at 02:31

0 Answers0