0

Windows 10 recently ran updates on my system and suddenly it lead to grub rescue. I have a dual-boot system with Ubuntu 16.04 installed.

When I do ls on the grub rescue prompt, I get the following:

(hd0)   (hd0,msdos5)   (hd0,msdos3)   (hd0,msdos2)   (hd0,msdos1)

Doing ls on each of the partitions gives me an unknown filesystem error.

When I do set, I get

cmdpath=(hd0)
prefix=(hd0,msdos6)/boot/grub
root=hd0,msdos6

How do I restore grub and get back both Ubuntu 16.04 and windows 10? I have some important data on my Ubuntu system (without backup, sadly).

UPDATE 1: Installed testdisk successfully. Following is the output of the analyze command:

Testdisk analyze output

How do I proceed to correctly set the grub path and restore/recover my Ubuntu partition ? Please reply.

UPDATE 2: Following is the output of the deep scan:

Deep Scan output

It says that 3 partitions (all Linux and having the same size) can't be recovered. I stumbled upon this link where the asker faced the same problem: Grub rescue after "Windows Anniversary Update"

Can I directly do what he has said: "After it (deep scan) was done I labeled the Windows launcher to *. (Primary bootable) I then named the rest P. (Primary) I opened grub rescue again, after saving the partition table, and ran ls."

Let me know. This issue is getting serious.

  • Please see my answer to this exact question at https://askubuntu.com/questions/957117/windows-10-major-update-wiped-grub-how-do-i-recover-partitions-properly/957142#957142 – heynnema Sep 24 '17 at 13:39
  • @heynnema I have updated the question with details of testdisk output. Please reply how to proceed. – pikaraider Sep 24 '17 at 15:44
  • Your Ubuntu partition was probably between partitions 4 & 5, probably starting at 12748/118/41, ending at 60294/81/11, or there-abouts. You'll have to follow the help file that I point out in my other answer. – heynnema Sep 24 '17 at 16:54
  • UPDATE 3: This is the current output of the analyze on testdisk:Testdisk analyze output after running deep scan - https://i.stack.imgur.com/Qu9je.png

    I see that this output is different from the output in UPDATE 1. Is there any information that can be used to recover my Linux partition ?

    – pikaraider Sep 24 '17 at 18:17
  • This is the updated testdisk result:

    https://i.imgur.com/xzM8CGA.png

    This output is different from the output in UPDATE 1. Please help.

    – pikaraider Sep 24 '17 at 18:25

1 Answers1

0

I notice you are missing (hd0,msdos4) and (hd0,msdos6). Were these your Ubuntu partitions?
There has been issue with win10 doing a major update and deleting linux partitions.

Boot from a LiveCD and select try ubuntu. If testdisk isn't installed, open a terminal and type
sudo apt-get install testdisk then sudo testdisk

scan for deleted partitions and add the ones that fit the holes between your partitions.

In most cases that is enough to get it to boot.

ravery
  • 6,874
  • I don't know which were Ubuntu partitions. How can I find out ? Also, could you detail the steps to use testdisk. How can I find it ? – pikaraider Sep 24 '17 at 12:25
  • @mahesh -- answer updated – ravery Sep 24 '17 at 12:32
  • can you please guide me ? I have updated my question with further outputs. I am stuck on this since too long. – pikaraider Sep 24 '17 at 20:51
  • @Mahesh -- add the two linux partitions and reboot – ravery Sep 24 '17 at 21:08
  • What will then happen to Windows OS ? Will I be able to access it still ?

    I am assuming you want me to add the two linux partitions shown in this image: https://i.imgur.com/xzM8CGA.png

    How do I do that ? Should I do that by selecting "Write" option at the bottom of the screen ?

    Sorry for such questions, but I want to be sure before taking any step.

    – pikaraider Sep 24 '17 at 21:11
  • yes write them, it won't do anything to windows – ravery Sep 24 '17 at 21:15
  • https://i.stack.imgur.com/Qu9je.png

    In this image, the NTFS partitions are marked with D (delete), so I am worried. What do the D's indicate here ?

    – pikaraider Sep 24 '17 at 21:17
  • those are old deleted partitions, you can not restore those because they will over write the new ones made by the update, just restore the two linux partitions – ravery Sep 24 '17 at 21:19
  • Thanks for the help. It solved my problem. However, whenever I shut down my system, it is again showing the grub rescue menu. How do I make the fix permanent ? – pikaraider Sep 25 '17 at 21:01
  • if you can get booted into your install. then update grub and initramfs. – ravery Sep 25 '17 at 21:03
  • I just did "sudo update-grub". Then shutdown and restarted. Same problem again.

    You mean, I have to boot using LiveCD ?

    – pikaraider Sep 25 '17 at 21:05
  • try this https://askubuntu.com/a/931327/694267. replace (hd0,1) with (hd0,6) and /sda1 with /sda6 – ravery Sep 25 '17 at 21:14