1

I am in the midst of trying testdisk to recover a borked dual boot system, and have a specific question to testdisk .. it seems it doesn't like any combos I enter of Primary & Logical labeling.. and I do not get any option to label any of my partitions extended.. any ideas why?

TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 256 GB / 238 GiB - CHS 31130 255 63
 Partition               Start        End    Size in sectors
 D HPFS - NTFS              0  32 33    63 221 30    1024000
 D HPFS - NTFS             63 221 31 21274 119 29  340748288
 D HPFS - NTFS          21274 119 30 21399 102 15    2007040
 D Linux                21399 134 48 28078 210 36  107302912
 D Linux Swap           28078 210 37 31130 223  5   49031168

I know Windows can be my Primary.. so I set the following to P, but then the only good combo after that is to set Linux to Logical and Delete my Swap

are there any combinations that can just get me back into Windows or Linux.. if I cannot crack fixing my dualboot?

 Disk /dev/sda - 256 GB / 238 GiB - CHS 31130 255 63
  Partition               Start        End    Size in sectors
  P HPFS - NTFS              0  32 33    63 221 30    1024000
  P HPFS - NTFS             63 221 31 21274 119 29  340748288
  P HPFS - NTFS          21274 119 30 21399 102 15    2007040
  L Linux                21399 134 48 28078 210 36  107302912
 >L Linux Swap           28078 210 37 31130 223  5   49031168

Structure: Bad. 

Output from command suggested

label: dos
label-id: 0x4a2fec4f
device: /dev/sda
unit: sectors

/dev/sda1 : start=        2048, size=     1024000, type=7, bootable
/dev/sda2 : start=     1026048, size=   340748126, type=7
/dev/sda3 : start=   341774336, size=     2007040, type=27
/dev/sda4 : start=   343783422, size=   156334082, type=5
/dev/sda5 : start=   451086336, size=    49031168, type=82
Erik
  • 260
  • 1
  • 6
  • 24
  • 1
    First things first when attempting data recovery: I recommend that you use dd to image your internal HDD to an external one, and then attempt the recovery on the external one. That way, if you screw anything up, you can always re-image from your internal drive. – You'reAGitForNotUsingGit Sep 19 '17 at 14:21
  • 1
    It should automatically create the extended partition that would be all the logical partitions which must be adjacent. Your last screen looks correct, but I cannot easily tell with testdisk's CHS. backup partition table before any changes, so you can get back to current if changes not correct sudo sfdisk -d /dev/sda > PT_sda.txt If the only way to get it to work is to delete swap I might do that as swap is easy to add, but you have to update fstab with new UUID. – oldfred Sep 19 '17 at 15:22
  • 1
    If using parted rescue your missing partition starts one or two sectors after the start of the extended and some sectors before the start of the swap partition. Parted rescue seems easier than testdisk http://askubuntu.com/questions/665445/upgraded-to-windows-10-on-dual-boot-and-cant-boot-to-ubuntu-partition/665462 – oldfred Sep 19 '17 at 16:28
  • @oldfred I think I fixed it all, I essentially chose to erase the ramdisk aka swap... everything booted in again.. I reinstalled the ramdisk upon reboot, and then had to reinstall grub. IT WORKS!! – Erik Sep 20 '17 at 17:30
  • 1
    Whatever way works is always good. – oldfred Sep 20 '17 at 18:54

0 Answers0