I can't do anything via dd
with my Physical devices agreed.
I can only work with partitions like disk2s1
, but can not read from whole disk like disk2
.
Can't find where is the root of problem.
- Check disks:
diskutil list
- Unmount:
diskutil unmountDisk /dev/disk2
Then
$ sudo dd bs=4m if=/dev/disk2 of=~/Desktop/PiOS_full_root.img
dd: /dev/disk2: Permission denied
What causes this problem? why dd
sends this error from sudo
there are similar topics around. What've tried, but doesn't works:
and many others. nothing is helps.
- I check system preferences and gave full disk access to iTerm2 (doesn't help)
- unmount via
diskutil unmountDisk
anddiskutil unmount
- Change USB ports (many people said because of the physical lock of sd card.
- change
disk
/rdisk
naming - result the same - Lock\unlock state doesn't affect it (it's microUSB, put without adapter into the microsd slot)
Any suggestions, what to check, and how to fix it?
Here is the log:
~ ❯ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 314.6 MB disk0s1
2: Apple_APFS Container disk1 500.0 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +500.0 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD - Data 437.8 GB disk1s1
2: APFS Volume Preboot 80.6 MB disk1s2
3: APFS Volume Recovery 528.5 MB disk1s3
4: APFS Volume VM 1.1 GB disk1s4
5: APFS Volume Macintosh HD 11.2 GB disk1s5
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *15.9 GB disk2
1: Windows_FAT_32 boot 268.4 MB disk2s1
2: Linux 15.7 GB disk2s2
~ ❯ diskutil unmountDisk /dev/disk2
Unmount of all volumes on disk2 was successful
~ ❯ sudo dd bs=1m if=/dev/rdisk2 of=~/Pi_Backup.img
dd: /dev/disk2: Permission denied
~ ❯ ls -lhdO /dev/disk2
brw-r----- 1 root operator - 1, 9 Jul 11 17:39 /dev/disk2
Update: another interesting thing: I chack disk in disk utility -> Get info -it's not writable!
But if I mount boot partition disk2s1
- I can write there!
disk2s1
, not whole diskdisk2