0

Had dual boot on an HP laptop. Ubuntu 14.04 and Windows 7.

Got stuck in the middle of my Windows 10 upgrade at grub rescue prompt.

Used boot-repair-disk to get past that point. Chose recommended repair.

This worked enough that Windows 10 was able to finish installing.

http://paste.ubuntu.com/15728790

After Windows 10 finished installing, I ran BRD again, hoping it would recognize and return my dual boot (grub2). Did not work.

Windows 10 was booting slowly, so I made one more run at it.

Chose recommended repair each time.

Did not help at this point. Still booting straight to Windows 10.

Next, I decided to see if my partition was even still there.

Ran Ubuntu installation disk to verify partition is still there.

It showed "free space" with a size of 284511 mb, where one of the partitions used to be (I think).

/dev/sda     
/dev/sda1 ntfs 104 MB    30 MB     Windows 7 (loader)    
/dev/sda2 ntfs 209112 MB unknown    
/dev/sda3 ntfs 497mb     408 MB     
free space          284511 MB     
/dev/sda5 swap

Then, I looked at the partitions in gparted. It lists sda4 where "free space" showed above:

/dev/sda4  extended 270.45 Gib

the sub menu for that item says, unallocated 264.97.

I installed gparted and tried to recover lost files, but it could not.

Ran testdisk, in hopes I can recover that partition:

enter image description here

When trying to recover lost data, it said:

No partition found or selected for recovery.

I think the data is still there, but am not sure how to proceed. Here's the Current partition structure according to testdisk.

1 * HPFS - NTFS
2 P HPFS - NTFS
3 P Windows RE (store)
4 E extended
5 L Linux Swap

Doing a "quick search" shows 5 deleted items:

D HPFS - NTFS
D HPFS - NTFS    
D HPFS - NTFS    
D Linux    
D Linux Swap

The fourth item down says "Linux" now, but did not say that until I pressed "enter" to continue, and had to put something there to get out of that next screen. It may have said "unallocated" or or been blank.

It appears to me that the data is all there, but I am not certain how to proceed.

It appears to me that...that is showing the deleted files/partitions from Windows 7 & Ubuntu.

I'd like to recover my Ubuntu partition, but it appears that the partitions no longer match up to the current partitions.

I considered running photorec just to get my images off and then maybe reinstalling Ubuntu, but it just seems quite a daunting task to understand how photorec works.

The most important thing is the images though.

I've read numerous posts and threads, but am not sure where to go from here.

suggestions?

muru
  • 197,895
  • 55
  • 485
  • 740
  • Usually testdisk works, some prefer parted rescue since you know approx start & end of partition. http://askubuntu.com/questions/654386/windows-10-upgrade-lead-into-grub-rescue/655080#655080 and: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 Apr 11 '16 at 03:31
  • Please don't add solved to the title - marking an answer as accepted is enough. – muru Apr 14 '16 at 15:24

1 Answers1

1

Thanks, oldfred. Testdisk ended up working.

In a nutshell, I looked at my deleted files (see image in OP) and changed the types for the Linux items marked "D" to "P" for both. Then, selected "write". (Thinking that would ADD those to the other partitions.)

After restarting, the computer said "grub rescue", same as when I was doing the Windows 10 installation. Installed the Boot-Repair-Disk, and it reinstalled my grub2 menu and recognized my Ubuntu partition, but no Windows to boot into.

Went back in with testdisk and changed the types on all of the deleted partitions, except Linux swap. The top one got an "*", the next 3 got a "P" and the Linux Swap kept the "D" (because of the rule that only 4 partitions can be marked as primary).

My thought was that the 3 top deleted items, must be my Windows 7 partitions and I'll take Windows 7 back over losing my Ubuntu partition.

Did a restart, inserted the Boot-Repair-Disk, ran "recommended repair", did a restart, and my grub was up and running with both Ubuntu and Windows, but it was Windows 10, instead of 7.

So, it all seems to be working again, but with an upgraded Windows.