| 1 |
Incompatible Filesystem Settings on Host vs. Image |
| 2 |
================================================== |
| 3 |
|
| 4 |
.. note:: **Abstract** |
| 5 |
|
| 6 |
This page provides further information on how to solve |
| 7 |
image boot problems if the filesystem toolchain on |
| 8 |
the image build host is incompatible with the |
| 9 |
image's target distribution. |
| 10 |
|
| 11 |
When {kiwi} builds an image that requests the creation of a |
| 12 |
filesystem, the required filesystem creation tool, for |
| 13 |
example, `mkfs.xfs`, is called from the host on which {kiwi} |
| 14 |
is running. It is expected that the generated filesystem |
| 15 |
is compatible with the image's target distribution. This |
| 16 |
expectation is not always correct and depends on the |
| 17 |
compatibility of the filesystem default settings between |
| 18 |
build host and image target. We know about the following |
| 19 |
settings that cause an incompatible filesystem, which |
| 20 |
will not be able to be used on boot: |
| 21 |
|
| 22 |
Ext[2,3,4] |
| 23 |
Check `/etc/mke2fs.conf` on the build host and make sure |
| 24 |
the configured `inode_size` is the same as the setting used |
| 25 |
for the target image. To solve an issue of this type, use |
| 26 |
the following filesystem creation option in your {kiwi} |
| 27 |
image configuration: |
| 28 |
|
| 29 |
.. code:: xml |
| 30 |
|
| 31 |
<type fscreateoptions="-I inode-size"/> |
| 32 |
|
| 33 |
XFS |
| 34 |
Check the XFS metadata setup on the build host and make sure |
| 35 |
the settings are compatible with the target image. XFS has the |
| 36 |
default settings compiled-in, thus it might be needed to build |
| 37 |
the image first and use the `xfs_info` tool in a `disk.sh` script |
| 38 |
to fetch the settings at the build time of the image. We know from |
| 39 |
community reports that the setting `sparse=1` will cause issues |
| 40 |
on older versions of grub's xfs module, which does not know how |
| 41 |
to handle this setting properly. To solve an issue of this type, |
| 42 |
use the following filesystem creation option in your |
| 43 |
{kiwi} image configuration: |
| 44 |
|
| 45 |
.. code:: xml |
| 46 |
|
| 47 |
<type fscreateoptions="-i sparse=0"/> |
| 48 |
|
| 49 |
btrfs |
| 50 |
btrfs and default page sizes (4k vs 64k). By default, btrfs |
| 51 |
autodetects the sector size according to the used kernel page |
| 52 |
size. If the sector size differs from the page size, the |
| 53 |
created filesystem cannot be mounted by the image's target |
| 54 |
kernel. If there is a different kernel page size between the |
| 55 |
kernel on the system the image is built on and the later |
| 56 |
kernel used for the image, it's required to specify the |
| 57 |
filesystem sector size to match with the kernel page size |
| 58 |
of the kernel used for the image. This can be done as in |
| 59 |
the following example: |
| 60 |
|
| 61 |
.. code:: xml |
| 62 |
|
| 63 |
<type fscreateoptions="--sectorsize 4k"/> |
| 64 |
|
| 65 |
.. note:: |
| 66 |
|
| 67 |
There can be more inconsistencies in the area of filesystems |
| 68 |
that we have not listed here. In general, it's advisable to |
| 69 |
build the image in a compatible environment. At best, the |
| 70 |
build host distribution is of the same major Linux version |
| 71 |
as the image target. For this purpose, {kiwi} provides the |
| 72 |
so-called `boxed-plugin`. Further details can be found |
| 73 |
in :ref:`self_contained` |