Commit Graph

34 Commits

Author SHA1 Message Date
Marcus Schäfer
726eeacee5
Fixed zipl bootloader setup for s390 images
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
2019-11-14 12:01:06 +01:00
Marcus Schäfer
bdb7123fa1
Refactor use of logging facility
Use getLogger method instead of a global log object
Also use caplog fixture to capture log messages in
unit tests. This Fixes #1244
2019-10-23 17:54:27 +02:00
Dan Čermák
b015b91679
Stop inheriting from object
This is no longer required in Python3
2019-08-22 15:43:27 +02:00
Marcus Schäfer
0985e21117
Support alternative EFI and grub modules paths
In SUSE products EFI binaries are historically located in
/usr/lib*/efi. In a recent move to package grub2 as noarch
fate#326960, a collision between x86_64 and aarch64 has been
identified, as both place platform-specific files in the same
spot. To rectify this, a new location was devised:
/usr/share/efi/$(uname -m). At the same time /usr/lib/grub2 will
move to /usr/share/grub2. This Fixes #924
2019-01-28 16:27:48 +01:00
Marcus Schäfer
f8c73e2ca3
Cleanup api doc strings
This cleans up and fixes the api documentation for
the public interface of the projects boot source code
files and Fixes #700
2018-04-17 17:56:13 +02:00
Marcus Schäfer
50ab40c8e1 Support overlay disk images via dracut
Using the kiwi-overlay module to boot up systems configured
with the overlayroot="true" attribute in the system image
XML configuration. Fixes #65
2017-09-06 17:08:10 +02:00
Marcus Schäfer
2524d19729 Added fallback setup for grub secure boot
The current implementation is based on the presence of the
shim-install tool. This tool does not exist on all distributions.
In case shim-install is not present a kiwi fallback solution
applies. Fixes #337
2017-06-07 23:10:01 +02:00
Marcus Schäfer
20d12a18c2 Fixup grub2 setup and tool calls
Depending on the distribution the grub tools are either named
grub2-tool or grub-tool. Additionally the grub configuration
data is expected to live in boot/grub2 or boot/grub. This commit
handles the tool calls and also the grub boot directory setup
in a generic way
2017-04-04 16:17:31 +02:00
Marcus Schäfer
1a5257a0e8 Prevent use of project relative import statements
For details on the motivation of this change please visit:
https://wiki.python.org/moin/FutureProofPython
2017-03-07 11:23:37 +01:00
Marcus Schäfer
ecb07e10f7 Make sure bootenv can be initialized
An existing grub bootenv file should be deleted prior to calling
grub2-install in order to allow grub2 to create a new correct
bootenv file
2017-02-24 14:50:59 +01:00
David Cassany
0cfcf2fb9a LVM volumes management during grub2 install
During the grub2 install process volumes were not mounted properly,
a proper mount order was not taken into consideration and LV device
information was not given by the method get_volumes in VolumeManger.
This commit forces the mount (and umount) operations to be done in
coherent order and also modifies the get_volumes method in order
to return the device associated to each volume.
2016-11-30 15:54:34 +01:00
Marcus Schäfer
810535b05c
Fixed busy mount state
Make sure subvolumes are umounted first. This prevents a
busy state in a partition setup with an extra boot
partition
2016-11-15 12:16:51 +01:00
Marcus Schäfer
1f85063007 Handle target_removable in kiwi disk builder 2016-10-14 08:31:41 +02:00
Marcus Schäfer
bb26fc71b7 Call grub2-install as chroot operation
In addition to the chrooted call make sure all volumes from
the volume manager (if used) are mounted at call time
2016-09-27 15:40:43 +02:00
Marcus Schäfer
72341dbfb0
Mount boot volumes on grub install
If there are volumes below /boot they need to be mounted before
grub2-install / shim-install is called in order to make sure all
data is available in the volume
2016-09-26 16:53:11 +02:00
Marcus Schäfer
630f26e350 Preserve timestamp on grub2-install copy
In order to workaround the bug in shim-install which
unnecessarily calls grub2-install we replace the binary
by a noop before calling shim-install. However all file
attributes of the grub2-install binary, timestamp, modes,
etc should stay untouched (bnc#993825)
2016-08-16 10:58:43 +02:00
Marcus Schäfer
be36f103b4
Style fixes: E275 missing whitespace after keyword 2016-06-16 10:33:54 +02:00
Marcus Schäfer
400468a455 Cleanup use of temporary directories
All mkdtemp created directories are created with the 'kiwi_'
prefix. In addition all code parts which leaves tmpdirs in
the system after kiwi is done were fixed
2016-05-04 11:05:03 +02:00
Marcus Schäfer
2f1e892fb6 Make grub2 installation path lookup dynamic
Not all linux systems installs grub2 below /usr/lib/grub2
For example RHEL7 packages it below /usr/lib/grub. Therefore
kiwi needs to be flexible with this path
2016-04-25 12:50:10 +02:00
Marcus Schäfer
4f5322f618
Fixed typo 2016-04-14 16:34:39 +02:00
Marcus Schäfer
b24f500549
Complete bootloader inline API documentation
References #49
2016-04-14 14:25:49 +02:00
Marcus Schäfer
e2966efe63
Complete bootloader install interface 2016-04-13 11:42:28 +02:00
Marcus Schäfer
48695c6125
Update bootloader/install inline API documentation
References #49
2016-04-13 11:40:25 +02:00
Marcus Schäfer
f1c5531e24
Refactor InstallBootLoaderGrub2 constructor
architecture dependant device setup belongs to the install
method where it is actually needed. That prevents the
construction of the instance to be architecture specific
2016-03-24 11:14:14 +01:00
Marcus Schäfer
7ce8a3d8f5
add multiboot grub module only on demand
multiboot is only needed for self build grub images in Xen
guest mode
2016-03-23 16:52:34 +01:00
Marcus Schäfer
b9eb921b50
Fixed use of dracut initrd system for arm platform 2016-03-17 16:31:53 +01:00
Marcus Schäfer
f97dbf6fda
Refactor grub2 EFI support
EFI support was target specific to the x86_64 architecture
This commit changes the structure to allow more architectures
supporting EFI. Thus the arm64 EFI support has been added
as a plus
2016-03-16 12:57:25 +01:00
Marcus Schäfer
d7e364e50b
Fixed boot mount path at grub2 install 2016-03-11 16:23:24 +01:00
Marcus Schäfer
abfd0bf57e Revert "Revert "Call shim-install with --removable""
Try again using --removable for shim-install
This reverts commit e3d7d0239d.
2016-03-11 16:11:57 +01:00
Marcus Schäfer
e3d7d0239d Revert "Call shim-install with --removable"
With --removable shim-install does not work for image building
This reverts commit d03baa9ee1.
2016-03-11 15:30:00 +01:00
Marcus Schäfer
d03baa9ee1
Call shim-install with --removable
The --removable is to prevent shim-install from writing host's
uefi boot entry by pretending itself as removable disk
2016-03-10 11:29:28 +01:00
Marcus Schäfer
1e9b6dd9d6 Use shim-install to setup EFI secure boot 2016-03-09 18:12:38 +01:00
Dinar Valeev
24c27b8a97 Add support for POWER architecture
Implements requirements for the partition and bootloader setup
in order to build images for ppc64 architectures. Fixes #18
2016-03-08 11:54:09 +01:00
Thomas Schraitle
45bc5a03a7 Refactor into subpackage to fix #23
Codecoverage are 100% and tests are green

Changes:
* Refactor archive_*.py -> archive subpackage
* Refactor partitioner_*.py -> partitioner subpackage
* Refactor package_manager_*.py -> package_manager/ subpackage
* Refactor bootloader_config*.py -> bootloader/config/ subpackage
* Refactor bootloader_template*.py -> bootloader/template/ subpackage
* Refactor bootloader_install*.py -> bootloader/install/ subpackage
* Refactor repository*.py -> repository/ subpackage
* Refactor filesystem*.py -> filesystem/ subpackage
* Refactor dist_*.py -> dist/dformat subpackage
  The name `dformat` as package name is needed to avoid any name
  conflicts with the built-in function `format`.
* Refactor volume_manager*.py -> volume_manager/ subpackage
* Refactor boot_image*.py -> boot/image/ subpackage
2016-02-27 10:31:31 +01:00