Skip to content

Instantly share code, notes, and snippets.

@UnconventionalMindset
Last active December 26, 2024 22:21
Show Gist options
  • Save UnconventionalMindset/396318448b88bba0981113938104c865 to your computer and use it in GitHub Desktop.
Save UnconventionalMindset/396318448b88bba0981113938104c865 to your computer and use it in GitHub Desktop.
Restore Windows after recreating the EFI partition / BSOD 0xc0000001 / IO1 Initialization Failed
Rem This may mess up Linux GRUB. You might need to reinstall GRUB afterwards.
Rem Open Diskpart
diskpart
Rem Select your disk number, in my case #0
list disk
sel disk 0
Rem Select your disk number, in my case #2, you should recognize it by its size and by the filesystem (FAT32)
list volume
select volume 2
Rem Set the partition type to EFI System Partition (ESP).
set id=C12A7328-F81F-11D2-BA4B-00A0C93EC93B
Rem Mark the partition as an EFI System Partition.
gpt attributes=0x0000000000000001
Rem Mount it under S:\
assign letter=S
Rem Exit Diskpart
exit
Rem Recreate BCD
bcdboot C:\Windows /s S: /f UEFI
exit
Rem Done!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment