Windows 10 Update repartitioned my Ubuntu 16.04 drive

I am not sure what happened with recent (Feb 5, 2017) windows 10 update but my Ubuntu went on to grub update. Everything was working fine, and the system required a restart which I did but now the partition is lost from grub and nautilus side menu. On Grub Rescue Menu:

grub rescue > ls
(hd0), (hd0,msdos5), (hd0,msdos4), (hd0,msdos2), (hd0,msdos1)

as it is clear that one of the partitions is lost from the list. But still not giving up the hope, I tried grub rescue > ls (hd0,msdosX) for each partition including the missing number but no luck. Recurring error of unknown filesystem.

Learnt online that a LiveUSB can help solve the problem.

from live USB tried boot-repair from Ubuntu page but no luck.

I got the summary file and it shows unknown bootloader at /dev/sda3 which is my actual partition for Ubuntu. Here is the URL summary report It shows that there is existence of my partition but it is unknown.

Later I tried

sudo fdisk -l

and the resulting output was like this from liveUSB. Here I can see my partition. I thought I might me able to mount to it but I get this:

ubuntu@ubuntu:~$ sudo mount /dev/sda3 /mnt
NTFS signature is missing.
Failed to mount '/dev/sda3': Invalid argument
The device '/dev/sda3' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

Then I tried, to see if I can find more info on that particular partition, hence I tried

ubuntu@ubuntu:~$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME   FSTYPE     SIZE MOUNTPOINT LABEL
sda             596.2G            
├─sda1 ntfs     154.5G            
├─sda2 ntfs       833M            
├─sda3              1K            
├─sda4 ntfs     390.6G            Personal
└─sda5 swap         4G [SWAP]     
sdb              14.9G            
└─sdb1 vfat      14.9G /cdrom     UUI
sr0              1024M            
loop0  squashfs   1.4G /rofs

And it shows that my partition is only of 1K.

I tried to check the drive and this is the out

ubuntu@ubuntu:~$ sudo fsck /dev/sda3
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
fsck.ext2: Attempt to read block from filesystem resulted in short read while trying to open /dev/sda3
Could this be a zero-length partition?

Now I am stuck with no luck from google, and hence posting here. Is there any way of getting my drive back? Every help is appreciated as I am unable to log in to my windows partition as well.

update 1

Tried TestDisk. This is the output:

ubuntu@ubuntu:~$ sudo testdisk /dev/sda3
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <[email protected]>
http://www.cgsecurity.org

Unable to open file or device /dev/sda3: No such device or address

Update 2 Apparently, I was using testdisk wrong. Followed the steps from ubuntu live usb, and I got my partition back with only loss of Windows10 getting corrupt, which means I cannot use get back into windows10 but it is loading. From Grub Rescue, I faced a new error.

set prefix=(hd0,msdos3)
set root=(hd0,msdos3)
insmod normal
error: file '/grub/i386-pc/normal.mod' not found.

But this was solved as well by following this solution

Now, only one query remains, is it possible to repair windows10 without losing data in it and also retaining my Ubuntu Partition? As I am not willing to give up my Ubuntu at any cost because it being my only source of income.


Solution 1:

You've been hit with the Windows 10 Anniversary Update bug. It updates Windows 10, and wipes out Ubuntu (Linux) partitions.

Your sda3 partition in an "extended" partition that used to contain your Ubuntu partition.

You can try using testdisk to try and recover your missing partition. See http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step for information on how to use testdisk. You'll need to obtain a Ubuntu Live DVD/USB to run testdisk.