Skip to content

Instantly share code, notes, and snippets.

@rickmark
Created February 24, 2020 00:12
Show Gist options
  • Save rickmark/d64a7fe0b4b896b3623b5f847303a7cc to your computer and use it in GitHub Desktop.
Save rickmark/d64a7fe0b4b896b3623b5f847303a7cc to your computer and use it in GitHub Desktop.
WTF XNU
rickmark@Pluma ~ % diskutil mount disk2s1
Volume on disk2s1 failed to mount
Perhaps the operation is not appropriate (kDAReturnNotPermitted)
If you think the volume is supported but damaged, try the "readOnly" option
rickmark@Pluma ~ % diskutil mount readOnly disk2s1
Volume on disk2s1 failed to mount
Perhaps the operation is not appropriate (kDAReturnNotPermitted)
If you think the volume is supported but damaged, try the "readOnly" option
rickmark@Pluma ~ % dd if=/dev/disk2s1 ~/transit.img
dd: unknown operand /Users/rickmark/transit.img
rickmark@Pluma ~ % dd if=/dev/disk2s1 of=~/transit.img
dd: /dev/disk2s1: Permission denied
rickmark@Pluma ~ % sudo !!
sudo dd if=/dev/disk2s1 of=~/transit.img
Password:
dd: ~/transit.img: No such file or directory
rickmark@Pluma ~ % sudo dd if=/dev/disk2s1 of=/Uesrs/rickmark/transit.img
dd: /Uesrs/rickmark/transit.img: No such file or directory
rickmark@Pluma ~ % touch transit.img
rickmark@Pluma ~ % sudo dd if=/dev/disk2s1 of=/Uesrs/rickmark/transit.img
dd: /Uesrs/rickmark/transit.img: No such file or directory
rickmark@Pluma ~ % sudo dd if=/dev/disk2s1 of=/Users/rickmark/transit.img
409600+0 records in
409600+0 records out
209715200 bytes transferred in 12.916899 secs (16235723 bytes/sec)
rickmark@Pluma ~ % hdiutil attach transit.img
/dev/disk3 /Volumes/EFI
rickmark@Pluma ~ %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment