Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31

Thread: Accidentally Created Partition Table

  1. #1
    Join Date
    Mar 2010
    Beans
    17

    Accidentally Created Partition Table

    Alright, so, I booted using linux live, and was poking around Gparted, and was going to test some things on my extra hdd (80gb, IDE) -I thought that extra hard drive was selected, what I clicked Create Partition Table. Apparently, it was my primary hdd, (250gb Sata, Windows Vista x64) that was selected.

    I think I may have tried to cancel it after a few seconds, realizing what was happening, but yeah, it now shows the entire hdd as unallocated space.

    I immediately shut down the computer, pulled out linux live and tried to boot to windows, but I immediately got an error saying the disk couldn't boot, asking for a system disk.


    There was a thread with a guy who had a similar thing happen to him, but the thread dropped off... http://ubuntuforums.org/showthread.php?p=7034672


    sudo ./testdisk_static

    Opened testdisk for me, but now that testdisk is open, I'm not really sure what I need to do.

    I'm guessing that the boot sector on that hdd is gone..

    Can anyone tell me the bottom line on this? Are my files gone forever? There are some files that I don't have backed up on there, that I'm hoping are not gone. I would love it even more if I could somehow just repair that boot sector, and not have to reinstall everything on my machine.


    Any advice would be awesome!


    Steve

  2. #2
    Join Date
    Mar 2010
    Location
    Woonsocket, RI USA
    Beans
    3,195

    Re: Accidentally Created Partition Table

    I've never used testdisk, but I quickly found this guide, which may help:

    http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

    If you're lucky, you'll be able to recover your partitions. You may need to reinstall a boot loader in the disk's MBR to make the system bootable again. Depending on the options you selected in GParted, it's conceivable your filesystems are damaged, too, but if you only created a new partition table, they should be OK, just inaccessible because the system can't find them.

    In the future, back up your partition tables. You can make a binary backup with dd ("dd if=/dev/sda of=sda-backup.mbr bs=512 count=1"), but that only backs up the primary partitions. To back up both primary and logical partitions, you can use sfdisk:

    Code:
    sfdisk -d /dev/sda > sda-backup.txt
    This assumes you're using MBR, which seems likely given that you had Windows on the disk. If you're using GPT, I recommend you use my GPT fdisk to back up the GPT data. It's the 'b' option on the main menu. Alternatively, you can do a dd copy of the first 34 blocks, assuming a standard partition table size. The dd copy will get the primary table, but not the backup, which is stored at the end of the disk. Still, restoring the primary will enable disk utilities to recreate the backup.

  3. #3
    Join Date
    Mar 2010
    Beans
    17

    Re: Accidentally Created Partition Table

    Quote Originally Posted by srs5694 View Post
    I've never used testdisk, but I quickly found this guide, which may help:

    http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

    If you're lucky, you'll be able to recover your partitions. You may need to reinstall a boot loader in the disk's MBR to make the system bootable again. Depending on the options you selected in GParted, it's conceivable your filesystems are damaged, too, but if you only created a new partition table, they should be OK, just inaccessible because the system can't find them.

    Any thoughts on how to go about reinstalling the boot loader?

    The attachment shows where I'm at with teskdisk... Should I be writing the partitions to disk?

    Also... The backup your talking about... If I'm understanding you correctly... It won't help me in my current state, but would be life saver in the future?



    Edit* - I used the MBR repair in testdisk, and tried rebooting to windows, and a prompt written 1234F: shows up, but does not boot to windows no matter what number I type
    Attached Images Attached Images
    Last edited by chochy; March 10th, 2010 at 05:07 AM. Reason: Update

  4. #4
    Join Date
    Apr 2008
    Beans
    3,317
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: Accidentally Created Partition Table

    Should I be writing the partitions to disk?
    No. You seem to be missing the Windows System partition. Did you do the "Deep search"? Post a screen shot of deep search results.

  5. #5
    Join Date
    Mar 2010
    Beans
    17

    Re: Accidentally Created Partition Table

    Heres the results from the deepsearch...
    Attached Images Attached Images

  6. #6
    Join Date
    Mar 2010
    Beans
    17

    Re: Accidentally Created Partition Table

    Anyone know what to do now?

  7. #7
    Join Date
    Apr 2008
    Beans
    3,317
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: Accidentally Created Partition Table

    Quote Originally Posted by meierfra.
    You seem to be missing the Windows System partition.
    Actually I was wrong about the missing system partition, ( I was mislead since the Vista was listed as logical partition).

    Quote Originally Posted by chochy
    Anyone know what to do now?
    Select each of the two partitions found by the deep search and press "p". See which of them gives you a directory listing. (Pressing "esc" will get you back to screen with the deep search result)

    Then, at the screen with the deep search result, select the partition which gave you a directory listing. Use the "left arrow" key to change to first entry in that row to a "*":

    So the first two colums should look like


    * HPFS-NTFS
    D HPFS-NTFS


    or

    D HPFS-NTFS
    * HPFS-NTFS


    depending on which of the two partition gave you a directory listing.

    Then press "enter" to continue. Choose "write" at the next screen. Confirm the changes if asked.

    I don't think you will have to reinstall the boot loader. So just reboot and hope for the best.

  8. #8
    Join Date
    Mar 2010
    Beans
    17

    Re: Accidentally Created Partition Table

    Okay, I did the deep search, and listed the directories... I posted screenshots of both- They're pretty much identical other than in size...

    Which should I edit?

    Thanks so much for the help....
    Attached Images Attached Images

  9. #9
    Join Date
    Apr 2008
    Beans
    3,317
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: Accidentally Created Partition Table

    Probably either one will be fine. But I would pick the larger one:

    D HPFS-NTFS
    * HPFS-NTFS

  10. #10
    Join Date
    Mar 2010
    Beans
    17

    Re: Accidentally Created Partition Table

    Okay, so I made some progress:

    After writing to disk, I rebooted-


    I got an error that I was missing winload.exe and that I need to insert the manufacturers disk (my Vista cd) to repair the installation.

    Unfortunately, I don't have the disk on me right now, but I'll have it in a couple days to try that out. I'll let you guys know how it goes...

    Any other things I might try in the mean time?


    Thanks for all the help

Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •