Boot partition suddenly unusable
I was recently trying to install Ubuntu onto a partition on my Mac (mid 2015 21.5" iMac, running macOS Mojave).
A by-product of this was that my macOS boot partition was renamed to FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF rather than Macintosh HD or whatever it was before. It continued working fine before I rebooted my Mac (so I know that all my data is still there) but when I did, there was no way to access the partition.
I formatted the 40gb I'd allocated to Ubuntu and put a fresh install of macOS Sierra on it using recovery mode.
I know that my data is formatted as APFS but disk utility doesn't recognise it at all.
This is what terminal says when I type in diskutil list:
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk0
1: EFI EFI 209.7 MB disk0s1
2: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF 960.0 GB disk0s2
3: Apple_HFS efwef 39.3 GB disk0s3
4: Apple_Boot Recovery HD 650.0 MB disk0s4
And this is what it says when I type in diskutil info disk0s2:
Device Identifier: disk0s2
Device Node: /dev/disk0s2
Whole: No
Part of Whole: disk0
Volume Name: Not applicable (no file system)
Mounted: Not applicable (no file system)
File System: None
Partition Type: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
OS Can Be Installed: No
Media Type: Generic
Protocol: SATA
SMART Status: Verified
Disk / Partition UUID: 71F124C4-B25D-41F0-88AE-CD4145D652FD
Disk Size: 960.0 GB (960018657280 Bytes) (exactly 1875036440 512-Byte-Units)
Device Block Size: 512 Bytes
Read-Only Media: No
Read-Only Volume: Not applicable (no file system)
Device Location: Internal
Removable Media: Fixed
Solid State: No
It won't let me mount it or use any APFS commands because it doesn't think it has a file system.
I know for sure that disk0s2 is using a file system and that my data is intact, my question is: how do I access it? or, how do I get my Mac to recognise it as what it is?
Thank you
iMac (Retina 4K, 21.5-inch, Late 2015), macOS Mojave (10.14), null