Add EFI stub to vmlinuz

0

Is it possible to add EFI stub to vmlinuz? I've been using ipxe for network booting installation images, problem is that in EFI mode ipxe is only able to boot newer kernels with EFI stub enabled.

So if i try to boot RHEL 7, it boots fine in both EFI and legacy enviorment, but if i try the same with RHEL 6.7 it only boots in legacy. From what i've read on ipxe forum, the kernel needs to have EFI stub enabled. So is it possible to take the kernel (vmlinuz) that came with the distribution and add/enable EFI stub?

Alex Zel

Posted 2015-12-28T12:44:49.263

Reputation: 183

I am not sure I understand what you wish, because it seems to me this Web page, https://wiki.archlinux.org/index.php/EFISTUB, explains it all. If there is something this leaves out, could you clarify it?

– MariusMatutiae – 2015-12-28T15:42:32.863

AFAIK, the only way to add the EFI stub loader to a Linux kernel is to recompile the kernel. As the feature was added with the 3.3.0 kernel, it's unlikely you'd really want to use anything that lacks this feature, unless perhaps the distribution omitted it for some reason. – Rod Smith – 2016-01-04T22:49:30.770

Answers

1

There's no way to do that. You have to recompile the kernel. A kernel is produced by a linker, you cannot touch it. Many times there are even compressed binaries.

Pat

Posted 2015-12-28T12:44:49.263

Reputation: 2 593