Hard drive partitioning failed. Now motherboard doesn't post with it

HarrisonHill

Junior Member
Jul 18, 2013
4
0
0
So I have a hard drive with 3 primary partitions. I had Debian installed on my first primary partition (system), second one was extended, and I created third one for windows. So I went on installing windows on my third partition. And when I chose it, installation got frozen and PC restarted.

Then, bios wasn't posting beyond A2 code. Which I found out is an IDE problem. When I was disconnecting this hard drive from pc, it was POSTing successfully.

Then I tried hooking it up with second computer. And chose it as a boot drive. And it worked! I got past GRUB, but then error messages came up about low memory, killing udev processes. And system was trying to kill udev daemon infinitely.

I boot it up again, and tried ls-ing my hard drive with GRUB. ls (hd0,x) worked, All files and directories were there.

Then I tried booting up with windows and hotplugging my failed drive (AHCI of course). It tried installing drivers, but failed. Disk was showing up as just "Disk drive" in device manager. And it wasn't listed in diskmgmt or anywhere.
Now I tried different PC again. Same problem as with main PC - when drive is connected, mobo isn't posting beyond A2 code. So the only way to connect the hard drive was to hotplug it after BIOS post.


Tried various linux livecds:

Gparted LiveUSB:

1st try:

  • hotplugged after gparted has booted.
  • gparted got frozen

2nd try:
  • hotplugged right after gparted started initializing
  • gparted didn't boot up
  • error messages about low memory and udev

Knoppix LiveUSB

1st try:
  • hotplugged after knoppix has booted.
  • system got frozen

2nd try:
  • hotplugged during initialization
  • system didn't boot up


And then, Fedora gave me most time to play with HDD after I have plugged it.


Fedora LiveUSB


  • Hotplugged after fedora booted
  • Didn't freeze at first.
  • Tried lsblk - got sdd1 - sdd255, 255 partitions on my drive! No wonder it freezes. As it seems, drive tries to go beyond that, and system just can't handle it.
  • Frozen.


Any help or suggestions guys? Thanks!
 

HarrisonHill

Junior Member
Jul 18, 2013
4
0
0
SOLVED

All I had to do is somehow remove partitioning table. Enable AHCI and hotswap in BIOS, disconnect Hard drive, then depending on your motherboard, press key for boot options (it was F12 for me). This will pause boot so that you have time to connect your drive. Select any drive, but before pressing enter, swap out SATA connector from that drive to your failed drive and press enter. If you wait long enough, through the errors, you are going to get into initramfs with usable command prompt. Just do:

dd if=/dev/zero of=/dev/sdX bs=512 count=1

Then you can use TestDisk to restore partitions. If for some reason you can't get into initramfs, run Ubuntu Live CD, or Debian Live CD. And you'll be able to get a command prompt with dd.