Since I have allocated 2 partition for installing windows. Now i want to get space back to the macintoh HD Disk, I just followed by the method online and tried several commands like:
jhdeMacBook-Pro:~ jh$ diskutil list /dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *121.3 GB disk0 1: EFI 1.1 GB disk0s1 2: Apple_HFS macintoh HD 42.3 GB disk0s2 3: Apple_Boot Recovery HD 650.0 MB disk0s3 sudo diskutil eraseVolume free none disk0s4
the disk0s4 & disk0s5 was installed with windows system before. But when i want to resize disk0s2 and let it have all the space:
sudo diskutil apfs resizeContainer disk0s2 0 diskutil: did not recognize APFS verb "resizeContainer"; type "diskutil apfs" for a list
It does not work.
I also tried
sudo diskutil resizeVolume disk0s2 R
It does not work as well and gives output below:
Resizing to full size (fit to fill) Started partitioning on disk0s2 macintoh HD Error: -69743: The new size must be different than the existing size
It seems that the missing space is not associated with Apple_HFS type disk now.
This is my first time to run diskutil commands, please help!
update1: the driveinfo is incompatible with the current version of macOS.
It seems that the missing space is not following the Apple_HFS type disk.
jhdeMacBook-Pro:~ jh$ ~/Downloads/driveinfo-1.0.3/driveinfo disk0 driveinfo: This script is incompatible with the current version of macOS.
update2: I tried
sudo gpt -r show /dev/disk0 and
sudo fdisk /dev/disk0
and get the output like that: