sodcalculator

10 Tech How-To

Fix Installation Failure Reading Sector 0x0 from hd0

Guide 10-43052 · Updated · Step by step

If you see “installation failure reading sector 0x0 from hd0” while installing Kali Linux on a machine that already runs Ubuntu, the cause is almost always a GRUB bootloader issue—either the installer cannot read the disk’s boot sector or the existing Ubuntu GRUB is interfering. The fix is to boot the Kali installer in UEFI mode (if your system supports it), disable Secure Boot, and ensure the disk is properly partitioned with a GPT partition table and an EFI System Partition. Below are the detailed steps and background to resolve this error permanently.

What Causes the 0x0 Sector Read Error

This error message comes from GRUB, the bootloader used by both Ubuntu and Kali. It means GRUB tried to read the first sector (sector 0) of the disk (hd0) but failed. Common triggers include:

  • BIOS vs UEFI mismatch: The installer is booted in BIOS/CSM mode but the disk uses GPT with an EFI System Partition, or vice versa.
  • Secure Boot enabled: The firmware blocks unsigned bootloaders, causing GRUB to fail reading the boot sector.
  • Corrupted or missing GRUB files: A previous failed install left incomplete boot files.
  • Disk partitioning issues: The target disk has an MBR partition table but the installer expects GPT, or the boot flags are wrong.
  • External drive or USB order: hd0 might refer to the USB stick, not the internal disk, so GRUB reads the wrong device.

Step-by-Step Fix for UEFI Systems

Most modern computers (2012 and later) use UEFI firmware. If your Ubuntu installation is UEFI-based, follow these steps:

  1. Back up your data—this process repartitions the disk.
  2. Enter your firmware settings (usually by pressing F2, F10, Del, or Esc during boot).
  3. Disable Secure Boot (often under “Boot” or “Security” menu).
  4. Ensure boot mode is set to UEFI (not Legacy/CSM).
  5. Boot the Kali installer USB—make sure you select the UEFI entry (e.g., “UEFI: USB Drive”) from the boot menu.
  6. In the Kali installer, choose “Guided – use entire disk” and select the correct disk. The installer will create a GPT partition table with an EFI System Partition automatically.
  7. Proceed with installation—the error should not appear.

Step-by-Step Fix for Legacy BIOS Systems

If your machine is older and uses BIOS (not UEFI), or you prefer to keep BIOS mode:

  1. Back up data.
  2. Enter firmware settings and set boot mode to Legacy/CSM (disable UEFI).
  3. Boot the Kali installer in BIOS mode (the USB entry without “UEFI” prefix).
  4. Partition manually using the installer’s partitioning tool. Create a small (1-2 MB) BIOS boot partition (type ef02) and a root partition (ext4).
  5. Install GRUB to the Master Boot Record (usually /dev/sda).

If the Error Persists: Manual Partitioning

Sometimes the guided partitioning fails to set the boot flags correctly. Use manual partitioning:

  • For UEFI: Create a 512 MB FAT32 partition, set mount point /boot/efi and enable the esp flag.
  • For BIOS: Create a 1-2 MB partition with no filesystem, set the bios_grub flag.
  • Create a root partition (ext4) with mount point /.
  • Optionally create a swap partition (2-4 GB) and a home partition.

Common Mistakes and Misconceptions

Many users think the error is about a corrupted disk, but it’s usually a boot mode mismatch. Another misconception is that you must remove Ubuntu first—you don’t; you can dual-boot. However, if you want to replace Ubuntu, the installer will overwrite it. Also, don’t confuse hd0 with the USB drive; if you boot from USB, hd0 might be the USB, and GRUB tries to read from it after installation, which fails. To avoid this, always install GRUB to the internal disk (e.g., /dev/sda).

Comparing UEFI and BIOS Installations

UEFI is the modern standard, offering faster boot, secure boot, and larger disk support (GPT). BIOS is legacy, limited to MBR (max 2 TB disk) and slower. For Kali, UEFI is recommended because it’s more compatible with current hardware and avoids the 0x0 error. If you have a dual-boot with Ubuntu, both systems must use the same mode (both UEFI or both BIOS).

Frequently Asked Questions

Can I fix this without reinstalling?

Sometimes yes. If the error appears after a failed install, you can boot from a live USB and reinstall GRUB using grub-install and update-grub. But if the disk partition table is wrong, a reinstall is cleaner.

Will this erase my Ubuntu installation?

Only if you choose to overwrite the whole disk. You can select “Install alongside” or manual partitioning to keep Ubuntu, but be careful to not format the Ubuntu partitions.

Why does Secure Boot cause this error?

Secure Boot verifies the bootloader’s signature. Kali’s GRUB is not signed by Microsoft, so the firmware refuses to load it, resulting in a read failure. Disabling Secure Boot allows any bootloader to run.

What if I don’t have a UEFI option in firmware?

That means your system is BIOS-only. Follow the BIOS steps above. If the disk is already GPT, you may need to convert to MBR or use a hybrid setup, but that’s advanced.

Can I use a different bootloader like rEFInd?

Yes, but it’s not necessary. GRUB is the default and works fine once the mode is correct. rEFInd can be used as a fallback if GRUB continues to fail.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →