6

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 <grenier@cgsecurity.org>
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.

  • Use sudo testdisk and make your disk selection from the menu. – heynnema Feb 6 '17 at 15:34
  • 2
    Possible duplicate of Recover EXT4 partition – karel Feb 6 '17 at 16:09
  • There's no Ubuntu installation on your drive. You can try a recovery to salvage any lost data but you won't be able to salvage the lost Ubuntu installation. Recover your data and reinstall Ubuntu. – David Foerster Feb 6 '17 at 19:06
9

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.

| improve this answer | |
  • @heynnema is right, testdisk would be the way to go for this. But be careful, if you have important data to recover, I would recomend using DD to copy the drive to a seperate .iso file you can recover from if you ever mess up recovering it. – Derek Lesho Feb 6 '17 at 14:46
  • Similar issues & testdisk or parted rescue to resolve. askubuntu.com/questions/654386/… and: askubuntu.com/questions/665445/… – oldfred Feb 6 '17 at 15:28
  • 3
    "bug" sure yeah – ecc Feb 6 '17 at 17:33
  • I was hit with this bug a few months back, although I was able to use some Grub repair tool I found to fix it. – Pheonix Feb 7 '17 at 4:17
  • Bug... or feature ? – Henrique de Sousa Feb 12 at 16:12
0

This may not solve your immediate problem but from the standpoint of implementing a more robust configuration going forward, I recommend most highly running Windows as a virtual machine (using VMware Workstation/Player, Virtualbox, KVM, or whatever) with Ubuntu as the native/host operating system, instead of dual booting, for several reasons:

  • Windows can be heedless of its environment and resists configuration, as you have discovered.
  • Virtualization defines Windows' environment and so requires it to operate within those boundaries.
  • Linux is entirely configurable, impenetrable man pages notwithstanding.
  • Configuring a Windows virtual machine is less intensive than configuring dual-boot.
  • Dual-boot risks total system downtime and data loss, requiring days or weeks of intervention to overcome, whereas virtualization does not.
  • A VM can be backed up and restored with a copy/paste. So, a misbehaving Windows VM can be deleted and replaced in the time the host system requires to write the restored copy. Furthermore, a Windows VM need only be configured once before archiving, saving days of time picking through dozens of GUI configuration windows each time one must reinstall. Maintenance only requires opening the archived VM annually to update applications and Windows.
  • A VM runs simultaneously with its host, which saves time switching between operating systems.
  • A number of functions can be migrated to a Linux host from Windows.
  • Depending on how deeply one chooses to go, a Linux host also can be configured to provide print, file, dns, mail, web, media, ftp, vpn, and other services. In addition, a Linux host can be configured as a router for a LAN.

I expect others may have observations on this topic but I have found this approach to profoundly improve reliability and reduce downtime.

Good luck!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.