1. Home
  2. Linux

How to fix Ubuntu not detecting Windows 10 partition during install

Many Ubuntu Linux users choose to dual-boot the Linux-based operating system with Microsoft Windows 10, either by selecting it during the installation when setting up Ubuntu or after the fact, by loading it up with Grub.

Most of the time, Ubuntu can detect and set up Microsoft Windows 10 automatically, with no fuss at all. However, in some rare cases, the Ubuntu Linux operating system can’t find Windows 10 and cause problems for those trying to set up a dual-boot.

If you’re trying to set up Ubuntu Linux and Windows 10 on the same system, and you can’t figure out why Ubuntu won’t detect it, we can help. Here’s to how to fix Ubuntu not detecting Windows 10!

Fix Ubuntu not detecting Windows 10 during installation

The Ubuntu installation tool scans for alternative operating systems during the installation. Usually, a separate hard drive running Windows 10, or a Windows 10 partition is automatically detected with Os-Prober, a sophisticated operating system scanning tool. If Windows 10 isn’t recognized, it likely means that Windows 10 wasn’t shut down correctly and needs some quick maintenance before the Ubuntu installer will be able to see it.

Close the Ubuntu Linux installation tool and reboot into your Windows 10 PC. From there, follow the step-by-step instructions to clean your Windows 10 installation.

Step 1: Upon logging into Windows 10, make your way to the “My Computer” section and locate the main “C:\” hard drive.

Step 2: Right-click on the “C:\” hard drive with the mouse, locate the “Properties”  option and select it to open up the C:\ drive’s settings area.

Step 3: In the settings area, find “Tools” and select the “Check” button under “Error checking.”

Step 4: Selecting “Check” will tell Windows 10 to automatically scan the C:\ drive for errors, and fix them if they’re present.

Step 5: Open up the Windows 10 Command-prompt window in the app menu. Then, once the “Command Prompt” app shows up in the menu, right-click on it and select “Run as administrator.”

Step 6: When the User Account Control prompt opens up on the screen, saying, “Do you want to allow this app to make changes to your device,” select “Yes.” Choosing “Yes” will give you access to a command prompt window with system-level access.

With the command line open, run the chkdsk command below. Keep in mind that this should only be run if the “Error checking” scan in step 4 found no errors at all.

chkdsk C: /F

Step 7: After running the chkdsk command, a prompt will appear in the command-line, letting you know you need to reboot to run the command. Select “Y” to restart.

Step 8: Let the chkdsk command run. When it finishes running, boot into Windows 10.

Once you’ve loaded Windows 10 back up, click “Shutdown” to turn it off safely. Then, plug in the Ubuntu USB stick, and boot to it to re-try installing Ubuntu. The installation app should now detect Windows 10 in the installation process.

Fix Ubuntu not detecting Windows 10 after Ubuntu is installed

Not every user that intends to dual-boot Windows 10 and Ubuntu plans to install the operating systems on the same hard drive. Many Linux users have two hard drives: one for Linux and one for Windows 10.

If you’ve installed Ubuntu onto your PC, the Ubuntu installer should detect the Windows 10 hard drive automatically. If it doesn’t, here’s how to fix it.

Step 1: Boot into Ubuntu Linux on your PC. Once booted, open up a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard.

Step 2: Use the lsblk command to detect what your Windows PC’s drive label is, as well as the partition names. In this example, it will be “/dev/sdb”, and the partitions we’ll work with are “/dev/sdb1”, “/dev/sdb2”, “/dev/sdb3”, and “/dev/sdb4”.

Step 3: Run the fsck tool on each of the partitions on the Windows 10 drive to clean out any dirty bits on the drive. Be sure to replace each instance of “/dev/sdb” with your actual Windows 10 partition names.

sudo fsck -y /dev/sdb1
sudo fsck -y /dev/sdb2

sudo fsck -y /dev/sdb3

sudo fsck -y /dev/sdb4

Step 4: Install the Os-prober package to Ubuntu Linux using the Apt command below.

sudo apt install os-prober

Step 5: In the terminal, using the update-grub command, force Ubuntu to manually update your bootloader.

sudo update-grub

Step 6: Watch the terminal prompt, and make sure that Ubuntu detects Windows 10. You’ll know Os-prober works if you see it in the output. If the update-grub command doesn’t recognize your Windows 10 hard drive, the fsck command may not be enough. Consider booting into the Windows 10 drive with your BIOS, run chkdsk, and then re-run the update-grub command.

Step 7: Reboot your Ubuntu installation. During the boot process, take a look at the Grub bootloader. If the process is successful, Ubuntu will have detected Windows 10 and added it as a boot option!

Leave a comment