What can you do if your hard drive Partition Table has gotten messed up?
First learn about Partition Tables:
http://en.wikipedia.org/wiki/Partition_%28IBM_PC%29
In computer engineering, hard disk drive partitioning is the creation of logical divisions upon a hard disk that allows one to apply operating system-specific logical formatting...
There are many tools for trying to recover from hard drive problems. There is an open source tool for trying to reconstruct a partition table: TestDisk.
http://www.cgsecurity.org/testdisk.html
http://www.sleuthkit.org/informer/sleut ... er-15.html
http://www.cgsecurity.org/phpwiki/index.php/testdisk
But if you are a rookie, and want to go step by step carefully and learning, here is a wonderful detailed story of writing simple Linux scripts to look at the hard drive and figure everything out:
http://www.linuxjournal.com/article/8661
How a Linux Distro Saved Hard Disk Data
By Collin Park
Our search-and-rescue expert is back to share how he recovered a master boot record and reclaimed lost data.
Partitions; How a Linux Distro Saved Hard Disk Data
inspecting the hard drive boot sector MBR
Information here on inspecting the hard drive boot sector MBR:
http://puppylinux.org/wikka/Sector0
http://puppylinux.org/wikka/hexdumpBASIC
http://puppylinux.org/wikka/Sector0
http://puppylinux.org/wikka/hexdumpBASIC