[ale] Rebuild partition table
Greg Freemyer
greg.freemyer at gmail.com
Mon Jan 22 10:06:18 EST 2007
Paul,
For full commentary read "help with LDE [linux disk editor]" from the
end of November.
Or the digest form is:
===
I'm pretty sure all gpart touches is the partition table in the MBR.
(The below assumes your old corrupted drive is /dev/hdc).
First save a copy of the MBR:
dd if=/dev/hdc of=MBR-backup-file bs=512 count=1
Then have gpart recreate the partition table
gpart -W /dev/hdc /dev/hdc
Then do a "fdisk -l /dev/hdc" and see if it looks right.
Then try to mount each of the partitions and see if they work. I
normally do this read-only.
mount -r /dev/hdc1 /mnt
umount /mnt
etc.
===
Greg
On 1/22/07, Paul Borghese <pborghese at groupstudy.com> wrote:
> I have a dual-boot machine with two disk, one running Linux and the other
> Windows XP.
>
> Do to work requirements I needed to install a larger hard drive for my
> Windows XP partition. I used the Maxblastor software to move my old
> Windows software to the new hard drive. Everything went fine except for
> the Windows partition would not boot. I beleive the Maxtor software was
> unable to handle the GRUB MBR. So I found my Windows installation disk
> and performed a fixmbr and fixboot figuring I can always reboot using a
> Linux rescue disk to reinstall GRUB.
>
> There is a good chance I ended up running fixmbr and fixboot not just on
> the Windows disk but also my Linux drive. The linux drive is now
> unbootable. When I try to mound my linux partition using an Ubuntu live
> disk, I am told the partition does not exist. Finally when I run fdisk, I
> receive the following output:
>
> --------------------------------------------------------------
> Command (m for help): p
>
> Disk /dev/sdc: 250.0 GB, 250059350016 bytes
> 255 heads, 63 sectors/track, 30401 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
> This doesn't look like a partition table
> Probably you selected the wrong device.
>
> Device Boot Start End Blocks Id System
> /dev/sdc1 ? 116388 126889 84344761 69 Unknown
> Partition 1 does not end on cylinder boundary.
> /dev/sdc2 ? 105915 222310 934940732+ 73 Unknown
> Partition 2 does not end on cylinder boundary.
> /dev/sdc3 ? 1 1 0 74 Unknown
> Partition 3 does not end on cylinder boundary.
> /dev/sdc4 1 213826 1717556736 0 Empty
> Partition 4 does not end on cylinder boundary.
>
> Partition table entries are not in disk order
> ------------------------------------------------
>
> So it looks like in the process of restoring my Windows disk, I corrupted
> my Linux disk partition table. Any ideas on how to repair the partition
> table without loosing data?
>
> Thanks!
>
> Paul
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
--
Greg Freemyer
The Norcross Group
Forensics for the 21st Century
More information about the Ale
mailing list