To elaborate on heynnema's answer, Windows partitioning tools have LONG had bugs that cause them to delete logical partitions or convert them inappropriately to primary form, leading to serious problems. I tried Googling for examples, but I found just this one, concerning Windows XP. Windows XP! That's how long these bugs have existed. I'm 100% certain that there are other bug reports, but they're probably old enough that Google's not turning them up in the first couple pages of my search results. Since the release of Windows 8, the number of MBR-based installations has been dropping, so the number of problem reports has been shrinking.
In fact, I became so frustrated by problem reports about this sort of issue that in 2011 I wrote FixParts, which is based on (and part of) my GPT fdisk utility suite, installed in the
gdisk package in Ubuntu. FixParts will not solve your specific problem, though; as heynnema says, you need TestDisk (or something similar to it) for that. I mention this as another illustration of how common and long-standing these Windows disk partitioning bugs are.
There is some practical advice to be gleaned from your situation:
- Use Windows partitioning tools for as little as possible, especially on MBR disks and most especially on MBR disks with extended and logical partitions. Of course, a Windows update, such as you report having done, might be difficult (or at least undesirable) to avoid....
- If you must use Windows partitioning tools, either directly or as part of something like the update you did, back up your disk first. This includes both a traditional file backup and a backup of your partition table. You can do the latter with a command like
sudo sfdisk -d /dev/sda > parts.txt, which backs up the partition table on
parts.txt. If you need to restore that partition table, you'd use
sudo sfdisk -f /dev/sda < parts.txt; however, if Windows has modified your partition table, it may have made a change that must be preserved (like resizing the Windows partition), so be wary. The backup might still be helpful in selectively recovering a deleted Linux partition, though. (An
sfdisk partition table backup is human-readable, although you need to know a bit to understand its format.)
- Use GPT and EFI installations rather than MBR and BIOS installations whenever possible. Because GPT doesn't use extended or logical partitions, the Windows tools' problems in handling them is unimportant for GPT disks. I'm unaware of any bugs in the Windows partitioning tool's handling of GPT disks that comes anywhere near the problem level of the bug you've encountered in its handling of MBR disks. Of course, if your computer is BIOS-only, this isn't an option; and converting from MBR/BIOS to GPT/EFI carries risks of its own and may be more bother than it's worth. (This Windows tool will do the conversion, if you want to look into it. Be aware, though, that I have no idea how well it would work with a dual-boot configuration.)