Question Can't install OS X Mountain Lion because I can't reformat a failed disk

Desaxion

Reputable
Apr 10, 2016
30
0
4,540
Hello!
I was given an old Mac Book Pro that my fiancee used to have, before it either got corrupted or forgot her password. When I start the computer I am greeted with a screen showing a flashing folder with a question mark on it which seems to mean that the disk is damaged. When I start the computer in the macOS Recovery mode I can see the main hard drive (called Macintosh HD) in disk utility. When I try to check for problems it says that "the disk has incorrect size for logical volume" (Directly translated from swedish). If i try to repair the drive it says "Repar of disk failed: the object is invalid and cannot be serialized". If I try to reinstall macOS X in the Recovery mode I have to unlock the disk, but my fiancee has tried her old password she used to have but that didn't work. When I try to unlock the admin password using the terminal I cannot find the disk I want to change the password for. It seems that something is wrong on the drive, it says that the disk partition has 500,11 GB in capacity which is weird because the disk has 499 GB in capacity. I think that I maybe could erase and reformat the disk through the terminal but I can't figure out how. If anyone knows something, that would be very appreciated!