How to boot an installation kernel via kexec for an UEFI autoyast installation ?

Hello to all,

inside the context of the opensource clientmanagement system opsi.org I try to install a opensuse 13.2 via autoyast on a uefi system.
Therefore a standard installation bootimage is booted via pxe and elilo. This bootimage is aware about the uefi environment (efibootmgr works).
This bootimage create now the autoinstall.xml file for the opensuse installation. From the Original opensuse installation ISO the kernel and initrd is
now booted via kexec to to start the opensuse installation. Everything looks ok - but a non uefi system will be installed.
The via kexec booted system is not aware about the UEFI environment.

So what have to be done, that the via kexec booted kernel is aware about the uefi environment and creates the correct partition scheme and the correct bootloader ?
(I’m talking not about secure boot - only about UEFI)

Thanks in advance
d.oertel

Commit that adds support for kexec on UEFI appeared first in 3.17 upstream kernel so unless it was backported to openSUSE, it is not expected to work if your bootimage is using 13.2. You may try to use more recent kernel for your bootimage though.

Thanks for the reply,

the bootimage is based on Ubuntu 14.04 with a vanilla kernel 4.1.0.
Is there something to do on the (kexec) kernel command line or must both kernel be >= 3.17 ?
Are there requirements to the kexec version ?

thanks
d.oertel

Is secure boot enabled?

secure boot is disabled

d.oertel

As far as I can tell, EFI support appeared in kexec-tools 2.0.5 and Ubuntu 14.04 includes 2.0.6 … you say “installation for BIOS” which is not entirely clear. Could you go to terminal in a kernel you start with kexec and check whether /sys/firmware/efi is present?

Hi,

no efi at /sys/firmware
only acpi and memmap
The resulting system is not bootable because the created
partions are not GPT,
no UEFI partion scheme
and there is no UEFI bootloader installed.

d.oertel

Hmm … I tested kexec in TW in EFI VM and it worked - it came up in EFI mode. I would try to kexec Ubuntu kernel first - does it work?

you give me hope !
booting an Ubuntu 15.10 (4.2) Netboot Kernel from my bootimage leads to no /sys/firmware/efi.
The bootimage it self has a /sys/firmware/efi.
So if it works with TW (decoded to: openSuse Tumbleweed),
I have hope that it will work if I update my bootimage
(perhaps is kexec-tools 2.0.6 not enough …)
Did you just made an kexec reboot on a running TW ?

regards

d.oertel

Yes. kexec --reuse-cmdline --initrd /boot/initrd /boot/vmlinuz