Ubuntu Installer Not Detecting Hard Drive

Ubuntu Installer Not Detecting Hard Drive: I recently encountered an issue when trying to install Ubuntu on a particular system. The Ubuntu Ubiquity Installer wasn’t detecting my SATA hard drive, even though the drive showed up perfectly in fdisk -l and appeared in GParted. The underlying cause turned out to be residual RAID metadata on the drive, which led the installer to incorrectly treat it as unsupported. If you’re facing similar Ubuntu installation issues with SATA or NVMe hard drives, keep reading to find a solution.

In this tutorial, I'll walk you through the steps I took to get the Ubuntu installer to detect my hard drive and successfully proceed with the installation of Ubuntu.

ubuntu installer not detecting hard drive
ubuntu not detecting hard drive - fixed

Make Ubuntu Installer Detect Your SATA or NVMe Hard Drive

If you find the Ubuntu installer not detecting your hard drive, try the following steps to resolve the issue:

  1. Boot from Ubuntu Live USB: Start by booting your system with the Ubuntu Live USB.
  2. Open a Terminal: Go to Applications > Accessories > Terminal or use the keyboard shortcut Ctrl + Alt + T.
  3. Identify the Device: In the terminal, type sudo su to gain root privileges. Then run fdisk -l to list the available drives. Identify the target drive from the list (e.g., /dev/sda, /dev/sdb, or /dev/nvme0n1).
  4. Remove RAID Metadata: If your drive has leftover RAID configuration information, it will prevent the installer from detecting it. Choose one of the following methods to remove that metadata (replace /dev/sdX with your actual device):
    • Using wipefs (recommended):
      sudo wipefs --all /dev/sdX
    • Using mdadm (for software RAID):
      sudo mdadm --zero-superblock /dev/sdX
    • Using dmraid (legacy):
      sudo dmraid -E -r /dev/sdX

    Tip: If any command returns “command not found,” you can install the needed package using:

    sudo apt install mdadm
    sudo apt install dmraid
  5. Confirm Deletion: If prompted (especially when using dmraid), type "yes" and press Enter to confirm the removal of RAID metadata.
  6. Re-run the Installer: After clearing the RAID metadata, close the terminal and return to the desktop. Launch the Ubuntu Installer, and your hard drive should now be detected. You can proceed with the installation process as usual.

Tips to Get Ubuntu Installer to Detect Hard Drive

The most modern versions of the Ubuntu installer (like the Subiquity installer in Ubuntu 24.04 and later) are generally better at detecting drives, but leftover metadata or BIOS configuration can still cause problems. If your drive still isn’t being recognized, try these additional tips:

  1. Check Hardware Connections: Ensure that your SATA hard drive is properly connected. Check the cables and connections to make sure everything is secure.
  2. BIOS/UEFI Settings: Enter your computer's BIOS or UEFI settings during the boot process (commonly with Del, F2, or Esc). Look for any settings related to SATA mode. If your SATA controller is set to RAID, switch it to AHCI. AHCI is strongly recommended for Ubuntu and improves compatibility.
  3. Update BIOS/UEFI Firmware: Check if there is a firmware update available for your motherboard. Sometimes, outdated firmware can cause compatibility issues with newer hardware or operating systems.
  4. Try Another SATA Port: If you have multiple SATA ports on your motherboard, try connecting the hard drive to a different one. This sometimes helps with detection issues.
  5. Check Compatibility: Ensure that your SATA or NVMe drive is compatible with your motherboard. Refer to the hardware documentation if necessary.
  6. Use Compatible Hardware: Some hardware combinations may still cause issues. If possible, try using storage devices known to work well with Ubuntu.
  7. Boot Parameters: During the Ubuntu installation process, you can try specifying boot parameters to help with detection:
    1. When you see the GRUB menu, press 'e' to edit the boot parameters.
    2. Look for the line starting with linux and add the following parameter at the end:
      libata.force=noncq
    3. Press Ctrl+X to boot with the modified parameters and continue with the installation.
  8. Use wipefs or mdadm instead of just dmraid: Many modern Ubuntu ISOs don’t include dmraid by default. Use wipefs (preferred) or mdadm for cleaner metadata removal.
    sudo wipefs --all /dev/sdX
  9. Check Ubuntu Compatibility: Make sure the version of Ubuntu you’re installing is compatible with your hardware. Newer devices may need Ubuntu 24.04 LTS or later.

Special Note for NVMe Drives

If you're using an NVMe SSD, the same steps apply — just be aware that your device will appear as /dev/nvme0n1 instead of /dev/sda or /dev/sdb. Use this correct device name in all cleanup commands.

Installer Note (Ubuntu 24.04+)

As of Ubuntu 24.04 LTS, the installer has been upgraded to Subiquity. It’s more robust than the older Ubiquity installer but still does not automatically remove RAID or filesystem metadata. Manual cleanup is still required using the steps above.

Final Thoughts

In this guide, we've addressed the issue of the Ubuntu installer not detecting a SATA or NVMe hard drive — usually caused by leftover RAID metadata. By clearing the RAID information using wipefs, mdadm, or dmraid, and adjusting BIOS/UEFI settings, users can resolve the issue and proceed with installation.

We’ve also provided several troubleshooting tips, including verifying hardware connections, using boot parameters, and ensuring system compatibility. With these steps, your drive should now be recognized and ready for a smooth Ubuntu setup process.