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
Fedora now uses a BLS configuration by default, but this is not supported
by all distributions. So check if is supported by the grub2-mkconfig tool
and only enable the option if that's the case.
Fixes: #1248
This commit makes sure the chrooted operations of over a loop device
including btrfs subvolumes and root as an snapshot include the
`/.snapshots` subvolume mount. This is necessary for certain operations
that depend on the layout, e.g. grub configuration using `grub2-mkconfig`.
This commit makes home attribute of users definition optional. This way
the home directory is created according to the distribution defaults.
Note that `-m` option is passed to user add, thus the home directory is
requested to be created even without having an explicit home path
defined.
Fixes#1025
In case of an overlay root system via overlayroot="true" all parts
of the rootfs are read-only by squashfs except for the extra boot
partition. However tools like grub's mkconfig creates temporary
files at call time and therefore /tmp needs to be writable during
the call time of the tools. Related to Issue #1194
For ISO images that are EFI bootable as well as for EFI
secure boot configurations that are not based on shim-install
kiwi provides a fallback code that copies the grub config file
to the efi/efi-vendor boot path. This fallback code was broken
because of the recent change to let grub2 mkconfig create the
config file. The call of grub2 mkconfig happens at a later
stage which required an adaption of the fallback mechanism.
This is related to Issue #1194
Due to the change of using grub2-mkconfig the way custom kiwi
initrd file names are handled doesn't work anymore. grub2-mkconfig
is not able to cope with the names kiwi used when creating custom
kiwi initrd's (initrd.vmx). Thus the same naming code as used
for the dracut initrd system has to apply for the custom kiwi
initrd code as well. This commit moves the name handling into
the baseclass because the same naming schema now applies to
both initrd systems.
Instead of creating a template based grub config file, use
grub2-mkconfig to create the config file during the build
process. This commit changes from config template to grub2
tooling for the disk based image types vmx and oem
This Fixes#1194
Not all distributions provides the grub linuxefi module anymore.
This means a static list for building an efi grub image if needed
is no longer appropriate. This patch changes the module handling
at the following places
1. Use linuxefi for building custom efi modules only if present
on the host system
2. Use linuxefi related grub2-mkconfig variables only if the
host grub2-mkconfig implementation supports it
3. Prevent building custom efi image on Fedora by extending
the search path for the distro provided efi image and also
adapt the spec file accordingly
This commit removes the use of @patch_open decorator
in favor of directly patching 'builtins.open' and use
mock.mock_open utility to mock the context manager.
Related to #1128
This commit makes sure the generated sha256 file in a 'kiwi result
bundle' call includes the filename with the correct extension. For
compressed files it was omiting the suffix that included during the
compression.
Fixes#1223 and related to bsc#1139915
On older versions of zypper the path /var/lib/rpm was hardcoded
and not used from the rpm macro definition. For such systems and
to support them properly on hosts that have the rpm database
already moved a compat link was created. However if the host has
the rpm database at /var/lib/rpm the link doesn't make sense.
This patch fixes this and therefore bsc#1150190
An image that is configured with an encrypted root including /boot
includes a /.root.keyfile in initrd to let dracut/systemd decrypt
the root and mount it without asking the password. On rebuild of
the initrd, dracut has no configuration that tells it to include
the /.root.keyfile again. This patch adds that configuration and
Fixes#1192
The message that display the selected source type was
using the former metalink text which is wrong. This
patch corrects the message and only display it if a
sourcetype was specified
Repository source paths can be more than just a baseurl.
There is also the opportunity to point to a metalink
file or a mirrorlist. In both cases the packagemanager
needs to know the type of this target. Therefore a new
attribute called sourcetype exists which allows to
specify the type the repo path uri is associated with.
Currently the dnf repository class is the only one that
makes use of the information. This change is required to
support Fedora >= 30 images. I also expect this concept
to be used by other distributions in the future
Use raises as context manager instead of a method decorator.
This clearly identifies which code part is expected to raise
an exception. Related to Issue #1128
This commmit adds additional information for the image and pxeboot files
that are part of the install tarball in OEM PXE deployments. This way all
files inside the install tarball include the following pattern
<image-name>.<arch>-<version>
at the same time anyfile prefix and suffix remains unchanged.
Fixes#1147
This commit fixes a regression introduced in 07ea23a4. In OEM images
the dracut modules were not properly omitted as the code was evaluating
the wrong variable.
Fixes#1201
This commit swaps the order of the command in gpt to mbr convertion
in partitioner.gpt.set_mbr method.
sgdisk by default converts the partition table from MBR to GPT in memory.
The change is never applied unless you provide the -g option forcing to
overwrite the partition table format. If sgdisk does the convertion in
memory and the user does not provide the -g flag it returns an error
code.
The solution applied in this commit is to just run the GPT to MBR
convertion as the last sgdisk command and change partition type before
running the convertion.
With this commit dracut modules won't be installed by default
in the initrd unless they are requested by the commandline calling
dracut or by a dracut configuration file.
Fixes bsc#1142899 bsc#1136444
Fixes#1103
The method is expected to return a bool value. In fact it
returned a list. An empty list is evalutated as False in
python, a list with content as True. So the way the method
is used is correct but the return value should be a real
bool value to match the docs and expectations. Also the
unit test for this code was wrong. This Fixes#1175
In addition to fstab append and patch features we also allow
an fstab.script file that is called chrooted. The change is
needed to support overlay mounting of filesystems as part
of the initrd. If system filesystems needs to be changed in
a way that they can be used in an overlay mount, the standard
mount entry has to take the x-initrd.mount capability which
requires a modification of the fstab which is cumbersome to
handle as a patch file. This concept is currently used as
part of the MicroOS project in SUSE and is applied in the
integration test build maintained for this target. This
Fixes bsc#1129566
For non EFI boot grub2-install has code which gets activated
through the GRUB_ENABLE_CRYPTODISK setting. However for the
EFI boot case no installation of boot code is needed and
therefore the grub earlyboot script has to run cryptomount
We supported luks encrypted images with the exception of the
boot partition because grub was not able to read from an
encrypted device at that time. Since some time grub is able
to read from an encrypted partition and this commit add
support for it. With this patch luks encrypted images will
no longer create an extra boot partition and the entire
system will be encrypted. The opening of the luks container
happens on the grub level only once. Customers can still
specify to use an unencrypted extra boot partition with the
bootpartition="true" flag. In this case the opening of the
luks containers happens on the systemd level as before.
This is related to Issue #1162
rsync's "compress" option just does not make any sense when rsync is
used to copy files locally, it only increases CPU usage and slows down
the process ;-)
The pxe image type builds a simple filesystem image plus a
custom initrd. That initrd is usually build from the kiwi
netboot image descriptions which implements a workflow to
fetch the filesystem image and deploy it as rootfs for a
pxe client. User who wants to implement their own handling
of the rootfs image in e.g a custom dracut module were not
able to build this image type because we did not allow
the initrd_system attribute for the pxe type
This commit is two fold:
* Refactor PXE builder to make use of the ArchiveTar instead of
directly calling tar command.
* Do not compress PXE tarball if the contained image is already
compressed according the type's compressed attribute.
Related to #1039
Along with the fsmountoptions attribute there is now also the
fscreateoptions attribute which allows to control the options
used for creating the filesystem. Please note, it's not kiwi's
task to validate that the given option string is supported
by the selected filesystem. This means providing wrong values
here will cause the build to fail at the time the filesystem
gets created. This Fixes#1109