[SOLVED]Windows10 Anniversary nuked my linux partition table

Windows 10 nuked my linux partition tables and I have a hell of a time getting them back. I managed to write another extended volume to the place where it was before and test disk restored the logical volume in place, but i still get the grub rescue on boot... Any thoughts?

--------EDIT--------
I solved the issue and here is the post with my solutions...

Windows will do that, and it has always done that. If you dual boot Windows and Linux, and use GRUB as your primary bootloader.. If you ever install a big update on Windows it will overwrite GRUB entirely and restore the Windows one.. Thus breaking your Linux partition.

To remedy this situation so it doesn't happen again. you will have to do backups of your partition tables in your preferred distro. I believe there is a tool on Ubuntu called Boot-Repair which will reinstall your partition tables when it breaks. Idk if its available on the distro you are using.

1 Like

Partitions should still be there, usually window$ just overwrite the boot sector with their own so you boot directly into windows instead of the boot manager.
If you go into the windows manager -> disk management, you should still be able to see the partitions which windows cant read.

problem is getting this damn laptop to boot from USB again. Its elementary os Ubuntu 16.04 base so boot-repair should work fine. Win10 didnt actually overwrite grub though. it just went to rescue. so no windows boot or linux.

You unable to boot up on the usb device? seems odd if so.

[THE CURRENT YEAR]
Not sandboxing Windows in a VM

derp

3 Likes

So this is definitely going other places than the OPd question but now I have one.

Some time ago MS were sued at a European level, if not sued giving a stern talking to and fined I believe, over windows assuming the default browser as IE and never giving you an option otherwise. Stems back to the Netscape antitrust case.

What was supposed to happen was when you start windows and open a browser it would give you a few options like chrome, Firefox and IE and you choose the one you wanted. By law this was meant to happen, it did not and they got in trouble.

That is just the example and run up to my actual question.

Is windows forcibly overwriting the boot sector where other OSs can have the boot menu to allow access to linux, windows and even Mac legal? Is the boot sector a windows invention they have rights to, without warning, destroy and force you back into windows any time they feel like updating it?

That seems wrong and like it should not happen.

They have been doing so since XP, and properly before that, its just how the windows installer works, I agree with you whole heartedly it shouldn't be so.
M$ isn't really forcibly insisting on only using windows, they just dont care if anything else is installed, and anytime install a new version of windows they rewrite the boot sector, and sadly with 10 they run a new OS installation pretty much anytime what used to be a service pack is released.

@NetBandit Sandboxing windows in a Vm is overkill for a shared device between my wife and I. Especially one that isn't loaded with ram.

I think my solution will end up being to use 2 hdd/ssd. Let windows have one and Linux another and just switch primary boot device to the Linux disk. Grub will find an OS on any drive and allow Win to keep its MBR.

What I think happened was this. Windows 10 uses 3 of 4 primary partitions allowed in MBR and then writes over the table for the extended volume leaving the remaining Linux install and swap unusable...

2 Likes

I have a similar setup where the EFI partition and Linux are on my 120GB 850 EVO and Windows is on my 240GB Hectron X1 and it works decently well. As you said I think the issue is with MBR so if you were using UEFI with the GPT partition table this likely wouldn't have happened.

In the past I had many issues with Windows and MBR and in some cases it broke my Linux install by making the partition unreadable but after moving to UEFI and GPT haven't had any issues with Windows/Linux partitioning.

Windows will always install it's first stage bootloader into the MBR.

It has to do this to boot up and since it is often the only OS on a computer it doesn't ask. Currently there is no method to stop it from doing that.

Most Linux distros ask if you want GRUB installed in the MBR when they are set up.

As @Kat said, the solution is to reinstall GRUB into the MBR using a tool like Boot-Repair. This should be fine since GRUB can boot into the Windows bootloader and often automatically finds it.

Read up abit on the problem, and appearently it is an issue where partitions go the way of the dodo, after the anniversary update.
Can't promise this article will help, but maybe worth a shot.
https://www.partitionwizard.com/partitionmanager/partition-disappears-in-win-10-anniversary-update.html

Sounds like it is overwriting the whole MBR with the default install setup.

That is a really dangerous and irresponsible thing to do if that is the case.

I'm surprised I haven't heard about this if that is what's happening. Any idea if it i happens consistently?

Yea seems like it is a fairly common problems, seems it hits windows 7 as well.
Googeling for it didn't take much effort to find articles describing the exact problem.

I understand why Windows does it for an installation, since there has to be a bootloader in the MBR to get into the OS, but as part of an update this seems insane.

I doubt this is an intended function, but I am surprised Microsoft hasn't pushed an update if it is a bug.

So here's the rundown.

Win10 Anniversary (aka Adversary ) nukes your partition. Not the data. So there are a couple tools and options to use depending on the situation.

boot-repair ( can be installed via Ubuntu repo or via live disk) https://sourceforge.net/p/boot-repair-cd/home/Home/
Gparted ( included on the live disk )
grub rescue> ( optional ) For manually booting the installed OS after partition recovery Https://www.linux.com/learn/how-rescue-non-booting-grub-2-linux

If the grub boot wasn't thrashed by Win10 MBR and you have the "grub rescue>" prompt, use the link to guide you through finding and manually booting the linux kernel. But you have to have the partitions recovered first. A strange catch 22. I used this to do the manual booting and then installed boot-repair on my distro Elementary ( Ubuntu 16.04 base ) to fix grub.

Step One - Find the partition.

Gparted will show your lost partition as unallocated space. In my case this was an extended volume with 2 logical partitions inside. Windows for whatever reason deleted the table for my ext4 logical volume but left the swap alone. You can use gparted to just create a "new" ext4 in place of the old. This only writes tables not data. So once you have that the data should show up.

Step 1.5 - I ended up having to use grub rescue> at this point to manually boot into Elementary. For some reason non of the boot-repair live USB sticks would boot. The only live distro I had with gparted was SolusOS and it doesn't have boot-repair.

Step Two - Use Boot-Repair to purge and reinstall grub to the MBR.
https://help.ubuntu.com/community/Boot-Repair

Grub did not want to update or install via the current installation on my distro, so I ended up installing boot-repair via repo to walk through purging it and reinstalling.

This worked out great. Grub went back into place and all the OS boot options show up again.

The meaning of 'Back Up Back Up Back Up' should also apply to Encrypted Partitions keys.

BACK UP YOUR PARTITION KEYS !!! In a 'Dual Boot' society you must BACK UP YOU DATA & Encryption Keys !!!

A Windows Update corrupted the first 130MB of an Encrypted Drive I had in the system at the time of Update. It's crazy Windows does this...

1 Like

If you are new to Linux chances are you are not going to do that. however you learn from experience much more than someone informing you beforehand.

1 Like

wow that sucks. Windows forced update removed my 8gadgetpack and classic shell start menu.

2 Likes

Boot-repair has options for backing up partition tables and clonezilla is great for making image backups of those partitions/drives in their entirety.