Having deleted both linux partitions from my device using
sudo diskutil eraseVolume free none disk0s4
sudo diskutil eraseVolume free none disk0s3
In an attempt to then have both partitions rejoin the larger one i used
sudo diskutil apfs resizeContainer disk0s2 0
but it was unsuccessful to my chagrin.
I checked my with
and now I have a shady FFFF-FFFF-FFFF partition instead of the normal
How can I revert the partition to its normal state and resize the partition without turning off my macbook and messing up the entire thing.
This is on macOS catalina 10.15.2
I have also an image of
sudo fdisk /dev/disk0
Any help would be greatly appreciated besides saying just use a time machine.
gpt -r show /dev/disk0
After implementing David Anderson's solution the end result was this
Which seems to have restored the partition to it's normal state.
Both of David Anderson's solutions work
MacBook-Pro ~ % sudo gpt -f remove -i 2 disk0 Password: disk0s2 removed MacBook-Pro ~ % sudo gpt -f add -i 2 -b 409640 -s 1796865488 -t apfs disk0 disk0s2 added