2

During the Windows 10 update I ran into the problem where windows 10 update breaks grub. When attempting the top answer, the ls command returned unknown file system for each hard drive listed, the same problem as described here: Using testdisk for windows 10 upgrade

I booted into Ubuntu with a thumbdrive, ran test-disk which came back with no problems, and then I ran boot-repair which claimed to successfully fix any problems. Windows 10 finished updating but now there is no option to boot into Ubuntu. As far as I can tell Ubuntu has been completely erased from the system. According to disk management there are 2 small unnamed drives but I reserved a lot more space for Ubuntu when I originally partitioned for the dual boot. I'm not worried about any info lost, everything important is in Dropbox.

I would like to know if windows really did erase Ubuntu and if yes is it safe to reinstall? If it didn't erase Ubuntu how do I clean up my computer and get Ubuntu working again, I don't mind reinstalling and creating a fresh partition I just want a "clean" system. Disk Management

EDIT I booted from a live usb and ran gparted as suggested. I got this error message:

 /dev/sdb contains GPT signatures, indicating that it has a GPT table.  
 However, it does not have a valid fake msdos partition table, as it    should.  
 Perhaps it was corrupted -- possibly by a program that doesn't understand GPT 
 partition tables.  Or perhaps you deleted the GPT table, and are now using an 
 msdos partition table.  Is this a GPT partition table?

I just clicked the red x to close the error message and this is what gparted shows: gparted table

It looks as though there is a small amount of unallocated space and a small amount of space left over from Ubuntu. I'd like to clean up these partitions before reinstalling ubuntu. Is it safe to just merge the unallocated space into my main windows disk and also reformat the leftover linux partitions, absorb them into the windows partition and then reinstall?

Basically I don't want make sure everything is cleaned up before reinstalling linux, I don't like having all these small fragements but I don't know what I'm doing really.

3 Answers3

2

I certainly don't see any partitions that would be large enough for Ubuntu and which Windows doesn't recognize. This is honestly the first time I've seen Windows remove Ubuntu like that.

It should be safe to reinstall. Just format that free space as ext4 in the installer and install to it. That deletion should not happen again. I have a suspicion that TestDisk is the cause.

TheWanderer
  • 19,395
  • 12
  • 50
  • 65
  • Thanks for the answer, I'll give it a shot. Do you know what the two small unnamed partitions are? They only account for 8.5 gbs but it would be nice to reclaim that space if they aren't needed. Is it possible these are remnants from the old Ubuntu system? – Michael Vaiana Mar 20 '16 at 23:57
  • Probably. They're completely empty. – TheWanderer Mar 21 '16 at 00:09
  • 1
    @Zacharee1 This is gift from windows anniversary update to include ubuntu bash and remove existing ubuntu if done online....this is huge problem running over internet since update rolled out. – minigeek Oct 02 '16 at 04:49
1

I am not 100% sure but we have here a MBR style disk.

The two unnamed partitions are recovery partitions. Don't delete them.

The small unnamed partition is what Windows 10 creates always on installation/upgrade - it holds Windows PE recovery.

The unnamed ~8 GB partition should be factory Recovery - holds a complete image of your system as it was delivered.

The 116 GB "free space" is where Linux is. Windows does not recognize it.

Windows always rewrites MBR on major updates/upgrades just to be sure that it is in control of the booting! THIS WAS ALWAYS THE CASE so no surprise.

Reinstalling GRUB to MBR should do the trick. Use a Linux live CD/DVD/USB and reinstall GRUB - How to Repair, Restore, or Reinstall Grub 2 with a Ubuntu Live CD or USB

snayob
  • 437
  • 3
  • 7
0

It's unclear from your information whether you're booting in BIOS/CSM/legacy mode or in EFI/UEFI mode. If the former, be aware that the built-in Windows partitioning software is dangerously broken, and has been for years. Specifically, it doesn't handle extended and logical partitions properly, which can result in partitions being deleted or changed in ways that violate the MBR partitioning standards.

If this is the problem you've run into, TestDisk might be able to recover your Linux partition(s). (Yes, I know you say you've tried it, but you may have missed a recovery option in your first attempt, so it's worth going back and trying again, perhaps following the official documentation rather than somebody else's instructions.) If you can recover a Linux partition in this way, you'll probably have to re-install GRUB to get it all working again.

All that said, I'd like to reiterate how I began: It's unclear how you're booting. If you're booting in EFI/UEFI mode, as may well be the case, then your disk probably uses the GUID Partition Table (GPT), which the Windows partitioning software handles much better than it handles the old Master Boot Record (MBR) system, so my hypothesis is almost certainly wrong in this case. You can determine the partition table type, and therefore the probable Windows boot mode, with parted from an Ubuntu emergency boot:

$ sudo parted /dev/sda print | grep Table
Partition Table: gpt

This example shows a GPT disk. An MBR disk would show up as having a partition table of msdos.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105