22.04 autoinstall curtin ZFS Root layout fail

Asked by Jorge Pires Couto

I tried to autoinstall ubuntu server 22.04 providing the user-data file as stated in the documentation but specifically for root on ZFS on Virtualbox. I followed the curtin documentation to set the storage part of the user-data file. I implemented both the "ZFS Root Simple" and "ZFS Root" examples shown in the documentation. The simple one works without issues but the second doesn't work and the subiquity error that pops out is "autoinstall config didn't mount root". I can't figure out what is wrong with the configuration whereas it comes from the documentation.

Autoinstallation fails at the subiquity/Filesystem/apply_autoinstall_config step without creating any partition.

The configuration file looks like this :

#cloud-config
autoinstall:
  version: 1
  identity:
    hostname: ubuntu-server
    password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0"
    username: ubuntu
  keyboard:
    layout: fr
  early-commands:
    - "sudo apt-get install zfsutils-linux -y"
  storage:
    config:
      - grub_device: true
        id: disk1
        name: main_disk
        ptable: gpt
        path: /dev/sda
        type: disk
        wipe: superblock
      - device: disk1
        id: disk1p1
        number: 1
        size: 9G
        type: partition
      - device: disk1
        flag: bios_grub
        id: bios_boot
        number: 2
        size: 1M
        type: partition
      - id: disk1_rootpool
        mountpoint: /
        pool: rpool
        type: zpool
        vdevs:
          - disk1p1
      - id: disk1_rootpool_container
        pool: disk1_rootpool
        properties:
          canmount: "off"
          mountpoint: "none"
        type: zfs
        volume: /ROOT
      - id: disk1_rootpool_rootfs
        pool: disk1_rootpool
        properties:
          canmount: noauto
          mountpoint: /
        type: zfs
        volume: /ROOT/zfsroot
      - id: disk1_rootpool_home
        pool: disk1_rootpool
        properties:
          setuid: "off"
        type: zfs
        volume: /home
      - id: disk1_rootpool_home_root
        pool: disk1_rootpool
        type: zfs
        volume: /home/root
        properties:
          mountpoint: /root
    version: 1

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu subiquity Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Bernard Stafford (bernard010) said :
#1

I found this in the Troubleshooting section:
When done, cleanup:

exit
mount | grep -v zfs | tac | awk '/\/mnt/ {print $3}' | \
    xargs -i{} umount -lf {}
zpool export -a
reboot

https://openzfs.github.io/openzfs-docs/Getting%20Started/Ubuntu/Ubuntu%2022.04%20Root%20on%20ZFS.html#troubleshooting
https://curtin.readthedocs.io/en/latest/topics/storage.html#zfs-root-simple

Hope that will mount root.

Can you help with this problem?

Provide an answer of your own, or ask Jorge Pires Couto for more information if necessary.

To post a message you must log in.