Can you give a simple command to make a DMG of a working APFS drive? One that only takes as much space as is used and doesn’t contain all the free space like dd does?
Okay. Here is some info on how to create a DMG without dd that can be restored later to another drive of a volume is equal or larger using another command. I know not that simple. Trust me, it will be soon.
First find the disk and here Cat is replace it with your Volume name:
diskutil list | grep Cat
from that you get will something like:
1: APFS Volume Cat - Data 3.5 GB disk18s1
4: APFS Volume Cat 10.0 GB disk18s4
Great! Now we have the disk. Let's unmount it like so:
diskutil unmountDisk /dev/disk18
Unmount of all volumes on disk18 was successful
Great!
If it does not unmount, reboot and try again. Trust me, it'll work.
Let's image that disk.
sudo hdiutil create -srcdevice /dev/disk18 /Volumes/Space/CatalinaB2/Cat_cleaninstall.dmg
If you did it right you'll get:
Preparing imaging engine…
Reading whole disk (Apple_APFS : 0)…
.......................................................................................................................................
(CRC32 $20D5402B: whole disk (Apple_APFS : 0))
Adding resources…
.......................................................................................................................................
Elapsed Time: 10m 42.168s
File size: 16580557253 bytes, Checksum: CRC32 $56F131BC
Sectors processed: 78320968, 45377984 compressed
Speed: 34.5Mbytes/sec
Savings: 58.7%
created: /Volumes/Space/CatalinaB2/Cat_cleaninstall.dmg
I ran mine on a USB 2.0 HD source. On an Internal HD or SSD you can clone this size image 2-4m. And restore in 4-8 min. These are for clean installs. I did notice that Beta2 clean install is a different than than b1, but it will clone! B1 clean can clone in half those times.
diskutil mountDisk /dev/disk18
Volume(s) mounted successfully
Great!
Restoring is next. Stay tuned!
My source B2 image is 16.58 GB. That's a lot bigger than B1 which is 9.67 GB.
[doublepost=1560915670][/doublepost]
You know, I'm still not sure about prelinked being automatically generated if needed, at least on b1. A while ago I actually tested this by deleting it from my boot image and it won't boot (with the expected kernel error). It sure was the case in Mojave, but my experience with Cat b1 was different. Maybe a bug that just got fixed.
At boot in verbose mode -> After a Kext change and reboot, I would see the system suggesting to rebuild a prelinked kernel, and then on the same line, it would say this something.kext triggered rebuild.
When I would try to rebuild the prelinked kernel on Cat, and it would say an Apple USB Audio Kext stopped the prelinked kernel from being built. It would get warnings from patched kext's but those were okay. There was a signing issue on B1 with that Kext. I would have left the rebuild command in there but it didn't look like it was working on Cat at the time.
I did see with my set of patches, lots of stuff loads in Verbose mode. Lots of info and codes run across the screen. And the boot time is really good. And the kext triggered build line doesn't fire hardly at all.
When adding a kext, Look for the triggered rebuild message right before the system goes to the Window Server. It's one of the last things it mentions or does at boot when changes are made. It's also around where that timeout stuff can happen when not booted from Single use mode, just Verbose mode and without ASentientBot's HID patch.
Also when modifying the system like applying a patch, if you reboot via the command line without -q, it will wait for the system to updates to finish and it will wait for a lock. There is stuff going one automatically behind the scenes. Could be system maintenance, could be an auto rebuild, but something is happening and with -q off. The reboot command w/o -q will flush caches, at least that is what it is supposed to do according to the man page.