Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -bash-3.2# diskutil list
- /dev/disk0 (internal, physical):
- #: TYPE NAME SIZE IDENTIFIER
- 0: GUID_partition_scheme *251.0 GB disk0
- 1: EFI EFI 209.7 MB disk0s1
- 2: Microsoft Basic Data BOOTCAMP 33.8 GB disk0s3
- /dev/disk1 (external, physical):
- #: TYPE NAME SIZE IDENTIFIER
- 0: GUID_partition_scheme *16.0 GB disk1
- 1: EFI EFI 209.7 MB disk1s1
- 2: Apple_HFS Install macOS Mojave 15.7 GB disk1s2
- /dev/disk2 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: GUID_partition_scheme +2.1 GB disk2
- 1: Apple_HFS OS X Base System 2.0 GB disk2s1
- /dev/disk3 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +5.2 MB disk3
- /dev/disk4 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk4
- /dev/disk5 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk5
- /dev/disk6 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk6
- /dev/disk7 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +2.1 MB disk7
- /dev/disk8 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk8
- /dev/disk9 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk9
- /dev/disk10 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +12.6 MB disk10
- /dev/disk11 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +4.2 MB disk11
- /dev/disk12 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +1.0 MB disk12
- /dev/disk13 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +2.1 MB disk13
- /dev/disk14 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk14
- /dev/disk15 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk15
- /dev/disk16 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +1.0 MB disk16
- /dev/disk17 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +6.3 MB disk17
- /dev/disk18 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +6.3 MB disk18
- /dev/disk19 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk19
- /dev/disk20 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +2.1 MB disk20
- -bash-3.2# gpt -r show disk0
- gpt show: disk0: Suspicious MBR at sector 0
- start size index contents
- 0 1 MBR
- 1 1 Pri GPT header
- 2 32 Pri GPT table
- 34 6
- 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
- 409640 380859368 2 MBR part 218
- 381269008 42970096
- 424239104 65994752 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
- 490233856 863
- 490234719 32 Sec GPT table
- 490234751 1 Sec GPT header
- -bash-3.2# diskutil umountDisk disk0
- Unmount of all volumes on disk0 was successful
- -bash-3.2# gpt remove -i 2 disk0
- gpt remove: disk0: Suspicious MBR at sector 0
- -bash-3.2# gpt add -i 2 -b 409600 -s 431203056 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0
- gpt add: unable to open device 'disk0': Resource busy
- -bash-3.2# diskutil verifyDisk disk0
- Started partition map verification on disk0
- Checking prerequisites
- Checking the partition list
- Checking the partition map size
- Checking for an EFI system partition
- Checking the EFI system partition's size
- Checking the EFI system partition's file system
- Checking the EFI system partition's folder content
- Checking all HFS data partition loader spaces
- Checking booter partitions
- Checking Core Storage Physical Volume partitions
- The partition map appears to be OK
- Finished partition map verification on disk0
- -bash-3.2# diskutil verifyVolume disk0s2
- Unable to find disk for disk0s2
- -bash-3.2# dd if=/dev/disk0s2 count=3 | hexdump
- -bash: hexdump: command not found
- dd: /dev/disk0s2: No such file or directory
- -bash-3.2# gpt -r show /dev/disk0
- gpt show: /dev/disk0: Suspicious MBR at sector 0
- start size index contents
- 0 1 MBR
- 1 1 Pri GPT header
- 2 32 Pri GPT table
- 34 6
- 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
- 409640 380859368 2 MBR part 218
- 381269008 42970096
- 424239104 65994752 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
- 490233856 863
- 490234719 32 Sec GPT table
- 490234751 1 Sec GPT header
- -bash-3.2# fdisk /dev/disk0
- Disk: /dev/disk0 geometry: 30515/255/63 [490234752 sectors]
- Signature: 0xAA55
- Starting Ending
- #: id cyl hd sec - cyl hd sec [ start - size]
- ------------------------------------------------------------------------
- 1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>
- *2: DA 1023 254 63 - 1023 254 63 [ 409640 - 380859368] <Unknown ID>
- 3: 0C 1023 254 63 - 1023 254 63 [ 424239104 - 65994752] Win95 FAT32L
- 4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
- -bash-3.2# fdisk -e /dev/disk0
- fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
- Enter 'help' for information
- fdisk: 1> setpid 2
- Starting Ending
- #: id cyl hd sec - cyl hd sec [ start - size]
- ------------------------------------------------------------------------
- *2: DA 1023 254 63 - 1023 254 63 [ 409640 - 380859368] <Unknown ID>
- Partition id ('0' to disable) [0 - FF]: [DA] (? for help) 0
- fdisk:*1> quit
- Writing current MBR to disk.
- Device could not be accessed exclusively.
- A reboot will be needed for changes to take effect. OK? [n] y
- -bash-3.2# gpt -f add -i 2 -b 409640 -s 380859368 -t apfs disk0
- gpt add: disk0: Suspicious MBR at sector 0
- disk0s2 added
- -bash-3.2# fdisk -e /dev/disk0
- fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
- Enter 'help' for information
- fdisk: 1> edit 2
- Starting Ending
- #: id cyl hd sec - cyl hd sec [ start - size]
- ------------------------------------------------------------------------
- 2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
- Partition id ('0' to disable) [0 - FF]: [0] (? for help) DA
- Do you wish to edit in CHS mode? [n] n
- Partition offset [0 - 490234752]: [409640] 409640
- Partition size [1 - 489825112]: [489825112] 380859368
- fdisk:*1> quit
- Writing current MBR to disk.
- Device could not be accessed exclusively.
- A reboot will be needed for changes to take effect. OK? [n] y
- -bash-3.2# gpt -r show /dev/disk0
- gpt show: /dev/disk0: Suspicious MBR at sector 0
- start size index contents
- 0 1 MBR
- 1 1 Pri GPT header
- 2 32 Pri GPT table
- 34 6
- 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
- 409640 380859368 2 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
- 381269008 42970096
- 424239104 65994752 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
- 490233856 863
- 490234719 32 Sec GPT table
- 490234751 1 Sec GPT header
- -bash-3.2# fdisk /dev/disk0
- Disk: /dev/disk0 geometry: 30515/255/63 [490234752 sectors]
- Signature: 0xAA55
- Starting Ending
- #: id cyl hd sec - cyl hd sec [ start - size]
- ------------------------------------------------------------------------
- 1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>
- 2: DA 1023 254 63 - 1023 254 63 [ 409640 - 380859368] <Unknown ID>
- 3: 0C 1023 254 63 - 1023 254 63 [ 424239104 - 65994752] Win95 FAT32L
- 4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
- -bash-3.2#
- -bash-3.2# diskutil list
- /dev/disk0 (internal, physical):
- #: TYPE NAME SIZE IDENTIFIER
- 0: GUID_partition_scheme *251.0 GB disk0
- 1: EFI EFI 209.7 MB disk0s1
- 2: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF 217.0 GB disk0s2
- 3: Microsoft Basic Data BOOTCAMP 33.8 GB disk0s3
- /dev/disk1 (external, physical):
- #: TYPE NAME SIZE IDENTIFIER
- 0: GUID_partition_scheme *16.0 GB disk1
- 1: EFI EFI 209.7 MB disk1s1
- 2: Apple_HFS Install macOS Mojave 15.7 GB disk1s2
- /dev/disk2 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: GUID_partition_scheme +2.1 GB disk2
- 1: Apple_HFS OS X Base System 2.0 GB disk2s1
- /dev/disk3 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +5.2 MB disk3
- /dev/disk4 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk4
- /dev/disk5 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk5
- /dev/disk6 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk6
- /dev/disk7 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +2.1 MB disk7
- /dev/disk8 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk8
- /dev/disk9 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk9
- /dev/disk10 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +12.6 MB disk10
- /dev/disk11 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +4.2 MB disk11
- /dev/disk12 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +1.0 MB disk12
- /dev/disk13 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +2.1 MB disk13
- /dev/disk14 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk14
- /dev/disk15 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk15
- /dev/disk16 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +1.0 MB disk16
- /dev/disk17 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +6.3 MB disk17
- /dev/disk18 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +6.3 MB disk18
- /dev/disk19 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +524.3 KB disk19
- /dev/disk20 (disk image):
- #: TYPE NAME SIZE IDENTIFIER
- 0: untitled +2.1 MB disk20
- -bash-3.2# gpt -r show disk0
- gpt show: disk0: Suspicious MBR at sector 0
- start size index contents
- 0 1 MBR
- 1 1 Pri GPT header
- 2 32 Pri GPT table
- 34 6
- 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
- 409640 423829464 2 GPT part - FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
- 424239104 65994752 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
- 490233856 863
- 490234719 32 Sec GPT table
- 490234751 1 Sec GPT header
- -bash-3.2#
- fdisk -e /dev/disk0
- setpid 2
- 0
- quit
- y
- gpt -f add -i 2 -b 409640 -s 380859368 -t apfs disk0
- fdisk -e /dev/disk0
- edit 2
- DA
- n
- 409640
- 380859368
- quit
- y
- $ fdisk -e /dev/disk0
- fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
- Enter 'help' for information
- fdisk: 1> setpid 2
- Starting Ending
- #: id cyl hd sec - cyl hd sec [ start - size]
- ------------------------------------------------------------------------
- 2: DA 25 127 15 - 1023 254 63 [ 409640 - 380859368] <Unknown ID>
- Partition id ('0' to disable) [0 - FF]: [DA] (? for help) 0
- fdisk:*1> quit
- Writing current MBR to disk.
- Device could not be accessed exclusively.
- A reboot will be needed for changes to take effect. OK? [n] y
- $ gpt -f add -i 2 -b 409640 -s 380859368 -t apfs disk0
- gpt add: disk0: Suspicious MBR at sector 0
- disk0s2 added
- $ fdisk -e /dev/disk0
- fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
- Enter 'help' for information
- fdisk: 1> edit 2
- Starting Ending
- #: id cyl hd sec - cyl hd sec [ start - size]
- ------------------------------------------------------------------------
- 2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
- Partition id ('0' to disable) [0 - FF]: [0] (? for help) DA
- Do you wish to edit in CHS mode? [n] n
- Partition offset [0 - 492187540]: [409640] 409640
- Partition size [1 - 491777900]: [491777900] 380859368
- fdisk:*1> quit
- Writing current MBR to disk.
- Device could not be accessed exclusively.
- A reboot will be needed for changes to take effect. OK? [n] y
- $
- diskutil apfs resizecontainer disk0s2 0
- $ diskutil apfs resizecontainer disk0s2 0
- Started APFS operation
- Aligning grow delta to 22,000,689,152 bytes and targeting a new physical store size of 217,000,685,568 bytes
- Determined the maximum size for the targeted physical store of this APFS Container to be 217,000,685,568 bytes
- Resizing APFS Container designated by APFS Container Reference disk3
- The specific APFS Physical Store being resized is disk0s2
- Verifying storage system
- Performing fsck_apfs -n -x /dev/disk0s2
- Checking volume
- Checking the container superblock
- Checking the space manager
- Checking the object map
- Checking the APFS volume superblock
- Checking the object map
- Checking the fsroot tree
- Checking the snapshot metadata tree
- Checking the extent ref tree
- Checking the snapshots
- Verifying allocated space
- The volume /dev/disk0s2 appears to be OK
- Storage system check exit code is 0
- Growing APFS Physical Store disk0s2 from 194,999,996,416 to 217,000,685,568 bytes
- Modifying partition map
- Growing APFS data structures
- Finished APFS operation
- $
- /dev/disk0 (internal, physical):
- #: TYPE NAME SIZE IDENTIFIER
- 0: GUID_partition_scheme *252.0 GB disk0
- 1: EFI EFI 209.7 MB disk0s1
- 2: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF 217.0 GB disk0s2
- 3: Microsoft Basic Data BOOTCAMP 33.8 GB disk0s3
- gpt -f remove -i 2 disk0
- fdisk -e /dev/disk0
- setpid 2
- 0
- quit
- y
- gpt -f add -i 2 -b 409640 -s 423829464 -t apfs disk0
- fdisk -e /dev/disk0
- edit 2
- DA
- n
- 409640
- 423829464
- quit
- y
- $ gpt -f remove -i 2 disk0
- gpt remove: disk0: Suspicious MBR at sector 0
- disk0s2 removed
- $ fdisk -e /dev/disk0
- fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
- Enter 'help' for information
- fdisk: 1> setpid 2
- Starting Ending
- #: id cyl hd sec - cyl hd sec [ start - size]
- ------------------------------------------------------------------------
- 2: DA 1023 254 63 - 1023 254 63 [ 409640 - 423829464] <Unknown ID>
- Partition id ('0' to disable) [0 - FF]: [DA] (? for help) 0
- fdisk:*1> quit
- Writing current MBR to disk.
- Device could not be accessed exclusively.
- A reboot will be needed for changes to take effect. OK? [n] y
- $ gpt -f add -i 2 -b 409640 -s 423829464 -t apfs disk0
- gpt add: disk0: Suspicious MBR at sector 0
- disk0s2 added
- $ fdisk -e /dev/disk0
- fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
- Enter 'help' for information
- fdisk: 1> edit 2
- Starting Ending
- #: id cyl hd sec - cyl hd sec [ start - size]
- ------------------------------------------------------------------------
- 2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
- Partition id ('0' to disable) [0 - FF]: [0] (? for help) DA
- Do you wish to edit in CHS mode? [n] n
- Partition offset [0 - 492187540]: [409640] 409640
- Partition size [1 - 491777900]: [491777900] 423829464
- fdisk:*1> quit
- Writing current MBR to disk.
- Device could not be accessed exclusively.
- A reboot will be needed for changes to take effect. OK? [n] y
- $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement