Page 2 of 7 FirstFirst 1234 ... LastLast
Results 11 to 20 of 61

Thread: GPT messed up, cant boot or access harddrive

  1. #11
    Join Date
    Jan 2014
    Beans
    45
    Distro
    Ubuntu

    Re: GPT messed up, cant boot or access harddrive

    Yes, there was one ~50-70gb ntfs partition with windows on it

  2. #12
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: GPT messed up, cant boot or access harddrive

    Would you post the output of
    Code:
    swapon -s
    and then turn swap off
    Code:
    sudo swapoff -a
    I am reading through this: https://help.ubuntu.com/community/DataRecovery

    I am trying to figure out how to find the linux root partition. We can mount the /boot partition and see files there, such as Grub files, but I'm not sure it contains info about where the root partition actually is, although grub.cfg will tell us the original partition number and block ID. I haven't used testdisk much myself; I'm surprised it hasn't found the linux root partition.
    ASRock P67 Extreme6, Intel i5 2500K, 8GB RAM, nVidia 6600GT, 4x1TB RAID1+0

  3. #13
    Join Date
    Jan 2014
    Beans
    45
    Distro
    Ubuntu

    Re: GPT messed up, cant boot or access harddrive

    Code:
    Filename                Type        Size    Used    Priority
    Not very much.

  4. #14
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: GPT messed up, cant boot or access harddrive

    I think these are potentially real partitions, although not all of them as some overlap!

    Code:
    GPT      start       end       sectors       size         usage        
    1        2048      206847        204800     100.00 MiB     EFI
    2      280582     1304581       1024000     500.00 MiB   linux /boot        
    4       68992   118786047     118317056      56.42 GiB
          1661111    35215804      33554694      16.00 GiB
    5    35215801    68770494      33554694      16.00 GiB   linux swap
    6    76255608    98624495      22368888      10.67 GiB
        123668478   250068989     126400512      60.27 GiB
    13  118786047   237103102     118317056      56.42 GiB
        186845208   313503895     126658688      60.40 GiB
    I'd like to scan the starting sectors of some of them to see if an ext4 signature is present. Just need to remember how to do that.
    ASRock P67 Extreme6, Intel i5 2500K, 8GB RAM, nVidia 6600GT, 4x1TB RAID1+0

  5. #15
    Join Date
    Jan 2014
    Beans
    45
    Distro
    Ubuntu

    Re: GPT messed up, cant boot or access harddrive

    I think I read something about dd and hexdump. Would only need to know how the starting sectors look like

  6. #16
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: GPT messed up, cant boot or access harddrive

    Ok, try this. This will show the byte values on the disk for 2048 bytes starting at the given sector. For example, for start sector 76255608:
    Code:
    sudo dd if=/dev/sda skip=76255608 bs=512 count=4 | hexdump -C
    Then look at the row starting 00000430 and across to the 9th column of bytes to see "53 ef" which is the ext4 superblock signature.
    See if any of the candidate partitions have this signature.

    The output will look like this:
    Code:
    00000000  eb 63 90 00 00 00 00 00  00 00 00 00 00 00 00 00  |.c..............|
    00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    4+0 records in
    4+0 records out
    *
    00000050  00 00 00 00 00 00 00 00  00 00 00 80 d8 08 4d 0a  |..............M.|
    2048 bytes (2.0 kB) copied00000060  00 00 00 00 ff fa 90 90  f6 c2 80 74 05 f6 c2 70  |...........t...p|
    00000070  74 02 b2 80 ea 79 7c 00  00 31 c0 8e d8 8e d0 bc  |t....y|..1......|
    , 8.3386e-05 s, 24.6 MB/s
    00000080  00 20 fb a0 64 7c 3c ff  74 02 88 c2 52 bb 17 04  |. ..d|<.t...R...|
    00000090  80 27 03 74 06 be 88 7d  e8 17 01 be 05 7c b4 41  |.'.t...}.....|.A|
    000000a0  bb aa 55 cd 13 5a 52 72  3d 81 fb 55 aa 75 37 83  |..U..ZRr=..U.u7.|
    000000b0  e1 01 74 32 31 c0 89 44  04 40 88 44 ff 89 44 02  |..t21..D.@.D..D.|
    000000c0  c7 04 10 00 66 8b 1e 5c  7c 66 89 5c 08 66 8b 1e  |....f..\|f.\.f..|
    000000d0  60 7c 66 89 5c 0c c7 44  06 00 70 b4 42 cd 13 72  |`|f.\..D..p.B..r|
    000000e0  05 bb 00 70 eb 76 b4 08  cd 13 73 0d f6 c2 80 0f  |...p.v....s.....|
    000000f0  84 d0 00 be 93 7d e9 82  00 66 0f b6 c6 88 64 ff  |.....}...f....d.|
    00000100  40 66 89 44 04 0f b6 d1  c1 e2 02 88 e8 88 f4 40  |@f.D...........@|
    00000110  89 44 08 0f b6 c2 c0 e8  02 66 89 04 66 a1 60 7c  |.D.......f..f.`||
    00000120  66 09 c0 75 4e 66 a1 5c  7c 66 31 d2 66 f7 34 88  |f..uNf.\|f1.f.4.|
    00000130  d1 31 d2 66 f7 74 04 3b  44 08 7d 37 fe c1 88 c5  |.1.f.t.;D.}7....|
    00000140  30 c0 c1 e8 02 08 c1 88  d0 5a 88 c6 bb 00 70 8e  |0........Z....p.|
    00000150  c3 31 db b8 01 02 cd 13  72 1e 8c c3 60 1e b9 00  |.1......r...`...|
    00000160  01 8e db 31 f6 bf 00 80  8e c6 fc f3 a5 1f 61 ff  |...1..........a.|
    00000170  26 5a 7c be 8e 7d eb 03  be 9d 7d e8 34 00 be a2  |&Z|..}....}.4...|
    00000180  7d e8 2e 00 cd 18 eb fe  47 52 55 42 20 00 47 65  |}.......GRUB .Ge|
    00000190  6f 6d 00 48 61 72 64 20  44 69 73 6b 00 52 65 61  |om.Hard Disk.Rea|
    000001a0  64 00 20 45 72 72 6f 72  0d 0a 00 bb 01 00 b4 0e  |d. Error........|
    000001b0  cd 10 ac 3c 00 75 f4 c3  00 00 00 00 00 00 00 00  |...<.u..........|
    000001c0  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  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    00000400  00 00 28 00 00 ff 9f 00  f3 ff 07 00 eb d3 74 00  |..(...........t.|
    00000410  59 04 1a 00 00 00 00 00  02 00 00 00 02 00 00 00  |Y...............|
    00000420  00 80 00 00 00 80 00 00  00 20 00 00 81 ef c7 52  |......... .....R|
    00000430  cd fa 72 50 cb 01 ff ff  53 ef 01 00 01 00 00 00  |..rP....S.......|
    00000440  a2 f3 72 50 00 00 00 00  00 00 00 00 01 00 00 00  |..rP............|
    00000450  00 00 00 00 0b 00 00 00  00 01 00 00 3c 00 00 00  |............<...|
    00000460  46 02 00 00 7b 00 00 00  26 15 0e 59 f5 75 42 ef  |F...{...&..Y.uB.|
    00000470  ae 64 3b 90 5a ca 96 a0  55 62 75 6e 74 75 00 00  |.d;.Z...Ubuntu..|
    00000480  00 00 00 00 00 00 00 00  2f 00 6e 74 00 00 00 00  |......../.nt....|
    00000490  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    000004c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 fd 03  |................|
    000004d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    000004e0  08 00 00 00 00 00 00 00  5f 82 1c 00 a0 c2 d6 e9  |........_.......|
    000004f0  e6 cf 4e c3 b9 76 f0 4a  f1 25 46 df 01 01 00 00  |..N..v.J.%F.....|
    00000500  0c 00 00 00 00 00 00 00  a2 f3 72 50 0a f3 02 00  |..........rP....|
    00000510  04 00 00 00 00 00 00 00  00 00 00 00 ff 7f 00 00  |................|
    00000520  00 80 48 00 ff 7f 00 00  01 00 00 00 ff ff 48 00  |..H...........H.|
    00000530  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    00000540  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 08  |................|
    00000550  00 00 00 00 00 00 00 00  00 00 00 00 1c 00 1c 00  |................|
    00000560  01 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    00000570  00 00 00 00 04 00 00 00  06 41 82 10 00 00 00 00  |.........A......|
    00000580  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    00000800
    ASRock P67 Extreme6, Intel i5 2500K, 8GB RAM, nVidia 6600GT, 4x1TB RAID1+0

  7. #17
    Join Date
    Jan 2014
    Beans
    45
    Distro
    Ubuntu

    Re: GPT messed up, cant boot or access harddrive

    Code:
    GPT      start       end       sectors       size         usage        
    1        2048      206847        204800     100.00 MiB     EFI
    2      280582     1304581       1024000     500.00 MiB   linux /boot        
    4       68992   118786047     118317056      56.42 GiB
          1661111    35215804      33554694      16.00 GiB
    5    35215801    68770494      33554694      16.00 GiB   linux swap
    6    76255608    98624495      22368888      10.67 GiB
        123668478   250068989     126400512      60.27 GiB
    13  118786047   237103102     118317056      56.42 GiB
        186845208   313503895     126658688      60.40 GiB
    combined it with grep to find it faster

    Code:
    Start                                        contains "53 ef"
    2048                                        no
    280582                                 yes at 00000430 9th column
    68992                                    no
    1661111                            no
    35215801                        no
    76255608                        no
    123668478                     no
    118786047                    yes at 00000630 9th column
    186845208                   yes at 00000430 9th column

  8. #18
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: GPT messed up, cant boot or access harddrive

    Good. It is likely that either 118786048 or 186845208 are starts of usable linux ext4 partitions. Not sure why the former was 1 sector out in the GPT partition table. Anyhow, we can proceed to rebuild the MBR and then try to mount the candidate partitions.

    First, output the existing MBR partition table and store it in a text file called "mbrtable" or whatever you like to call it:
    Code:
    sudo sfdisk -d /dev/sda > mbrtable
    You can open this in gedit to change the sector numbers.
    I'll post what the edited table should look like in a few moments...
    ASRock P67 Extreme6, Intel i5 2500K, 8GB RAM, nVidia 6600GT, 4x1TB RAID1+0

  9. #19
    Join Date
    Jan 2014
    Beans
    45
    Distro
    Ubuntu

    Re: GPT messed up, cant boot or access harddrive

    Just to remember you, I'm using a GPT. I know there are things mixed up, but I know, that I created a GPT table before I installed Windows and Ubuntu 18 month ago.

    Code:
    ubuntu@ubuntu:~$ sudo sfdisk -d /dev/sda > partitiontable
    
    WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util sfdisk doesn't support GPT. Use GNU Parted.

  10. #20
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: GPT messed up, cant boot or access harddrive

    Oh yes. Delete the GPT header first.
    Code:
    sudo dd if=/dev/zero bs=512 count=1 seek=1 of=/dev/sda
    ASRock P67 Extreme6, Intel i5 2500K, 8GB RAM, nVidia 6600GT, 4x1TB RAID1+0

Page 2 of 7 FirstFirst 1234 ... LastLast

Tags for this Thread

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
  •