Boot Error – This is not a Bootable Disk

Applies to: ✔️ Windows VMs

This article provides steps to resolve issues where the disk isn't bootable in an Azure Virtual Machine (VM).

Symptoms

When you use Boot diagnostics to view the screenshot of the VM, you'll see that the screenshot displays a prompt with the message 'This is not a bootable disk. Please insert a bootable floppy and press any key to try again...'.

Figure 1

Screenshot of the message.

Cause

This error message means the OS boot process couldn't locate an active system partition. This error could also mean that there's a missing reference in the Boot Configuration Data (BCD) store, preventing it from locating the Windows partition.

Solution

Process Overview

Tip

If you have a recent backup of the VM, you may try restoring the VM from the backup to fix the boot problem.

  1. Create and Access a Repair VM.

  2. Set Partition Status to Active.

  3. Fix the Disk Partition.

  4. Recommended: Before you rebuild the VM, enable serial console and memory dump collection.

  5. Rebuild the Original VM.

    Note

    When encountering this boot error, the Guest OS isn't operational. You'll be troubleshooting in offline mode to resolve this issue.

Create and Access a Repair VM

  1. Use steps 1-3 of the VM Repair Commands to prepare a Repair VM.
  2. Using Remote Desktop Connection connect to the Repair VM.

Set Partition Status to Active

Note

This mitigation applies only for Generation 1 VMs. Generation 2 VMs (using UEFI) don't use an active partition.

  1. Attach the system disk to a recovery VM.

  2. Start a Remote Desktop connection to the recovery VM.

  3. Open Computer management > Disk management. Make sure that the disk is flagged as Online in the Disk Management console. Note the drive letter that is assigned to the attached system disk.

    Screenshot that shows the disk attached to the recovery VM.

  4. Identify the Boot partition and Windows partition. If there's only one partition on the OS disk, this partition is both Boot partition and Windows partition.

    If the OS disk contains more than one partition, you can identify the partitions by viewing the folders in them:

    • The Windows partition contains a folder that is named Windows, and this partition is larger than the others.

    • The Boot partition contains a folder that is named Boot. This folder is hidden by default. To see the folder, you must display the hidden files and folders and disable the Hide protected operating system files (Recommended) option. The boot partition is typically 300 MB~500 MB.

  5. Run the following command as an administrator to create a boot record:

    Console
    bcdboot <Windows partition>:\Windows /S <windows partition>: 
    
  6. Use the DISKPART tool to check whether the Windows partition is active:

    1. Open an elevated command prompt and open the DISKPART tool.

      diskpart

    2. List the disks on the system and look for added disks and proceed to select the new disk. In this example, the new disk is Disk 1.

      ps
      list disk
      sel disk 1
      

      The diskpart window shows outputs of list disk and sel disk 1 commands. Disk 0 and Disk 1 are displayed in the table. Disk 1 is the selected disk.

    3. List all the partitions on that disk and then proceed to select the partition you want to check. Usually System Managed partitions are smaller and around 350 MB in size. In the following image, this partition is Partition 1.

      ps
      list partition
      sel partition 1
      

      Screenshot that shows the 'Partition 1' is the selected partition.

    4. Check the status of the partition. In our example, Partition 1 is not active.

      detail partition

      The diskpart window with output of the detail partition command where Partition 1 is not active.

      If the partition isn't active, change the Active flag and then recheck the change was done properly.

      ps
      active
      detail partition
      

      The diskpart window with output of the detail partition command where Partition 1 is active.

    5. Exit the DISKPART tool.

      exit

Fix the Disk Partition

  1. Open an elevated command prompt (cmd.exe).

  2. Use the following command to run CHKDSK on the disk(s) and fix errors:

    chkdsk <DRIVE LETTER>: /f

    Adding the '/f' command option will fix any errors on the disk. Make sure to replace <DRIVE LETTER> with the letter of the attached OS VHD.

To enable Serial Console and memory dump collection, follow these steps:

  1. Open an elevated command prompt session as an administrator.

  2. Run the following BCDEdit commands using the /ems and /emssettings options:

    Enable the serial console:

    Windows Command Prompt
    bcdedit /store <volume-letter-containing-the-bcd-folder>:\boot\bcd /ems {<boot-loader-identifier>} ON
    bcdedit /store <volume-letter-containing-the-bcd-folder>:\boot\bcd /emssettings EMSPORT:1 EMSBAUDRATE:115200
    
  3. Verify that the free space on the OS disk is larger than the memory size (RAM) on the VM.

    If there isn't enough space on the OS disk, change the location where the memory dump file is created, and refer that location to any data disk attached to the VM that has enough free space. To change the location, replace %SystemRoot% with the drive letter of the data disk, such as F:, in the following commands.

    To enable the OS dump file, run the following load, add, and unload commands to implement the suggested configuration using the reg tool:

    Load the registry hive from the broken OS disk:

    Windows Command Prompt
    reg load HKLM\<broken-system> <volume-letter-of-broken-os-disk>:\windows\system32\config\SYSTEM
    

    Enable on ControlSet001:

    Windows Command Prompt
    reg add "HKLM\<broken-system>\ControlSet001\Control\CrashControl" /v CrashDumpEnabled /t REG_DWORD /d 1 /f
    reg add "HKLM\<broken-system>\ControlSet001\Control\CrashControl" /v DumpFile /t REG_EXPAND_SZ /d "%SystemRoot%\MEMORY.DMP" /f
    reg add "HKLM\<broken-system>\ControlSet001\Control\CrashControl" /v NMICrashDump /t REG_DWORD /d 1 /f
    

    Enable on ControlSet002:

    Windows Command Prompt
    reg add "HKLM\<broken-system>\ControlSet002\Control\CrashControl" /v CrashDumpEnabled /t REG_DWORD /d 1 /f
    reg add "HKLM\<broken-system>\ControlSet002\Control\CrashControl" /v DumpFile /t REG_EXPAND_SZ /d "%SystemRoot%\MEMORY.DMP" /f
    reg add "HKLM\<broken-system>\ControlSet002\Control\CrashControl" /v NMICrashDump /t REG_DWORD /d 1 /f
    

    Unload the broken OS disk:

    Windows Command Prompt
    reg unload HKLM\<broken-system>
    

Rebuild the Original VM

Use step 5 of the VM Repair Commands to reassemble the VM.

Contact us for help

If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure feedback community.