Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.
You’ve been happily using Windows and Ubuntu on the same computer for months, but then a Windows Update is issued—and disaster strikes!
Windows Update has left your Linux partition unreadable. There’s no boot selection screen, and after investigation it appears the Linux partition has been deleted. Here’s what you can do to fix things and ensure this never happens again.
Windows Updates Don’t Care About Linux
Dual booting Windows and Ubuntu (or another Linux distro) gives you the best of both worlds. But it also gives you the worst.
When Microsoft issues an update for Windows 10, it is largely unconcerned with any operating system or software existing beyond the Windows partition (with some exceptions, such as the UEFI, and recovery partition).
Linux partitions use the EXT4 filesystem, as opposed to NTFS. Windows is only concerned with the latter, so data stored in EXT4 formatted partitions is likely to be ignored. Not in a good way.
The result of this is that partitions can be removed, or even overwritten by the Windows Update process.
Lost partitions can usually be dealt with. Overwritten data, meanwhile, is far tougher to deal with. So, what can you do about it?
First, Try to Recover the Partition
If your Linux data is lost, you need to find out if it can be recovered. Several Linux recovery tools are available, ideal for searching the hard disk for data.
Make sure you have sufficient space for recovery, however. The data will need to be recovered to an external drive, or a different partition that predates the data’s deletion.
It may even be possible to reinstate the entire missing Linux partition. If this is the case, you’ll need to repair the bootloader. Our guide on how to fix a Linux PC when it won’t boot shows you how to do this.
On some occasions, however, recovery and repair isn’t possible. You’ll be stuck without your Linux data, some of which might have been vital. Indeed, Linux might be your primary operating system, with Windows an afterthought, just a guest on your computer.
How to Prevent Windows Updates Deleting Linux
So, the chances of recovering a wrecked Linux partition at the hands of Windows 10 are minimal. So what can you do about it?
1. Make Regular Data Backups
These days, no one should be running a computer without keeping at least a backup of their vital data.
Personal data can easily be backed up, either to the cloud, or to a local device. This might be an external hard disk drive, or a USB flash stick. For the best in basic backup, however, you should use both, maintaining your personal data in the cloud and making regular local backups. See our roundup of Linux cloud solutions to find compatible services.
More advanced backup options are also available. Backing up your entire disk to another drive is possible. Although disk backup tools are available for Windows, Linux has a full disk cloning utility built in. They make complete copies of your disk drives, backing up the data to an external drive of the same, or larger size.
You can also use such tools to copy specific chunks of data; e.g., just the operating system and personal data.
2. Install Operating Systems on Separate Hard Drives
One sure fire way of avoiding the loss of Ubuntu thanks to Windows Update is to use two separate drives.
Many people rely on a single hard disk drive, split up into multiple partitions. One of these is used for Windows 10, while the other is reserved for Linux.
This is how so many problems occur with Windows Update messing up Linux. Windows 10 needs the extra space for the update, so the EXT4 partition is deleted, reformatted, and the space used.
However, if you employ separate physical disk drives, this will not happen. The process of dual booting Windows and Ubuntu remains the same, but with one difference: you just need to ensure that Linux is installed on the second disk drive.
To make this work, you’ll need to ensure your PC has separate physical drives. If not, check our tips on how to install a second hard disk drive.
3. Run Windows or Linux in a Virtual Machine
Messing around with dual booting and additional hard disk drives can be as big a pain as attempting to recover lost data. You might prefer a simpler solution that doesn’t require an extra drive.
Virtualization allows you to create a virtual machine—a software version of your computer’s physical hardware—and install an operating system within it. Windows 10 runs well in a virtual machine (VM), as does Ubuntu and other versions of Linux.
How you do this depends on which operating system you prefer to use day-to-day, and which you’re happy to switch to occasionally.
If you want to install Windows in a virtual machine in Linux, you can. Similarly, it’s also possible to setup a Linux virtual machine in Windows 10. Both of these options will prevent Windows Update from deleting Linux.
4. Run Linux or Windows From a USB Drive
Not all that bothered about a physical installation of your alternative operating system? Insufficient resources for a virtual machine? Don’t worry. You can run a portable version of your chosen operating system from a USB flash drive.
With a portable Linux operating system that you can load up as and when needed from external media, Windows Update cannot cause problems.
Perhaps the best way of doing this is to run Linux from a USB drive, as this is more reliable. There is a tool called Windows To Go that will create a portable version of Windows, but this is currently limited to Enterprise editions of Windows. That means that if you’re using Windows 10 Home, as most people do, Windows To Go won’t work for you.
Don’t Let Windows Update Destroy Linux!
Windows was not designed to run alongside Linux. The fact that it does so, reasonably well, is thanks to the efforts of its designers.
Losing data on Linux due to a Windows Update is frustrating. Often, Windows is merely tolerated, left on a computer as an option for specific apps. It might even be a condition of employment that Windows is used.
Whatever the situation, keep in mind that you can avoid letting Windows Update loose on your Linux partition. Take precautions:
- Make regular backups
- Install each operating system on a separate physical hard drive
- Run your secondary operating system in a virtual machine
- Run your secondary operating system from a USB drive
If you need to use Linux alongside Windows 10 and can’t do any of the above, you’re at risk of losing your Linux partition. At the very least, take the time to delay your Windows Updates until you’re able to take precautions.
Image Credit: PicsFive/Depositphotos