|
| 1 | +--- |
| 2 | +title: Boot error – "this is not a bootable disk" |
| 3 | +description: This article provides steps to resolve issues where the disk isn't bootable in an Azure Virtual Machine |
| 4 | +services: virtual-machines-windows |
| 5 | +documentationcenter: '' |
| 6 | +author: v-miegge |
| 7 | +manager: dcscontentpm |
| 8 | +editor: '' |
| 9 | +tags: azure-resource-manager |
| 10 | +ms.assetid: 5d6db4e3-c2f5-40c7-afea-54edf745f5eb |
| 11 | +ms.service: virtual-machines-windows |
| 12 | +ms.workload: infrastructure-services |
| 13 | +ms.tgt_pltfrm: na |
| 14 | +ms.topic: troubleshooting |
| 15 | +ms.date: 03/25/2020 |
| 16 | +ms.author: v-mibufo |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +# Boot Error – This is not a Bootable Disk |
| 21 | + |
| 22 | +This article provides steps to resolve issues where the disk isn't bootable in an Azure Virtual Machine (VM). |
| 23 | + |
| 24 | +## Symptoms |
| 25 | + |
| 26 | +When you use [Boot diagnostics](https://docs.microsoft.com/azure/virtual-machines/troubleshooting/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...'. |
| 27 | + |
| 28 | + Figure 1 |
| 29 | + |
| 30 | +  |
| 31 | + |
| 32 | +## Cause |
| 33 | + |
| 34 | +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. |
| 35 | + |
| 36 | +## Solution |
| 37 | + |
| 38 | +### Process Overview |
| 39 | + |
| 40 | +1. Create and Access a Repair VM. |
| 41 | +2. Set Partition Status to Active. |
| 42 | +3. Fix the Disk Partition. |
| 43 | +4. **Recommended**: Before you rebuild the VM, enable serial console and memory dump collection. |
| 44 | +5. Rebuild the Original VM. |
| 45 | + |
| 46 | + > [!NOTE] |
| 47 | + > When encountering this boot error, the Guest OS isn't operational. You'll be troubleshooting in offline mode to resolve this issue. |
| 48 | +
|
| 49 | +### Create and Access a Repair VM |
| 50 | + |
| 51 | +1. Use steps 1-3 of the [VM Repair Commands](https://docs.microsoft.com/azure/virtual-machines/troubleshooting/repair-windows-vm-using-azure-virtual-machine-repair-commands) to prepare a Repair VM. |
| 52 | +2. Using Remote Desktop Connection connect to the Repair VM. |
| 53 | + |
| 54 | +### Set Partition Status to Active |
| 55 | + |
| 56 | +Generation 1 VMs should first verify that the OS partition, which holds the BCD store is marked as *active*. If you have a Generation 2 VM, skip ahead to [Fix the Disk Partition](#fix-the-disk-partition), as the *Status* flag was deprecated in the later generation. |
| 57 | + |
| 58 | +1. Open an elevated command prompt *(cmd.exe)*. |
| 59 | +2. Enter *diskpart* to launch the DISKPART tool. |
| 60 | +3. Enter *list disk* to list the disks on the system and identify the attached OS VHD. |
| 61 | +4. Once the attached OS VHD is located, enter *sel disk #* to select the disk. See Figure 2, where Disk 1 is the attached OS VHD. |
| 62 | + |
| 63 | + Figure 2 |
| 64 | + |
| 65 | +  |
| 66 | + |
| 67 | +5. Once the disk is selected, enter *list partition* to list the partitions of the selected disk. |
| 68 | +6. Once the boot partition is identified, enter *sel partition #* to select the partition. Usually the boot partition will be around 350 MB in size. See Figure 3, where Partition 1 is the boot partition. |
| 69 | + |
| 70 | + Figure 3 |
| 71 | + |
| 72 | +  |
| 73 | + |
| 74 | +7. Enter 'detail partition' to check the status of the partition. See Figure 4, where the partition is *Active: No*, or Figure 5, where the partition is 'Active: Yes'. |
| 75 | + |
| 76 | + Figure 4 |
| 77 | + |
| 78 | +  |
| 79 | + |
| 80 | + Figure 5 |
| 81 | + |
| 82 | +  |
| 83 | + |
| 84 | +8. If the partition is **Not Active**, enter *active* to change the *Active* flag. |
| 85 | +9. Check that the status change was done properly by typing *detail partition*. |
| 86 | + |
| 87 | + Figure 6 |
| 88 | + |
| 89 | +  |
| 90 | + |
| 91 | +10. Enter *exit* to close the DISKPART tool and save your configuration changes. |
| 92 | + |
| 93 | +### Fix the Disk Partition |
| 94 | + |
| 95 | +1. Open an elevated command prompt (cmd.exe). |
| 96 | +2. Use the following command to run *CHKDSK* on the disk(s) and fix errors: |
| 97 | + |
| 98 | + `chkdsk <DRIVE LETTER>: /f` |
| 99 | + |
| 100 | + Adding the '/f' command option will fix any errors on the disk. Make |
| 101 | +sure to replace <DRIVE LETTER> with the letter of the attached OS VHD. |
| 102 | + |
| 103 | +### Recommended: Before you rebuild the VM, enable serial console and memory dump collection |
| 104 | + |
| 105 | +To enable memory dump collection and Serial Console, run the following script: |
| 106 | + |
| 107 | +1. Open an elevated command prompt session (Run as administrator). |
| 108 | +2. Run the following commands: |
| 109 | + |
| 110 | + Enable Serial Console |
| 111 | + |
| 112 | + `bcdedit /store <VOLUME LETTER WHERE THE BCD FOLDER IS>:\boot\bcd /ems {<BOOT LOADER IDENTIFIER>} ON` |
| 113 | + |
| 114 | + `bcdedit /store <VOLUME LETTER WHERE THE BCD FOLDER IS>:\boot\bcd /emssettings EMSPORT:1 EMSBAUDRATE:115200` |
| 115 | + |
| 116 | +3. Verify that the free space on the OS disk is as much as the memory size (RAM) on the VM. |
| 117 | + |
| 118 | + If there's not enough space on the OS disk, you should change the location where the memory dump file will be created and refer that to any data disk attached to the VM that has enough free space. To change the location, replace "%SystemRoot%" with the drive letter (for example, "F:") of the data disk in the below commands. |
| 119 | + |
| 120 | +#### Suggested configuration to enable OS Dump |
| 121 | + |
| 122 | +**Load Broken OS Disk**: |
| 123 | + |
| 124 | +`REG LOAD HKLM\BROKENSYSTEM <VOLUME LETTER OF BROKEN OS DISK>:\windows\system32\config\SYSTEM` |
| 125 | + |
| 126 | +**Enable on ControlSet001:** |
| 127 | + |
| 128 | +`REG ADD "HKLM\BROKENSYSTEM\ControlSet001\Control\CrashControl" /v CrashDumpEnabled /t REG_DWORD /d 1 /f` |
| 129 | + |
| 130 | +`REG ADD "HKLM\BROKENSYSTEM\ControlSet001\Control\CrashControl" /v DumpFile /t REG_EXPAND_SZ /d "%SystemRoot%\MEMORY.DMP" /f` |
| 131 | + |
| 132 | +`REG ADD "HKLM\BROKENSYSTEM\ControlSet001\Control\CrashControl" /v NMICrashDump /t REG_DWORD /d 1 /f` |
| 133 | + |
| 134 | +**Enable on ControlSet002:** |
| 135 | + |
| 136 | +`REG ADD "HKLM\BROKENSYSTEM\ControlSet002\Control\CrashControl" /v CrashDumpEnabled /t REG_DWORD /d 1 /f` |
| 137 | + |
| 138 | +`REG ADD "HKLM\BROKENSYSTEM\ControlSet002\Control\CrashControl" /v DumpFile /t REG_EXPAND_SZ /d "%SystemRoot%\MEMORY.DMP" /f` |
| 139 | + |
| 140 | +`REG ADD "HKLM\BROKENSYSTEM\ControlSet002\Control\CrashControl" /v NMICrashDump /t REG_DWORD /d 1 /f` |
| 141 | + |
| 142 | +**Unload Broken OS Disk:** |
| 143 | + |
| 144 | +`REG UNLOAD HKLM\BROKENSYSTEM` |
| 145 | + |
| 146 | +### Rebuild the Original VM |
| 147 | + |
| 148 | +Use [step 5 of the VM Repair Commands](https://docs.microsoft.com/azure/virtual-machines/troubleshooting/repair-windows-vm-using-azure-virtual-machine-repair-commands#repair-process-example) to reassemble the VM. |
0 commit comments