Announcement

Collapse
No announcement yet.

Help with HDD. Is it a Partitioning Problem?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • technomancer
    replied
    Thank you! I started looking through your links, and I really don't understand what they mean for me. But I shall continue. In the meantime, I will share the recovery utilities I found in TestDisk, as well as the Protective MBR table for my broken HDD:

    Here is the "Write MBR code on First Sector""
    Click image for larger version

Name:	WriteMBRCode.png
Views:	1
Size:	21.1 KB
ID:	642975

    Click image for larger version

Name:	WriteYN.png
Views:	1
Size:	12.3 KB
ID:	642976

    Also, the "Advanced File System Utilities (with a create image option):

    Click image for larger version

Name:	AdvFileSysUt.png
Views:	1
Size:	18.1 KB
ID:	642977


    And lastly (for now), my Protective MBR:

    Code:
    00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|1+0 records in
    1+0 records out
    *
    512 bytes (512 B) copied000001b0  00 00 00 00 00 00 00 00  f3 b6 56 39 00 00 00 00  |..........V9....|
    000001c0  01 00 ee fe ff ff 01 00  00 00 2f 60 38 3a 00 00  |........../`8:..|
    000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    , 0.0243357 s, 21.0 kB/s
    *
    000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
    00000200
    Also, my broken HDD dualboots Windows 8 and Linux, not Windows 7 and Linux.

    Thank you! I'm off to my reading list.

    TM

    Leave a comment:


  • Qqmike
    replied
    So here's my protective MBR (on my GPT disk):

    Code:
     sudo dd if=/dev/sda bs=512 count=1 | hexdump -C
    1+0 records in
    1+0 records out
    512 bytes (512 B) copied00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    , 4.1052e-05 s, 12.5 MB/s
    *
    000001c0  01 00 ee fe ff ff 01 00  00 00 2f 60 38 3a 00 00  |........../`8:..|
    000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
    00000200
    The asterisks indicate zeros. Thus, there is very little non-zero entry in my protective MBR.

    As Starman explains, Windows 7/8 has its own version of the protective MBR, and he points out the differences. I think if you study his example, you can put your finger on the entry for the damaged MBR sector your TestDisk error message refers to. You can't fix that, but maybe TestDisk can 'fix the MBR' for you -- that is the $64,001 question.

    If you have a GPT, it has a Protective MBR--its first 512 bytes, or Sector 0. The entries explained by Starman, are there partly to fool partitioning tools that are NOT GPT aware: it tells them that there is only one partition on the disk and it is basically FULL--so go away, don't try to write anything in this MBR or on this disk.

    The protective MBR has another purpose, also. If you wish to use your UEFI firmware to boot this disk by Legacy method (using CSM--and NOT using the ESP with UEFI), this MBR is used along with another Bios Boot Partition of 1 MB created somewhere on the GPT disk -- so a bootloader like GRUB can install itself to the MBR + the Bios Boot Partition.

    Don't get too involved in this right now. But perhaps TestDisk can repair the MBR if, in fact, it is broken. But ... why would it be broken all of a sudden? It happens, though, but infrequently. Perhaps some corruption crept in [to just a sector or so]? Just remember, when you use a program like TestDisk, I think it is safe, BUT as the site says, there are risks of messing up part of or even the entire show.

    Leave a comment:


  • Qqmike
    replied
    starman addresses some of the terminology you see in TestDisk.

    From my how-to, a summary of the GPT layout:
    GPT -- GUID Partition Table
    Get a good start on this, get a good picture in your mind. In quick summary, the structure of the GPT setup is as follows (and for a graphic, see https://en.wikipedia.org/wiki/GUID_Partition_Table ) :

    Protective MBR -- 512 bytes (used for BIOS/CSM/legacy-mode+MBR compatibility)
    Partition Table Header -- 512 bytes
    The Partition Table entries (128 of them are available in this setup, each has 128 bytes).
    The actual partitions (those listed in the Partition Table entries)
    The end-of-disk backup to the Partition Table
    The end-of-disk backup to the Partition Table Header called the Secondary Partition Table Header
    All GPT partitions are at same the level of a primary partition, though not called primary; GPT does away with the primary vs logical partition distinction.
    -- and see what follows below for the ESP and the Bios Boot Partition --
    https://www.kubuntuforums.net/showth...l=1#post373198

    You can have a look at your MBR or protective MBR (first 512 bytes on your disk, whether it is MBR or GPT):
    Code:
    sudo dd if=/dev/sda bs=512 count=1 | hexdump -C
    where sda is the drive you are exploring; replace it with your sdx (perhaps as seen from a live DVD Konsole).

    You might play around with this, on your own , but except for that cryptic message from TestDisk re a damaged sector (relative, I believe), I'm not sure what you have to fix here. Maybe that sector IS damaged! Would that cause all this? Starman tells you what that relative sector is, if you read carefully. Starman does neat work, I learned a lot from him doing GRUB Legacy with MBR, I hope he finishes that page I linked to above.

    Leave a comment:


  • Qqmike
    replied
    Time to check in with the happyassassin, Adam W, here:
    https://www.happyassassin.net/2014/0...lly-work-then/

    The picture I have, more or less:
    This laptop came with Windows 7, with UEFI firmware for UEFI booting, and the HDD was partitioned GPT.
    Either Windows did it or it was done later when you set up a dual-boot with Windows: The booting is (now) setup as UEFI booting a GPT in the legacy-CSM mode. I didn't read starman's article I gave you the link to, but that's basically what it says, with details. I doubt that it is broken. If it were broken, you'd need a utility that could fix it. You might email Christophe GRENIER (@TestDisk) and ask him. Maybe gdisik could, that would require a little research (and maybe an email to Rod Smith). This is also why GParted doesn't see it all -- perhaps it sees only one big partition, or none at all.

    Leave a comment:


  • Qqmike
    replied
    EE : --
    Indicates a GPT Protective MBR followed by a GPT/EFI Header. Used to define a fake partition covering the entire disk.
    (credit: Starman)

    => I thought so. The other reference I copied (way above somewhere) said about the same thing about ee types.

    http://thestarman.pcministry.com/asm/mbr/GPT.htm

    That's why it looks like only one partition. BUT ... if it is used as a GPT, gdisk should know it and print it. Looks like it is used as the "protective MBR," and booting is by Legacy-CSM.

    There is probably nothing broken about this partition table structure.

    Leave a comment:


  • Qqmike
    replied
    It won't play. => troubleshooting guide for network admins!

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

    Problem is, as we've said, you have to know your partition table structure.

    Leave a comment:


  • technomancer
    replied
    Originally posted by Qqmike View Post
    I've used TestDisk only on a few occasions spread over many years, and am not recalling some things. It identifies what it thinks is that 'bad sector' problem -- do you see an option offered by TestDisk to fix this under its repair facility?
    Here's a video of what I see in TestDisk:

    https://drive.google.com/file/d/0B9H...ew?usp=sharing

    Leave a comment:


  • Qqmike
    replied
    http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

    Leave a comment:


  • Qqmike
    replied
    If, in fact you have a GPT and not an MBR, but you tell TestDisk you have GPT, then it probably will detect something wrong with your GPT (bad sector, not bootable, etc.). But I think you may have an MBR. IF you had GPT, then why doesn't gdisk show it to us?

    Leave a comment:


  • Qqmike
    replied
    I've used TestDisk only on a few occasions spread over many years, and am not recalling some things. It identifies what it thinks is that 'bad sector' problem -- do you see an option offered by TestDisk to fix this under its repair facility?

    Leave a comment:


  • Qqmike
    replied
    From Post #42,

    I think TestDisk gave a brief message, like "bad sector." Though SMART didn't detect what we think of as bad sectors in the hardware. Just wondering if there is a "bad sector" (hardware or software-wise), if that is up front, like at the MBR, that would throw things off. Again, who knows.

    Leave a comment:


  • Qqmike
    replied
    Does that help at all?
    Yes, it helps me to be even more confused. I had concluded that the bad HDD was using a MBR, not a GPT -- gdisk says there is no GPT. But then this EFI-GPT stuff pops up again. Btw, in a GPT, ALL partitions are primary. None are bootable. BUT, in EFI booting, one GPT partition is special, the EFI System Partition -- the ESP. It is small, 100-500 MB, FAT32, and may have a "boot" flag on it or type EF00 (a "boot" flag does not mean the same thing as"bootable" as we are used to with MBR; it is only a flag to indicate type EF00 or ESP). I was hoping to see all this when you ran sudo gdisk -l /de/sdx, where sdx = the bad HDD. You may have some sort of hybrid MBR-GPT, I'm not sure.

    See Post #39, for example.

    GPT: https://en.wikipedia.org/wiki/GUID_Partition_Table

    Leave a comment:


  • technomancer
    replied
    [QUOTE=Qqmike;376690]

    So, then, your "bad" laptop DOES boot up OK to live CD when the suspect HDD is not plugged into it?

    /QUOTE]

    Yes, I put it back together in Post # 44. It will also boot up when the Suspect HDD is plugged into it, so long as I direct the computer to boot from my DVD drive.

    And TestDisk did not show some major broken problem that it offered to fix, right?; except it did indicate the bad sector MBR in your first post #1.
    Yes. I also notice that TestDisk does not list a partition as "Primary Bootable" (this time, the bad HDD is listed as sda):

    For Intel:
    Click image for larger version

