# gpart bootcode



## balanga (Jun 22, 2017)

I seem to have messed up the mbr on a particular disk which has Windows installed and can't boot the disk. I can view the partitions using `ntfs-3g` and they seem intact, so I wondered if I could restore the MBR using `gpart bootcode -b /tmp/Windowsmbr ada0` if I managed to find a copy of Windowsmbr...


----------



## phoenix (Jun 23, 2017)

You can boot off a Windows CD, drop to a Repair console, and run `fdisk /something` to restore the default Windows MBR.


----------

