Restart your Mac. As soon as it turns on, even before you hear it go bong, hold down Cmd+S. The system will boot showing a lot of text. If it doesn't and you see the Apple logo, you've waited too long. Reboot and try again. When at the prompt type fsck -f. If changes are successfully made it will repeat the process then say "Modifications have been made". Then simply type in reboot and you should be able to partition your drive successfully.