# Kernel with efistub fails to boot after Windows 10 upgrade

## nagmat84

Yesterday, Windows 10 upgraded to version 1709. Since then Linux does not boot anymore.

I have the following configuration: UEFI boot (no CSM), refind as the boot manager, Windows 10 and Linux kernel with efistub support. The UEFI starts refind and then refind either invokes the Windows 10 or Linux EFI-bootloader. Since the Windows 10 upgrade, refind is still started from the UEFI but if I pick Linux as an option I get

```
EFI stub: ERROR: Failed to read file

Trying to load files to higher address

EFI stub: ERROR: Failed to read file
```

The same happens, if I try to directly load the Linux kernel via the boot manager that is integrated into my UEFI, i.e. if I bypass refind.

Initially, I thought that my Linux kernel image has become corrupted (for some unknown reason). So I jumped into the EFI shell and copied the kernel configuration onto an external USB drive. (Luckily, I always keep a copy of the kernel config in the ESP partition alongside the kernel image itself.) I used that config file to re-compile the same kernel again on another machine and then copied back the new kernel image. However, the fresh kernel image was binary identical to the existing kernel image. There has been no file corruption and the error still remains.

Any ideas?

----------

## V-Li

I noticed the exact same message after the Windows upgrade, the installed kernel has been 4.12.12, but from the boot menu I could start an old entry for 4.12.5 just fine.  So I updated to 4.14.8-r1 and hope to get EFI in line again.  Unfortunately the same message appears, while 4.12.5 still boots fine.

My command line is the following, Initramfs is dracut-created.

```

efibootmgr --create --part 1 --label "Gentoo 4.14.8.1" --loader "\EFI\Boot\kernel-4.14.8-gentoo" -u initrd="\\EFI\\Boot\\initramfs-4.12.5"
```

----------

## charles17

 *nagmat84 wrote:*   

> (Luckily, I always keep a copy of the kernel config in the ESP partition alongside the kernel image itself.) 

 

Make sure to have a proper setup of your ESP with the Gentoo kernel stub in the Gentoo subdirectory.  Then create an UEFI boot item for it.  Check if it can boot from the UEFi menu directly.

----------

## V-Li

What I can tell is that the kernel file is loaded when I omit the "-u" option in efibootmgr.  Now I have at least a kernel panic to work with.

----------

## charles17

 *V-Li wrote:*   

> What I can tell is that the kernel file is loaded when I omit the "-u" option in efibootmgr.  Now I have at least a kernel panic to work with.

 efibootmgr?  Did you forget to mount -o remount,rw?

----------

## V-Li

No, this would throw an error message right away.  I can generate an entry in UEFI, but it either shows above mentioned "File not found" (with -u option) or a kernel panic (root not found) (without -u option).  So the latter brings me further and I suspect a problem with my encrypted filesystem and the dracut initramfs.  Up to now I did not have enough free time in one go to further debug as long as my old kernel boots.

----------

