Problem with changing root directory fstype to xfs for ubuntu in user-data when building qcow | pressku.com

Trending 2 months ago

Hi, community!

I Faced a trouble erstwhile trying to build a qcow image via packer pinch cloud-init ubuntu 22.04.03. I person a task to usage fstype=xfs for guidelines partition and nary measurement to do it successful 20+ iterations. This configuration(attached) worked for PXE, but does not activity for qcow.

storage: config: - ptable: gpt match: size: largest wipe: superblock-recursive preserve: false grub_device: false type: disk id: target-disk - device: target-disk size: 1G wipe: superblock flag: boot number: 1 preserve: false grub_device: true type: partition id: partition-0 - fstype: fat32 volume: partition-0 preserve: false type: format id: format-0 - device: target-disk size: -1 wipe: superblock number: 2 preserve: false type: partition id: partition-1 - fstype: xfs volume: partition-1 preserve: false type: format id: format-1 - path: / device: format-1 type: mount id: mount-1 - path: /boot/efi device: format-0 type: mount id: mount-0 version: 2

I dug into nan codification and saw that nan correction occurs erstwhile nary disk is specified pinch grub_device: true. (Although this useful pinch PXE) I get nan error:

FAIL: autoinstall config did not create needed bootloader partition

When I group "grub_device: true" to a disk and a partition, I tin spot that nan partitions are created correctly, but past erstwhile nan book does chroot /target & grub-install it tries to instal grub connected both: Both disk & partition, and gives different error:

finish: cmd-install/stage-curthooks/builtin/cmd-curthooks/configuring-bootloader: FAIL:configuring target strategy bootloader finish: cmd-install/stage-curthooks/builtin/cmd-curthooks/install-grub:FAIL:installing grub to target devices

And I recognize that if I usage layout , location for Ubuntu successful nan codification subiquity is nailed ext4. So nan mobility is, is location immoderate measurement to alteration nan default mounting for ubuntu to xfs for guidelines dir successful nan iso image aliases immoderate different retention config to make everything spell without errors?

This is what I person connected baremetal correct now pinch this configuration complete PXE:

root@localhost:/packer# lsblk -f | grep sde sde ├─sde1 vfat FAT32 D002-D7E6 1015.9M 1% /boot/efi └─sde2 xfs 5568beec-7fe0-4f66-9a44-df07db8bd861 201.4G 9% /
More
close