I deleted /boot/efi (while attempting to install archlinux).

There is one harddrive, 750GB, /dev/sda). The partitions are

/dev/sda1 ntfs 315MB

/dev/sda2 EFIboot 105MB <=== this got deleted

/dev/sda3 ? 135MB

/dev/sda4 ntfs 626GB <======= windows 8

/dev/sda5 ntfs

/dev/sda6 biosgrub 1MB ?

/dev/sda7 lvm 110GB <======== for linux

/dev/sda8 swap 13GB

Windows 8 still installed on /dev/sda4

How do I recreate / repair the /boot/efi (/dev/sda2) ?

  1. Boot Windows 8 install or recovery DVD/USB - run StartUp Repair (Automated Repair), this will recreate Windows boot files on EFI System partition (boot DVD/USB in EFI mode !).

  2. Reinstall Linux in EFI mode !!! (boot Linux DVD/USB in EFI mode!)

Maybe just reinstalling GRUB in EFI mode would be enough (don't know exactly if this works on initial Linux installation in BIOS mode, probably yes)

(The first time you installed Linux while booted in BIOS mode - therefore you have "bios grub" in sda6 partition which is needed for hybrid booting = BIOS booting from GPT disk)

  • 1. Booting into Windows 8 using the DVD did not work (neither the reset, recover nor automatic option worked). – robor78 Aug 19 '14 at 9:44
  • 2. Reinstalling linux did not work on its own. I needed to manually copy the windows efi files back into the boot partition. – robor78 Aug 19 '14 at 10:09

This is how I fixed the problem.

  1. Reinstalled Linux (leaving all the partitions).
  2. Booted into linux.
  3. Mounted the windows ntfs partition (mount -t ntfs /dev/sda4 /media/C). (Installed apt-get install ntfs-3g but this is only required for writing to ntfs.) )
  4. Searched for all .efi files in /media/c (find -name '.efi' /media/c) (there were many hits, most in c:/windows/boot/efi and in c:/windows/panther/rollback/efi)
  5. Copied the entire folder c:/windows/panther/rollback/efi/microsoft to /boot/efi/EFI/microsoft
  6. In /boot/grub/grub.cfg added

    menuentry 'win8' { set root='hd2,gpt2' chainloader /EFI/Microsoft/Boot/bootmgfw.efi boot }

  7. I guessed / googled that bootmgfw.efi is the correct .efi.

  8. Rebooted and selected win8 in the grub menu.

As an alternative solution, I also installed refind. In the config file /boot/efi/EFI/refind/refind.conf I enabled (uncommented) these settings (I think only point 4 was required):

  1. windows_recovery_files LRS_ESP:/EFI/Microsoft/Boot/bootmgr.efi
  2. uefi_deep_legacy_scan true
  3. also_scan_dirs boot,ESP2:EFI/linux/kernels
  4. Add menuentry

    menuentry "Windows 8" { loader \EFI\Microsoft\Boot\bootx64.efi disabled }

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.