hdiutil: create - No such file or directory

I am trying to create a dmg of the high sierra Recovery HD partition, using terminal,
(going to create a bootable USB with the Recover HD stuff by 'restore'ing from this dmg)

but this command


sudo hdiutil create -srcdevice disk0s3 ../RecoveryHD.dmg

and

sudo hdiutil create -srcdevice disk0s3 RecoveryHD.dmg


(and other variations, all executed from the desktop directory)


gives


hdiutil: create - No such file or directory


MacBook mid 2012 High Sierra. I am missing something stupid here, but no idea what



Joe C.

MacBook Pro (15-inch Mid 2012), OS X El Capitan (10.11.4)

Posted on Jul 8, 2018 8:36 PM

Reply
Question marked as Top-ranking reply

Posted on Jul 11, 2018 7:17 PM

Try the following:

sudo diskutil mount /dev/disk0s3

df | grep disk0s3

It actually mounted the Recovery partition (on High Sierra), where you could create a .dmg from the mounted Recovery file system.


On the High Sierra system, I have access to, /dev/disk1s3 was the recovery partition (It is an SSD based Mac). When I mounted it, it appeared as /Volumes/Recovery and an ls on the mounted file system shows:

ls -Rl /Volumes/Recovery

total 0

drwxr-xr-x 3 root wheel 96 Dec 31 2016 ./

drwxr-xr-x+ 4 root wheel 128 Jul 1 17:34 ../

drwxr-xr-x 13 root wheel 416 Jun 23 15:15 80C07111-95EA-4191-830B-614E539AAE52/


/Volumes/Recovery/80C07111-95EA-4191-830B-614E539AAE52:

total 1063560

drwxr-xr-x 13 root wheel 416 Jun 23 15:15 ./

drwxr-xr-x 3 root wheel 96 Dec 31 2016 ../

drwxr-xr-x 5 root wheel 160 Jun 23 15:15 .diagnostics/

-rw-r--r--@ 1 root wheel 1984 May 29 18:53 BaseSystem.chunklist

-rw-r--r--@ 1 root wheel 485329910 May 29 18:15 BaseSystem.dmg

-rw-r--r--@ 1 root wheel 5082 May 17 23:41 PlatformSupport.plist

-r--r--r--@ 1 root wheel 480 May 29 17:03 SystemVersion.plist

-rw-r--r--@ 1 root wheel 576056 Jun 23 15:15 boot.efi

-rw-r--r--@ 1 root wheel 2738 May 29 18:12 boot.efi.j137ap.im4m

-rw-r--r-- 1 root wheel 397 Jun 23 15:15 com.apple.Boot.plist

-rw-r--r--@ 2 root wheel 29299999 May 8 19:01 immutablekernel

-rw-r--r--@ 1 root wheel 2738 May 29 18:12 immutablekernel.j137ap.im4m

-rw-r--r--@ 2 root wheel 29299999 May 8 19:01 prelinkedkernel


/Volumes/Recovery/80C07111-95EA-4191-830B-614E539AAE52/.diagnostics:

total 5568

drwxr-xr-x 5 root wheel 160 Jun 23 15:15 ./

drwxr-xr-x 13 root wheel 416 Jun 23 15:15 ../

-rw-r--r--@ 1 root wheel 328 May 29 18:53 AppleDiagnostics.chunklist

-rw-r--r--@ 1 root wheel 2839919 May 29 18:13 AppleDiagnostics.dmg

-rw-r--r--@ 1 root wheel 977 Apr 30 12:25 Info.plist

And then I was able to create a .dmg using

sudo hdiutil create -srcfolder /Volumes/Recovery Downloads/tmp.recovery.dmg

...................................................................................................

created: /Users/raharris/Downloads/tmp.recovery.dmg


ls -lh Downloads/tmp.recovery.dmg

-rw-r--r--@ 1 root staff 492M Jul 11 22:15 Downloads/tmp.recovery.dmg

Does that help?

Similar questions

17 replies

Jul 10, 2018 5:59 PM in response to freesoftwarewiz

This is an educated guess.


If you just want to do that, you could try single user mod.

This page will tell you how to get into single user mode.

http://support.apple.com/kb/HT1492


If that don't work, try a network boot

option + command + r should work. power off. hold down option + command + r key. power on. wait to see icon.


my experience in 10.10.3. I double the problem is with hd.dmg. that leaves /dev/disk0s3

mac $ sudo hdiutil create -srcdevice /dev/disk0s3 HD.dmg
Password:
hdiutil: create failed - Resource busy
mac RC=1 $
mac RC=1 $ diskutil list /dev/disk0
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage                         999.3 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
mac $


This hints at it /dev/disk0s3

mac $ dd if=/dev/disk0s3 bs=409m | dd of=~/disks0s3.binary
dd: /dev/disk0s3: Permission denied
0+0 records in
0+0 records out
0 bytes transferred in 0.000370 secs (0 bytes/sec)
mac $

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

hdiutil: create - No such file or directory

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.