I had a VDI (VirtualBox Virtual Disk Image) with Ubuntu 11.10 (64bit, I think) installed on it. Earlier, while running a GParted live CD on my Virtual Machine to erase the partition table of another Disk, I ended up inadvertently removing the partition table of my Ubuntu VDI instead of the other disk's (I know, it was stupid of me not to be 100% sure of which disk I was working on before proceeding, but I had done it so many times before that I did not even think of checking).
After gathering my bearings, I tried to look for a way to recover from the damage. I managed to recover my /dev/sda1
partition and the swap partition (even though it was now out of the extended partition it was into before) using TestDisk.
The problem is that now, when I boot into the VDI, I just get a black screen with no prompts nor any signs of life.
I tried to install TestDisk's MBR onto the disk and now when I ran the VM it would display TestDisk's MBR prompt. When I told it to boot into my Ubuntu partition, though, it kept displaying that black screen.
Is there a way to overcome this situation? I think the problem might be lying inside the partition's boot sector (and now I'll also have to reinstall GRUB or something over the MBR).
EDIT: Here's some additional information.
fdisk:
user@debian:~$ sudo fdisk -l /dev/sda
Disk /dev/sda: 75.0 GB, 75019321344 bytes
255 heads, 63 sectors/track, 9120 cylinders, total 146522112 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/Physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e56c7
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 129746943 64872448 83 Linux
/dev/sda2 129746944 146518015 8385536 5 Extended
/dev/sda5 129748992 146518015 8384512 82 Linux swap / Solaris
I'm not completely sure about this (and please excuse my ignorance if I'm wrong), but I think it might be an anomaly that /dev/sda1
starts at 2048
. Shouldn't it start at 0
?
hexdump -C /dev/sda | more
to see what's between the MBR and sda1.NOP
s) between0x40
(included) and0x70
(not included), and another one between0x200
and0x600
. Here's a screenshot of the dump