With the possibility to switch off setting the default volume
an issue at other parts in the kiwi code which mounted the
btrfs based system were uncovered. Without any default volume
set it's required to transport the root volume if different
from / and pass the respective subvol= option to the mount.
This commit fixes it at the places where kiwi trusted btrfs
to have a correct default volume set
Allow to specify an optional <bootloadersettings> element
inside of the <bootloader> section. The information is used to
specify custom arguments for the tools called in a bootloader
setup procedure, e.g shim-install, grub-install or grub-mkconfig.
kiwi does not judge on the given parameters and if the provided
data is effectively used depends on the individual bootloader
implementation. In this commit the data will be effectively
handled if bootloader="grub2" is configured. More precisely
the custom additions to support SUSE's TPM model with grub2
can be configured as follows:
<bootloadersettings>
<shimoption name="--suse-enable-tpm"/>
<installoption name="--suse-enable-tpm"/>
<configoption name="--set-trusted-boot"/>
</bootloadersettings>
This Fixes#2224
Bootloaders implementing the Boot Loader Spec (BLS) are not
directly compatible with the original Bootloader Class design
in kiwi. Because of that an interface class which translates
the original API into calls following BLS was added. This allows
us to keep the implementations in the Builder classes and the
public BootLoader interface untouched. In addition to the BLS
API an implementation to support the systemd-boot loader is
part of this commit too.
An example type definition to use systemd-boot with an EFI
disk image type looks like the following:
<type image="oem" filesystem="xfs" firmware="efi" bootloader="systemd_boot" efipartsize="200"/>
The implementation uses bootctl and kernel-install tools
provided from systemd and expects a proper integration
of systemd-boot by the distribution maintainers
This Fixes#1935
The modifications in this commit allows the unit tests
to run on both, pytest 6.x (nose test layout) and the new
pytest 7.x (xunit test layout). This Fixes#2072 in a
much nicer way. Thanks much to @smarlowucf
The option --target-arch allows to set the architecture
used to build the image. By default this is the host
architecture. Please note, if the specified architecture
name does not match the host architecture and is therefore
requesting a cross architecture image build, it's important
to understand that for this process to work a preparatory
step to support the image architecture and binary format
on the building host is required and is not considered a
responsibility of kiwi. There will be a followup effort
on providing a plugin for kiwi which should be used to
manage the needed binfmt settings for cross arch image
builds
This commit refactors grub2 installation method to split it in two
parts. Former grub2.install method was meant to run the grub2-install
tool, however, in addition it was also running the secure boot
installation shim-install. The install method in KIWI is skipped for
those architectures and firmware combinations for which bios support
doesn't exist. This was leading to skip the secure boot installation.
The current approach strips the secure boot installation logic from the
grub2.install method, so skipping the install method does not
automatically result in skipping the secure boot installation.
Fixes bsc#1182211
On s390 and in CDL mode (4k DASD) the call of grub2-install
does not work because grub2-install is not able to identify
a 4k fdasd partitioned loop device as a grub supported device
and fails. As grub2-install is only used to invoke
grub2-zipl-setup and has no other job to do we can
circumvent this problem by directly calling grub2-zipl-setup
instead. Also delete LDL mode support, IBM no longer supports
this
This changes the s390 support on several stages:
1) On s390 the boot process is based on zipl which boots into an
initrd from which a userspace grub process is started to support
the grub capabilities. The implementation of this concept is
provided via the grub2-s390x-emu package. Once installed the
setup of the bootloader is done via the grub2-mkconfig and
grub2-install commands and therefore from a caller perspective
the same as with any other grub2 setup process. For kiwi this
means no extra zipl bootloader target code is needed. Therefore
this commit deletes the zipl setup from kiwi and puts on
the standard grub2 process. This Fixes bsc#1170863
2) To support different targettypes the grub2-s390x-emu provided
zipl template must be adapted. Parts of the former zipl bootloader
setup therefore now applies to an update of the zipl2grub
template file
3) Support for CDL/LDL DASD targets has been disabled in the schema
When testing 4k devices and a respective zipl2grub template
setup for CDL/LDL targettype it has turned out that grub2-install
is not able to run on such a device. My assumption is that
the device code in grub2-install does not work for 4k devices
with an fdasd created partition table. As this needs further
investigations and most probably adaptions on the grub toolchain
for s390, we disabled the setup of these modes for now.
emulated DASD (FBA) and SCSI targets stays supported.
This commit refactors BootLoaderInstall class to make it a proper
factory class. In addition type hints are added for the constructor
method.
Related to #1498
To prevent shim-install from calling grub2-install in uefi mode
kiwi temporary replaces the tool by a noop. This acts as a
workaround for an issue in shim-install. However the workaround
left a file copy of grub2-install in the system which should
not happen. This commit Fixes bsc#1173226 and Fixes#1490
This commit refactors the use of Path.which in several parts of the
code. Since dd4d2ed78 the Path utility is capable to run Path.which
on certain chroot env, thus no need to adapt the PATH environment
variable.
Fixes#1281
The preparation to call zipl and the call itself were wrong.
For whatever reason the kernel image the initrd are moved
to another location prior to calling zipl. That move broke
the system because no kernel/initrd existed at the expected
place anymore. In addition the zipl call itself was issued
from a the wrong directory. Also no config file was written
as an after effect of the refactoring in Issue #1194. This
Fixes#1173 and bsc#1156694