Name:	Intel Part Table-first.png
Views:	1
Size:	17.0 KB
ID:	642967

    Click image for larger version

Name:	Intel Part Table.png
Views:	1
Size:	33.2 KB
ID:	642968

    For "EFI GPT"
    Click image for larger version

Name:	EFI GPT Part Table-first1.png
Views:	1
Size:	16.1 KB
ID:	642969

    The EFI GPT table lists all of the partitions as "Primary:"
    Click image for larger version

Name:	EFI GPT Part Table.png
Views:	1
Size:	30.6 KB
ID:	642970


    Does that help at all?

    Thanks,
    TM

    Leave a comment:


  • Qqmike
    replied
    If GParted doesn't recognize a filesystem or some other show-stopping feature of a drive, it lists that questionable space as "unallocated." It doesn't mean there is a problem with the drive, though. Wouldn't you know it: GParted Features is temporarily off-line! so I can't link to it so we could look at it (a table of capabilities). http://gparted-livecd.tuxfamily.org/features.php

    TestDisk recovered tables AND the data
    And TestDisk did not show some major broken problem that it offered to fix, right?; except it did indicate the bad sector MBR in your first post #1.

    So, then, your "bad" laptop DOES boot up OK to live CD when the suspect HDD is not plugged into it?

    Fixed:
    http://gparted.sourceforge.net/features.php

    Leave a comment:


  • technomancer
    replied
    -- fix what, exactly?
    I could be wrong (quite likely), but seems that the partition tables are missing from the broken HDD. I mean, when I open the HDD in a partition manager, all it says is that it is "unalocatted space," with an exclamation point for an error. However, something like TestDisk recovered tables AND the data. Am I mistaken?

    The problem is: if you replace the bad HDD into the bad laptop and boot up, there's an issue, right? Even though the bad laptop seems to boot OK without the bad HDD in it.
    Correct, there is an issue. Neither computer will boot from the bad HDD. Even if I boot from another version of Windows (like on my spare laptop), Windows Explorer will not recognize the broken HDD. It won't appear in My Computer, and therefore can't be navigated either. It does, however, appear in the "Safely Remove Hardware" utility in the lower right corner.

    Thank you again,
    TM

    Leave a comment:

Users Viewing This Topic

Collapse

There are 0 users viewing this topic.

Working...
X