Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have recently attempted to install ubuntu on my laptop, replacing windows 7.

The HDD was working fine with windows 7.

On my first attempt to install ubuntu it kept giving me an error that was saying it could not create the partitions needed for the installation.

I then tried to manually delete all the partitions that were on the HDD and then attempt the installation. Then it started saying that it could not create the ext4 file system.

So, then i tried deleting partitions again and found out that i had a bad superblock. So, then i tried the suggestions in this link. This did not solve the superblock problem.

So, then i used mkfs.ext4 /dev/sda to try and just format the whole drive. Everything seemed fine, and then the installation failed. It said it was unable to create the partitions again.

I am on the live cd and gparted does not detect any HDD any more.

I need to get ubuntu installed on this HDD. Can someone please assist me in getting this HDD to work again.

Let me know if you need any further details. Thanks!

Output from sudo fdisk -l:

fdisk: unable to read /dev/sdc: Input/output error

share|improve this question
You said gparted does not detect you HD no more, have tried checking your bios to see if it's detected at boot time? if its not detected at boot time, make sure you HDD is attached properly also. ... – WeloSefer Jan 1 '13 at 7:48
As WeloSefer said.. If you do get past this part, if i recall, when you come to partition the drive during the install process there's a tick box to force a proper format of the partition. However if your machine cant detect the drive, it may be damaged. – FreudianSlip Jan 1 '13 at 7:51
Bios sees the HDD. I do not believe the drive is physically damaged. I just think that i have formatted the drive incorrectly. How can i format the drive so that it will be ready accept an ubuntu installation with an ext4 file system? – prolink007 Jan 1 '13 at 17:25
@prolink007 try disabling SATA native support from bios and try booting from gparted. If that doesn't work then can you include the output of fdisk -l with your question ? – WeloSefer Jan 1 '13 at 20:09
@WeloSefer: How do i disable SATA native support? All i see is SATA Mode: AHCI Mode and the second option for this field is IDE Mode. Everything else in the bios is security and boot. – prolink007 Jan 1 '13 at 20:28

@prolink007 I did some reading regarding your problem and I found out that left over GPT data on the hard drive confuses GParted. SO, in order to fix the issue you have to use GPT fdisk aka gdisk try the following steps which might help.

 1. Boot into Gparted and go to counsel    

 2. Type "gdisk /dev/sda" (change "/dev/sda" to whatever is appropriate to access your hard disk,
     if necessary). you can use gdisk -l to print out the info needed

 3. The program is likely to complain that it's found both MBR and GPT data, and will ask which 
    to use. It doesn't matter which you tell it to use.

 4. At the "Command" prompt, type "x" to enter the experts' menu.

 5. At the "Expert command" prompt, type "z" to "zap" (destroy) the GPT data.

 6. Type "y" in response to the confirmation about destroying the GPT.

 7. Type "n" in response to the query about blanking the MBR. 

Hope this fix the issue. Let me now

share|improve this answer
I got the live cd of gparted from here…. I booted into the default selection and it is now saying a long error. The important stuff seems to be: Write protect is off and Write cache: enabled, read cache: enabled, doesn't support DPO or FUA. And it just says a lot of that on the screen. It did not bring me to a desktop or command prompt. – prolink007 Jan 1 '13 at 22:54
That's odd. Try resting your bios to default setting and try again. If that doesn't work, you HD is done. It might have some physical damage ie if you have dropped your laptop recently. =\ – WeloSefer Jan 2 '13 at 0:00
Never dropped it. It just started acting like this after i attempted to install ubuntu. I might try to put windows back on to see what happens. I will try your bios suggestion and the windows thing and let you know what happens. Thanks – prolink007 Jan 2 '13 at 0:33
The windows installation does not see my hdd either. – prolink007 Jan 2 '13 at 0:41
Now my bios is not seeing the hdd! Is there a way that i need to mount the drive or something? – prolink007 Jan 2 '13 at 0:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .