|
| 1 | +$ diskutil list |
| 2 | +/dev/disk0 (internal, physical): |
| 3 | + #: TYPE NAME SIZE IDENTIFIER |
| 4 | + 0: GUID_partition_scheme *500.3 GB disk0 |
| 5 | + 1: EFI EFI 209.7 MB disk0s1 |
| 6 | + 2: Apple_APFS Container disk1 500.1 GB disk0s2 |
| 7 | + |
| 8 | +/dev/disk1 (synthesized): |
| 9 | + #: TYPE NAME SIZE IDENTIFIER |
| 10 | + 0: APFS Container Scheme - +500.1 GB disk1 |
| 11 | + Physical Store disk0s2 |
| 12 | + 1: APFS Volume Macintosh HD - Data 340.9 GB disk1s1 |
| 13 | + 2: APFS Volume Preboot 85.9 MB disk1s2 |
| 14 | + 3: APFS Volume Recovery 529.0 MB disk1s3 |
| 15 | + 4: APFS Volume VM 3.2 GB disk1s4 |
| 16 | + 5: APFS Volume Macintosh HD 11.3 GB disk1s5 |
| 17 | + |
| 18 | +/dev/disk2 (internal, physical): |
| 19 | + #: TYPE NAME SIZE IDENTIFIER |
| 20 | + 0: FDisk_partition_scheme *15.9 GB disk2 |
| 21 | + 1: Windows_FAT_32 boot 268.4 MB disk2s1 |
| 22 | + 2: Linux 15.7 GB disk2s2 |
| 23 | + |
| 24 | +$ sudo diskutil unmount /dev/diskn |
| 25 | +disk2 was already unmounted or it has a partitioning scheme so use "diskutil unmountDisk" instead |
| 26 | + |
| 27 | +$ sudo diskutil unmountDisk /dev/diskn (if previous step fails) |
| 28 | +Unmount of all volumes on disk2 was successful |
| 29 | + |
| 30 | +$ sudo dd bs=1m if=$HOME/Downloads/tails-amd64-4.18.img of=/dev/rdiskn |
| 31 | +1131+0 records in |
| 32 | +1131+0 records out |
| 33 | +1185939456 bytes transferred in 44.708618 secs (26525970 bytes/sec) |
| 34 | + |
| 35 | +$ sudo diskutil unmountDisk /dev/diskn |
| 36 | +Unmount of all volumes on disk2 was successful |
| 37 | + |
| 38 | +---------------------------------------------------- |
| 39 | + |
| 40 | +[ |
| 41 | + ["command", [ |
| 42 | + ["shell-symbol", "$"], |
| 43 | + ["bash", ["diskutil list"]] |
| 44 | + ]], |
| 45 | + |
| 46 | + ["output", "/dev/disk0 (internal, physical):\r\n #: TYPE NAME SIZE IDENTIFIER\r\n 0: GUID_partition_scheme *500.3 GB disk0\r\n 1: EFI EFI 209.7 MB disk0s1\r\n 2: Apple_APFS Container disk1 500.1 GB disk0s2\r\n\r\n/dev/disk1 (synthesized):\r\n #: TYPE NAME SIZE IDENTIFIER\r\n 0: APFS Container Scheme - +500.1 GB disk1\r\n Physical Store disk0s2\r\n 1: APFS Volume Macintosh HD - Data 340.9 GB disk1s1\r\n 2: APFS Volume Preboot 85.9 MB disk1s2\r\n 3: APFS Volume Recovery 529.0 MB disk1s3\r\n 4: APFS Volume VM 3.2 GB disk1s4\r\n 5: APFS Volume Macintosh HD 11.3 GB disk1s5\r\n\r\n/dev/disk2 (internal, physical):\r\n #: TYPE NAME SIZE IDENTIFIER\r\n 0: FDisk_partition_scheme *15.9 GB disk2\r\n 1: Windows_FAT_32 boot 268.4 MB disk2s1\r\n 2: Linux 15.7 GB disk2s2\r\n\r\n"], |
| 47 | + ["command", [ |
| 48 | + ["shell-symbol", "$"], |
| 49 | + ["bash", [ |
| 50 | + ["function", "sudo"], |
| 51 | + " diskutil unmount /dev/diskn" |
| 52 | + ]] |
| 53 | + ]], |
| 54 | + |
| 55 | + ["output", "disk2 was already unmounted or it has a partitioning scheme so use \"diskutil unmountDisk\" instead\r\n\r\n"], |
| 56 | + ["command", [ |
| 57 | + ["shell-symbol", "$"], |
| 58 | + ["bash", [ |
| 59 | + ["function", "sudo"], |
| 60 | + " diskutil unmountDisk /dev/diskn ", |
| 61 | + ["punctuation", "("], |
| 62 | + "if previous step fails", |
| 63 | + ["punctuation", ")"] |
| 64 | + ]] |
| 65 | + ]], |
| 66 | + |
| 67 | + ["output", "Unmount of all volumes on disk2 was successful\r\n\r\n"], |
| 68 | + ["command", [ |
| 69 | + ["shell-symbol", "$"], |
| 70 | + ["bash", [ |
| 71 | + ["function", "sudo"], |
| 72 | + ["function", "dd"], |
| 73 | + ["assign-left", ["bs"]], |
| 74 | + ["operator", ["="]], |
| 75 | + "1m ", |
| 76 | + ["assign-left", ["if"]], |
| 77 | + ["operator", ["="]], |
| 78 | + ["environment", "$HOME"], |
| 79 | + "/Downloads/tails-amd64-4.18.img ", |
| 80 | + ["assign-left", ["of"]], |
| 81 | + ["operator", ["="]], |
| 82 | + "/dev/rdiskn" |
| 83 | + ]] |
| 84 | + ]], |
| 85 | + |
| 86 | + ["output", "1131+0 records in\r\n1131+0 records out\r\n1185939456 bytes transferred in 44.708618 secs (26525970 bytes/sec)\r\n\r\n"], |
| 87 | + ["command", [ |
| 88 | + ["shell-symbol", "$"], |
| 89 | + ["bash", [ |
| 90 | + ["function", "sudo"], |
| 91 | + " diskutil unmountDisk /dev/diskn" |
| 92 | + ]] |
| 93 | + ]], |
| 94 | + |
| 95 | + ["output", "Unmount of all volumes on disk2 was successful"] |
| 96 | +] |
0 commit comments