# Recovering a boot partition

### The first thing you need to do is to insert a bootable USB flash drive with windows boot files in FAT32 format

{% hint style="info" %}
You can create them from another device
{% endhint %}

<div align="left"><figure><img src="https://content.gitbook.com/content/aHScG0ziizeYSWipc9RN/blobs/b9VXYXJtXRIxJKSSNVY4/Group%205248.png" alt=""><figcaption><p>The interface may vary</p></figcaption></figure></div>

### Then you need to ‘enter bios’ and boot by selecting this stick as ‘startup device’

<div align="left"><figure><img src="https://content.gitbook.com/content/aHScG0ziizeYSWipc9RN/blobs/1MlelgrsqXBPHuLfErR3/Frame%2033669%202.png" alt=""><figcaption><p>The interface may vary</p></figcaption></figure></div>

### After launching from the flash drive, you will see the Windows Installer window

<div align="left"><figure><img src="https://content.gitbook.com/content/aHScG0ziizeYSWipc9RN/blobs/XWmvq5juEHrXh1XNJB3k/Frame%205285%202.png" alt=""><figcaption><p>The interface may vary</p></figcaption></figure></div>

{% hint style="danger" %}
We don't need to click anything, we don't need to follow the Windows installation procedure!
{% endhint %}

### We need to call the command line and execute the commands

To invoke the command line we need to press the key combination **‘SHIFT+F10’**

After invoking the command prompt in the Windows installation window, you need to enter the commands :

The first command is **‘diskpart’** then **‘list vol’**, a selection of discs will appear, you need to select your boot sector **‘sel vol 5’** where **‘5’** is your boot sector, it is usually 100MB in size and FAT32 format.

Next enter the command **‘assign letter z’**, then the command **‘exit’**, followed by **‘Bcdboot c:\windows /s z: /f all'**, where **'c:'** is your system drive.

<div align="left"><figure><img src="https://1996792767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaHScG0ziizeYSWipc9RN%2Fuploads%2F0ATKLgkUrspXxRU4c02P%2FGroup%205254.png?alt=media&#x26;token=5664707d-ebff-4cb4-9635-1f0a721a816b" alt=""><figcaption><p>The interface may vary</p></figcaption></figure></div>

If you have done everything correctly, switch off the computer, remove the flash drive, and switch on the computer.

{% hint style="success" %}
There, you've restored the system!
{% endhint %}
