Skip to content

Instantly share code, notes, and snippets.

@urmyfaith
Last active August 29, 2015 14:08
recovery ls from "Recovery HD"

#problem links in v2ex:

http://www.v2ex.com/t/142338#reply8

enabled diskUtility

defaults write com.apple.DiskUtility DUDebugMenuEnabled 1

list all disks

diskutil list

then we can see which is recovery disk:

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                          GB   disk0
   1:                        EFI EFI                      MB   disk0s1
   2:                  Apple_HFS disk                     GB   disk0s2
   3:                 Apple_Boot Recovery HD              MB   disk0s3

mount the Recovery HD disk

diskutil mount "Recovery HD"

note there is a blank between "Recovery" and "HD",also,you can usd \ to replace :

diskutil mount Recovey\ HD

open the dmg :

open /Volumes/Recovery\ HD/com.apple.recovery.boot/BaseSystem.dmg

copy what we need into our system.

sudo cp /Volumes/OS X Base System/bin/ls /bin/ls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment