yesterday i was trying to install ubuntu os in my pc it was getting stucked in creating ext4 file partition everything was fine like hard disk power cable was connected i tried several times but no luck after that i use my windows 8.1 os USB(you can use dvd disc of windows 8 or 7 also) then i selected that partition and and deleted that partition and i allowed to install one percent of windows os on that partition then i cancelled it and retried with ubuntu once again and that worked fine.