Quantcast
Channel: Active questions tagged 22.04 - Ask Ubuntu
Viewing all articles
Browse latest Browse all 4566

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

$
0
0

Hi, community!

I Faced a difficulty when trying to build a qcow image via packer with cloud-init ubuntu 22.04.03.I have a task to use fstype=xfs for root partition and no way to do it in 20+ iterations.This configuration(attached) worked for PXE, but does not work 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 the code and saw that the error occurs when no disk is specified with grub_device: true. (Although this works with PXE)I get the error:

FAIL: autoinstall config did not create needed bootloader partition

When I set "grub_device: true" to a disk and a partition, I can see that the partitions are created correctly, but then when the script does chroot /target & grub-install it tries to install grub on both: Both disk & partition, and gives another error:

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

And I realize that if I use «layout», there for ubuntu in the subiquity code nailed ext4. So question , is there any way to change the default setting for layout to xfs for the root dir in the iso image?Or can anyone suggest some other storage configuration to make the build go error free for packer + qcow?

This is what I have on baremetal right now with this configuration over PXE:

root@localhost:/packer# lsblk -f | grep sdesde                                                                                                                  ├─sde1 vfat     FAT32                                            D003-D8E6                            1015.9M     1% /boot/efi└─sde2 xfs                                                       55xxxec-7fe0-4f66-9a44-df0xxxxxx861  201.4G     9% /

Viewing all articles
Browse latest Browse all 4566

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>