Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Partitions are all gone.

  1. #1
    Senior Member
    Join Date
    Jul 2001
    Posts
    280

    Partitions are all gone.

    Booted up this morning, and computer died at kdm prompt. Rebooted. Comp asked me to insert system disk.

    Uh-oh.

    Booted up with Knoppix. Hard drives:

    /dev/hda -- SATA ext3
    /dev/hde -- IDE ext3 (and one FAT partition, too)

    hdE works okay, it seems. Mounts and everything. hdA is comatose. The partition program that Knoppix has (QTPart, I believe it is called) sees the disk, but it cannot find any partitions.

    So something screwed up my main harddrive. Major bummer.

    Is there anyway I can reconstruct this drive so I can extract and backup my data? Thanks for your help.

  2. #2

    Re:Partitions are all gone.

    Open a command prompt and run the following command:

    Code:
    /sbin/fdisk /dev/hda
    or
    Code:
    /sbin/fdisk /dev/sda
    if it sees the SATA as SCSI.

    On the fdisk prompt, hit the letter
    Code:
    p
    .

    It should list the partition table. Does it show anything?

  3. #3

    Re:Partitions are all gone.

    Also, this software is supposed to help you recover partitions. However, I have never used it.

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Posts
    280

    Re:Partitions are all gone.

    [quote author=trickster link=board=1;threadid=10591;start=0#msg95216 date=1122060683]
    Open a command prompt and run the following command:

    Code:
    /sbin/fdisk /dev/hda
    or
    Code:
    /sbin/fdisk /dev/sda
    if it sees the SATA as SCSI.

    On the fdisk prompt, hit the letter
    Code:
    p
    .

    It should list the partition table. Does it show anything?
    [/quote]

    No.

    root@ttyp0[knoppix]# /sbin/fdisk /dev/hda
    Device contains neither a valid DOS partition table, nor Sun, SGI or OSF diskla bel
    Building a new DOS disklabel. Changes will remain in memory only,
    until you decide to write them. After that, of course, the previous
    content won't be recoverable.


    The number of cylinders for this disk is set to 24321.
    There is nothing wrong with that, but this is larger than 1024,
    and could in certain setups cause problems with:
    1) software that runs at boot time (e.g., old versions of LILO)
    2) booting and partitioning software from other OSs
    (e.g., DOS FDISK, OS/2 FDISK)
    Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

    Command (m for help): p

    Disk /dev/hda: 200.0 GB, 200049647616 bytes
    255 heads, 63 sectors/track, 24321 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System

    Command (m for help):
    As far as I can tell, the entire partition table is just gone. Which is really weird because it did boot up at first, as I stated above, and when I rebooted, it seemed to wipe the partition table then.

  5. #5
    Senior Member
    Join Date
    Jul 2001
    Posts
    280

    Re:Partitions are all gone.

    [quote author=trickster link=board=1;threadid=10591;start=0#msg95217 date=1122060822]
    Also, this software is supposed to help you recover partitions. However, I have never used it.

    [/quote]

    Thanks for the link; I'm checking it out right now.

  6. #6
    Senior Member
    Join Date
    Jul 2001
    Posts
    280

    Re:Partitions are all gone.

    Okay, using the testdisk (v4.2) utility that comes with Knoppix, I have analyzed the /dev/hda drive.

    TestDisk 4.2, Data Recovery Utility, August 3 2002
    Christophe GRENIER <grenier@cgsecurity.org>
    http://www.cgsecurity.org

    Disk /dev/hda - CHS 24321 255 63 - 190779 MB
    Check current partition structure

    get_MBR_data:
    Partition sector doesn't have the endmark 0xAA55
    Run "MBR code" in TestDisk to correct it
    I don't know what this means.

    I press [tt]enter[/tt]. I get the following screen:

    TestDisk 4.2, Data Recovery Utility, August 3 2002
    Christophe GRENIER <grenier@cgsecurity.org>
    http://www.cgsecurity.org

    Disk /dev/hda - CHS 24321 255 63 - 190779 MB
    Use arrow keys to change partition characteristics (see below)
    Press the ENTER key to continue
    Partition Start End Size
    * FAT32 0 1 1 670 254 63 10779552
    L Linux ext2fs 671 1 1 1434 254 63 12273597
    L Linux Swap 1435 1 1 1497 254 63 1012032
    L Linux ext2fs 1498 1 1 24320 254 63 366651432
    I have no idea about those numbers, but it looks like the partitions are there. It may just be the partition table is corrupted for whatever reason, but it may be able to reconstruct the table.

    And maybe one of these days I'll learn my lesson about backing my fraging data up more than just once a month (Well, actually, I do back up my data frequently -- to my school account. But, believe it or not, my school account expired today! At 6:00 AM PDT, so I moved all that data to my local drive just yesterday. Can you believe that?)

    But spirits are high. I'm going to have to read the utility's docs before I proceed lest I accidentally overwrite the data.

  7. #7

    Re:Partitions are all gone.

    Good luck! Let us know how it works!!

  8. #8
    Senior Member
    Join Date
    Jul 2001
    Posts
    280

    Re:Partitions are all gone.

    I tried to run the [tt]MBR Code[/tt] functionality, but that didn't work, and it only screwed things up more, though I think it's still fixable.

    I ran the analyze functionality, and wrote the changes to disk:

    Disk /dev/hda - CHS 24321 255 63 - 190779 MB
    Check current partition structure
    Partition Start End Size
    1 * FAT32 0 1 1 670 254 63 10779552
    2 E extended LBA 671 0 1 24320 254 63 379937250
    5 L Linux ext2fs 671 1 1 1434 254 63 12273597
    X extended 1435 0 1 1497 254 63 1012095
    6 L Linux Swap 1435 1 1 1497 254 63 1012032
    X extended 1498 0 1 24320 254 63 366651495
    7 L Linux ext2fs 1498 1 1 24320 254 63 366651432
    I'm going to reboot again and see if this worked.

  9. #9
    Senior Member
    Join Date
    Jul 2001
    Posts
    280

    Re:Partitions are all gone.

    Well, guess who's posting from his very own Linux installation once again? You guessed it.

    That testdisk program worked like a charm. It rewrote the MBR (I guess) so I could mount the drives in Knoppix and back up the data (just in case). Then I reinstalled LILO and here I am again.

    On a semi-related note:

    I haven't been real impressed with EXT3. It has no undelete capability. It doesn't fail well when the power goes out (which happens frequently in my 3rd world country). It takes forever to run a fsck.

    How's reiserfs? Is it any better? Maybe I'll reformat with that fs instead.

  10. #10

    Re:Partitions are all gone.

    Glad to hear you got it to work.

    I have had 2 bad experiences with ReiserFS. Both times, I lost a LOt of data because a friend kept pressing the power button to turn off my headless server. Never had a chance to recover the data.
    Haven't had any issues with Ext3 yet.

Similar Threads

  1. PC Primary Partitions
    By roche in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 09-16-2006, 01:59 AM
  2. No room on HD/ need partitions?
    By gmoncrief in forum Linux - General Topics
    Replies: 1
    Last Post: 12-27-2004, 06:50 PM
  3. Resizing Partitions
    By ece30675 in forum Linux - General Topics
    Replies: 5
    Last Post: 12-19-2004, 06:49 PM
  4. Problem recognizing partitions
    By stodgel in forum Windows - General Topics
    Replies: 16
    Last Post: 07-24-2002, 09:33 PM
  5. PM 7 destroyed my partitions...now what?
    By mope in forum Linux - Hardware, Networking & Security
    Replies: 4
    Last Post: 06-04-2002, 01:10 AM

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
  •