lost linux partition, help please - I am DESPERATE

By sebkg ยท 4 replies
Apr 9, 2006
  1. Help!
    I have been running a dual boot (Fedora Core 4 and WinXP) system for about a year now. I had the following partition table on one 80 gb HD:

    30gb NTFS Windows
    29gb Ext3 Linux (Extended Partition)
    1gb Swap partition for linux (Extended Partition)
    20gb FAT32 shared over the two drives (Extended Partition)

    Having run out of space on the FAT32 partition I wanted to move some of the space from the windows partition to the FAT32 partition using partition magic.
    To do this I removed 9gb from the NTFS partition and ended up with

    20gb NTFS Windows
    29gb Ext3 Linux (Extended Partition)
    1gb Swap partition for linux (Extended Partition)
    20gb FAT32 shared over the two drives (Extended Partition)

    Then I added the 9gb to the Extended Partition and BANG!

    I could no longer boot the system. I got error 17 from the GRUB LOADER.

    I have managed to get windows operational again but cannot get back into linux.

    I have tried using the Fedora recovery disc but it gives the error:
    Error mounting file system on hda5: Invalid arg
    and then does not detect any linux partitions.

    I have tried using a Knoppix CD to boot and once I am in Knoppix I get the error:
    Could not mount device. The reported error was:
    mount: wrong fs type, bad option, bad superblock on /dev/hda5 or too many mounted file systems
    when trying to browse hda5 (which I am sure is the linux partition).

    From Knoppix I ran fdisk- l and it provided the following:

    Device Boot Start End Blocks Id System
    /dev/hda1 * 1 2550 20482843+ c W95 FAT32 (LBA)
    /dev/hda2 2551 9729 57665317+ f W95 Ext'd (LBA)
    /dev/hda5 3825 7519 29680024+ 83 Linux
    /dev/hda6 7520 7649 1044193+ 82 Linux Swap
    /dev/hda7 7650 9729 16707508+ b W95 FAT32

    I also ran testdisk and got the following:
    Disk /dev/hda - CHS 9729 255 63 - 76316 MB
    Check current partition structure
    Partition Start End Size
    1* FAT32 LBA 0 1 1 2549 254 63 4095687
    2E Extended LBA 2550 0 1 9728 254 63 115330635
    X Extended 3824 0 1 7518 254 63 59360112
    No Ext2 or Reiser Marker
    5L Linux ext2fs 3824 1 1 7518 254 63 59360049
    5L Linux ext2fs 3824 1 1 7518 254 63 59360049
    X Extended 7519 0 1 7648 254 63 2088450
    6L Linux swap 7519 1 1 7648 254 63 2088450
    X Extended 7649 0 1 9728 254 63 33415200
    7L FAT32 7649 1 1 9728 254 63 33415137

    I thought attempting to return the HD to the original state by using partition magic may resolve the problem but when I start partition magic I get an error saying:
    Disk one appears to have partitions created using a different geometry... blah blah blah
    and then an error saying:
    Init failed: Error 117.
    Partition's drive letter cannot be identified.

    However, when browsing the HD in windows disk management everything looks healthy and then "unknown" partition type is still there and the correct size.

    Is there any way I can fix this? Can i recover the partition? or can I recover the data at least?

    I am extremely desperate.... I would even throw in a reward for advice that resolves my problem or at least allows me to recover the data from the linux partition.

    thank you,
    Sebastien Gerega
  2. Mictlantecuhtli

    Mictlantecuhtli TS Evangelist Posts: 4,345   +11

    Why didn't you move the logical partitions down so that the FAT32 partition could have been resized, if that was your intention in the beginning?

    I'd try other partition managers, such as Ranish Partition Manager where you can edit the partition table manually.
  3. lewekleonek

    lewekleonek TS Rookie Posts: 55

    Don't use extended partition since you have only 4 partitions you should do fine with them being primary.
    Looks like your partition table got slightly corrupted. Don't despair yet. If you want to recover data only from your linux partition you should be able to do that. First try the ext2fs driver for Windows: http://www.fs-driver.org/download.html
    This driver will allow you to mount your Linux partition as a drive under Windows. If you're still not lucky with this approach then you will need to do a data recovery scan with one of the industry standard tools; I highly recommend R-Studio, http://www.r-studio.com/ - it helped me to recover files for my friends from their formatted and badly partitioned drives etc. It's not that expensive either. Just make sure you don't format the partitions. The best bet for you would be to buy a new drive and put it in the system. Then save all your data there. Good luck and if you have questions let me know.
  4. sebkg

    sebkg TS Rookie Topic Starter

    found working file system, how to restore partition now?

    Thanks heaps lewekleonek!
    The fs-driver didnt provide anything useful but the R-Studio software was EXTREMELY helpful. I scanned the Linux partition and found 124 "Recognized" filesystems. Then I tried to browse the first one. This provided corrupted data. However, upon browsing the second filesystem I was extremely pleased to recognise my Linux data.

    So here is my new question. How can I restore this partition to a working state?
    I have the following data from R-Linux.

    The first recognized filesystem (the one that doest work) in the linux partition has the following properties.
    Partition Offset: 0
    Partition Size: 28.3 gb
    Parsed boot records: 1
    Parsed file entries: 0
    Estimated size: 29.3gb

    The second recognized filesystem (the one I want) has the following properties:
    Partition Offset: 31.5kb
    Partition Size: 28.3 gb
    Parsed boot records: 11
    Parsed file entries: 0
    Estimated size: 27.8gb

    Can I somehow make this second FS the main FS of the partition?
    thanks again
  5. lewekleonek

    lewekleonek TS Rookie Posts: 55

    Now, don't risk loosing your data; playing with partitions table is extremely dangeorous. Actually the quick and dirty solution would be to back-up your data from the lost partition with help of R-Studio tools (or others similar), re-partion the drive and re-install the operating system(s). That's the quickest and least painful option.
    If you insist on fixing the partitions you're sailing on deep and dangrous waters and you're on your own. I would still back-up your data before trying and then I would get myself Hiren's Boot CD - I guess current version is 7.9 and try one of the partition recovery tools included. There isn't reall a step by step approach. I can clearly see that Partition Magic has some serious issues with resizing linux partitions (etended ones in particular). Let me know how's fixing going.
Topic Status:
Not open for further replies.

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...