Rebuilding a boot partition
Noted for future reference.
Fixing a GPT UEFI boot partition for Windows 10 by re-creating the ESP (EFI System Partition).
DISKPART> list disk DISKPART> sel disk 0 (usually) DISKPART> detail disk DISKPART> sel vol 2 (usually) DISKPART> del par override DISKPART> create par efi (size=500 if you need to restrict size). DISKPART> format fs=fat32 quick label="ESP" DISKPART> set id=c12a7328-f81f-11d2-ba4b-00a0c93ec93b (mainly noted for reference). DISKPART> assign letter k DISKPART> exit // // Rebuilding the EFI boot files. // C:\> bcdboot c:\windows /s K: /f ALL // // Set bcdboot configuration to the partition we just fixed. // Check with 'bcdedit' to see if it's needed, e.g. Lenovo. // C:\> bcdedit /set {bootmgr} device partition=K: ^ NOTE: If you get an error here about "system device" not found, you need to make sure you rebooted into UEFI if you just converted from MBR to GPT before or during this process.
Doing the same for MBR installations.
Fikse windows 10 MBR basert installasjon. ========================================= 1) alternativ a) Fjern alle ekstra partisjoner utenom OS. diskpart > sel disk N > sel vol N > active alternativ b) Opprett en minst 500mb NTFS partisjon innenfor 2TB område og sett som aktiv. diskpart > sel disk N > sel vol N (C) > shrink desired=1024 create par pri format fs=ntfs quick label=SYSTEM assign letter k active 2)* X:\> bootsect /nt60 k: /force /mbr NOTAT: (Ny MBR bootcode trengs kun hvis den har blitt korrupt, initialisering av MBR disker oppretter denne allerede). 4)* X:\> bcdboot c:\windows /s k: /f ALL *) Bruk c hvis alternativ a med kun 1 partisjon, k hvis alternativ b med egen systempartisjon. Hvis det blir flere oppstartsvalg i etterkant, kan de finnes og fjernes med bcdedit.