A Warning About Windows 10 and Dual-Booting Linux

I have had a lot of positive experiences with Windows 10, and figured it was time to upgrade the last machine before hitting the "not free anymore" deadline. This was the first one that didn't go well.

The machine had 4 primary partitions: Lenovo recovery, Windows 7 NTFS, Linux (ext3), and Linux swap. If you dig back into the bowels of history, MBR-style partition tables can only support 4 partitions. Apparently, during the upgrade Windows 10 slightly shrinks its own partition and creates a new one for Windows 10 recovery. This would put the number of primary partitions up to 5, which there just plain is no room for in the MBR. From what I can tell from my failed recovery efforts, this process involved Windows creating an extended partition and trying to move the ext3 and swap partitions into it. Well something went wrong there, the partition table got mangled, and the ext3 partition disappeared.

In the process, I learned a lot about the TestDisk [1] program that comes with Kali [2]. This looks like a great disaster recovery tool, but try as it might, my disk was sufficiently mangled that it couldn't recover the Linux partition.

Lesson learned: Don't install Windows 10 until you're sure you've got room in your MBR for an extra partition!

My plan going forward is to nuke the remnants of the Linux partitions, try to install the Windows 10 boot loader from a USB key, and then re-install Ubuntu afterwards. Luckily I keep all of the important stuff from the Linux partition in git, so I didn't lose anything other than time.

Coming soon: a post about Windows and Linux full-disk backup solutions. The vast majority of my work is stored in git repositories or Dropbox, so I haven't spent a lot of time thinking about machine recovery, but I've sunk enough time into fixing this mess that I figure it's worth it.