20.59. kb-00058: Image Deploy with Curtin Partitions and XFS

20.59.1. Knowledge Base Article: kb-00058

20.59.2. Description

When doing image-deploy, there are a couple of errors that can be generated when using XFS. These include:

  • grub-install fails because of bad filesystem type
  • Missing / bad rootfs or other filesystem on reboot into running system.

This can happen when using Sledgehammer to image deploy Centos 7 or Ubuntu 18.04 or younger images.

The problem is that Centos 8 has a newer version of XFS that is incompatible with the XFS running in previous operating systems, e.g. Centos 7 or Ubuntu 18.04.

This happens when a curtin/partitions parameter is used that sets an XFS filesystem. This is NOT the default and so is only triggered from this action.

20.59.3. Solution

Within curtin/partitions parameter, an additional variable will need to be added to all XFS filesystem creation stanzas. This looks like this (in JSON format):

"extra_options": [
  "-i",
  "sparse=0"
],

This tells the Centos8-based sledgehammer to generate an XFS filesystem that will work in the older environments.

A complete XFS filesystem stanza would look like this:

 {
  "extra_options": [
    "-i",
    "sparse=0"
  ],
  "fstype": "xfs",
  "id": "disk0-part1",
  "label": "root-partition",
  "type": "format",
  "volume": "root_part"
}

You will also need to make sure that your image contains the XFS tools. If you are using image builder, you can use the image-builder/additional-packages parameter with a value that includes xfsprogs.

20.59.4. Additional Information

Additional resources and information related to this Knowledge Base article.

20.59.4.2. Versions

v4.6.0+

20.59.4.3. Keywords

XFS, curtin, image-deploy

20.59.4.4. Revision Information

KB Article     :  kb-00058
initial release:  Tue Feb 23 14:19:26 CST 2021
updated release:  Tue Feb 23 14:19:26 CST 2021