-1

I was using Windows 7, then I had shrinked the partitions to left about 150 GB of free space on the disk to install Ubuntu 20.04 alongisde with Windows. I booted Ubuntu via pendrive and after installing it, I could'nt boot neither Windows or Ubuntu.

Then I decided to wipe the entire disk and just go with Ubuntu (I have my files on cloud services so that's ok), but after formating the HD, I cant even get Gparted to read the hard drive - returns the error "Input/Output error during read on /dev/sda" - and it reads only the pendrive; when I try "sudo fdisk -l" on the terminal, I only get a bunch of /dev/loopX disks and the USB device; but when I open the "Disks" application, it shows my Toshiba hard disk is ok with all its space unknown.

I only want to get my hard drive back (with Ubuntu, if possible), It was working fine before I attempted installing Ubuntu. How can I get my hard drive back?

  • 1
    Ubuntu focal fossa (it's not been released yet, it'll be 20.04 after release) is still in testing. Focal fossa however does not create a failing disk (IO errors), and I'd stop using it (ie. your disk). Boot boot 'live' media & check the health of your drive (https://help.ubuntu.com/community/Smartmontools). – guiverc Apr 23 '20 at 11:39
  • I hadn't even got the chance to use after installation, I am currently booting from the live media to ask the question. I'm checking it, the test will take 214 minutes from now. Thanks for the answer! – Eduardo Leme Apr 23 '20 at 11:45

1 Answers1

-1

when I open the "Disks" application, it shows my Toshiba hard disk is ok with all its space unknown

Going by this, I think your disk does not have a partition table. Try creating a partition table for the disk and then checking if fdisk would detect your disk.

This answer can help you if GParted can detect the disk.

shine
  • 16
  • 1
  • It was exactly it, the partition table was corrupted. I also have 460 bad blocks on my HD, so it could also be another factor. (Wait, still formatting answer) – Eduardo Leme Apr 25 '20 at 01:32
  • Continuing: I solved the problem with this steps: first, to identify bad blocks, I ran a "sudo badblocks -wsv -c 1024 /dev/sda" in the terminal. After the tests were over, I opened Gparted and it recognized the disk (full of unknown data, as it showed). Then I created a new partition table along the installation of Ubuntu 20.04. Now everything's fine. Thanks for the answer! P.S.: To anyone reading this in the future, the command I ran wipes the entire HD! Study the command carefully before trying anything. – Eduardo Leme Apr 25 '20 at 01:41
  • Another thing to add: within the new partition table, I had about 2 MB of "free space" after creating the EFI and main partitions even after trying to use the entire space. Maybe it has to do with the bad blocks. Not really a problem to me, just something to consider. – Eduardo Leme Apr 25 '20 at 01:48
  • The file system pads 1-2 MB in between partition to align with sectors / blocks. This is normal. – shine Apr 25 '20 at 10:50
  • Please mark the answer as the solution if you think this was the answer to your question. – shine Apr 25 '20 at 10:51