KIWI - Appliance Builder Next Generation EL8 fork
Go to file
Marcus Schäfer ca75086128
Prevent swap partition to be the last one
In an OEM deployment that requested the creation of a swap
partition via <oem-swap> that swap partition was created
at first boot and was always the last partition on the disk.
This was required because it could not be placed before
any other partition without destroying those partition
contents. This process leaves the system in an inflexible
condition if the storage device can change its geometry
dynamicly as it's the case for SAN systems. The typical
deployment target for OEM images are SAN storage clusters
and it's cumbersome to resize the root partition if swap
is last.

This commit Fixes #1231 and changes the handling of swap if
requested via <oem-swap> as follows:

1. The swap space is created as part of the image build process
   and no longer on first boot of the image via dracut code.
   This increases the size of the non compressed .raw disk image
   by the configured swap space size or the default. The
   compressed versions are not affected since zero initialized
   swap space compresses to almost no space. Deployment of
   the image however also deploys the swap partition which
   increases deployment time. For big swap configurations
   it's advisable to switch off image verification via
   oem-skip-verify. For very big swap configurations it's
   also recommended to prevent kiwi from adding them as part
   of the image and let them be created on first boot via
   a systemd service that e.g places a swap file, or creates
   a swap volume when possible such that the fexibility to
   resize the rootfs is still available.

2. The setup of the swap space is now explicit. It's no longer
   calculated by twice times RAM size because on newer machines
   this could lead to huge numbers. Either the kiwi encoded
   default swap size applies or the user configured value.

3. LVM based oem disks creates the swap space as logical volume.
   The volume is created as part of the image build process
   and no longer on first boot. The swap volume at build time
   of the image is of a minimal size and gets resized on first
   boot.

4. The move of the swap creation into the builder code also
   handles swap per configured device persistency schema like
   any other devices. This means by default swap is mounted
   via by-uuid name and thus also Fixes #1259
2019-11-25 12:05:57 +01:00
.github Update issue template 2017-09-25 16:53:27 +02:00
build-tests Adapt test-image-oem integration test for s390 2019-11-14 16:58:53 +01:00
doc Bump version: 9.18.34 → 9.18.35 2019-11-20 12:37:19 +01:00
dracut/modules.d Prevent swap partition to be the last one 2019-11-25 12:05:57 +01:00
helper Added helper script to test status of test builds 2019-10-24 10:36:43 +02:00
kiwi Prevent swap partition to be the last one 2019-11-25 12:05:57 +01:00
package Add default /etc/kiwi.yml file 2019-10-28 16:44:27 +01:00
test Prevent swap partition to be the last one 2019-11-25 12:05:57 +01:00
tools Update kiwi tools README 2018-09-21 16:45:19 +02:00
.bumpversion.cfg Bump version: 9.18.34 → 9.18.35 2019-11-20 12:37:19 +01:00
.codacy.yml Do not run Codacy analysis on tests 2018-07-20 12:37:41 +02:00
.gitattributes Set ident export-subst git attribute on version.py 2016-04-21 16:21:00 +02:00
.gitignore Update gitignore 2018-03-13 10:00:01 +01:00
.gitlab-ci.yml Fix gitlab CI pipeline 2019-11-06 13:40:09 +01:00
.obs_test Update arm integration test 2018-05-08 16:31:57 +02:00
.obs_test_status Fixed make obs_test_status 2018-07-31 09:00:28 +02:00
.travis.yml Drop support for python2 2019-07-10 11:58:57 +02:00
.virtualenv.dev-requirements.txt Version 2.29.24 fixes the pattern problem 2019-10-21 11:28:23 +02:00
.virtualenv.requirements.txt Drop support for python2 2019-07-10 11:58:57 +02:00
kiwi.yml Add default /etc/kiwi.yml file 2019-10-28 16:44:27 +01:00
LICENSE Fixed GPL license text to match headers and spec 2017-04-28 12:13:30 +02:00
Makefile Add default /etc/kiwi.yml file 2019-10-28 16:44:27 +01:00
MANIFEST.in Add default /etc/kiwi.yml file 2019-10-28 16:44:27 +01:00
README.rst Update documentation references 2019-07-12 09:45:42 +02:00
setup.cfg Remove universal flag 2019-10-08 13:43:54 +02:00
setup.py Use kiwi-ng and kiwicompat as console_scripts 2019-10-15 15:08:07 +02:00
tox.ini Update contributing chapter 2019-10-02 09:52:04 +02:00

KIWI - Next Generation
======================

.. |Build Status| image:: https://travis-ci.com/OSInside/kiwi.svg?branch=master
   :target: https://travis-ci.com/OSInside/kiwi
.. |GitLab CI Pipeline| image:: https://gitlab.com/schaefi/kiwi-ci/badges/master/pipeline.svg
   :target: https://gitlab.com/schaefi/kiwi-ci/pipelines
.. |Health| image:: https://api.codacy.com/project/badge/Grade/8ebd8ce362294fabb0870f50358e564f
   :target: https://www.codacy.com/app/Appliances/kiwi?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=OSInside/kiwi&amp;utm_campaign=Badge_Grade
.. |Doc| replace:: `Documentation <https://osinside.github.io/kiwi/>`__
.. |Installation| replace:: `Installation <https://osinside.github.io/kiwi/installation.html>`__
.. |Contributing| replace:: `Contributing <https://osinside.github.io/kiwi/development.html>`__
.. |Donate| image:: https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif
   :target: https://www.paypal.me/SchaeferMarcus

|Build Status| |GitLab CI Pipeline| |Health|

**KIWI, the OS image and appliance builder.**

* |Installation|

* |Contributing|

* |Doc|

If this project reduced your development time feel free to buy me a coffee.

|Donate|