builtin: running 'curtin block-meta simple' fails on recent versions of Ubuntu installer for ZFS root
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
Not sure where to post/look for help with this. I've had a bit of a look and I'm unable to find something similar, so would appreciate some help.
Looks like this might be due to changed in block_meta.py in curtin.
I have a script that generates a custom ISO with ZFS root based on the live server ISO install:
https:/
It adds the ZFS packages to the installer and installs them at install time allowing for a ZFS root install to be done. This had been working for all releases from 20.04 and later, but recent changes to the installer have broken it. It still works fine with the LTS releases, but the daily builds and 23.10/24.04 betas are now failing.
It looks like the issue with the updated installer and parsing of the cloud init config file. It creates the ZFS pool and filesystem and mounts it, and then fails when it hands over to phase where it copies the base image to filesystem. It looks like is not returning the correct volume ID for the installer when I debug the crash logs from the installer.
This is the failure point on noble/24.04:
=======
finish: subiquity/
finish: subiquity/
finish: subiquity/
finish: subiquity/
finish: subiquity/
finish: subiquity/
start: subiquity/
finish: subiquity/
An error occurred. Press enter to start a shell
It looks like something in the get_path_
=======
get_path_
An error occured handling 'disk1p2f1_
sk1p2fs1' not found
finish: cmd-install/
g zpool: disk1p2f1_rootpool
TIMED BLOCK_META: 9.727
finish: cmd-install/
mand block-meta
Traceback (most recent call last):
File "/snap/
py", line 202, in main
ret = args.func(args)
File "/snap/
97, in wrapper
return log_time("TIMED %s: " % msg, func, *args, **kwargs)
File "/snap/
79, in log_time
return func(*args, **kwargs)
File "/snap/
_meta.py", line 127, in block_meta
return meta_custom(args)
File "/snap/
_meta.py", line 2248, in meta_custom
handler(
File "/snap/
_meta.py", line 1989, in zpool_handler
vdevs = [get_path_
File "/snap/
_meta.py", line 1989, in <listcomp>
vdevs = [get_path_
File "/snap/
_meta.py", line 576, in get_path_
raise ValueError("volume with id '%s' not found" % volume)
ValueError: volume with id 'disk1p2fs1' not found
volume with id 'disk1p2fs1' not found
root@ubuntu-
=======
---
apt:
disable_
geoip: true
preferences:
- package: '*'
pin: release a=noble-security
preserve_
primary:
- arches:
- amd64
uri: http://
- arches:
- default
uri: http://
drivers:
install: false
early-commands:
- sed -i "s/vda/$(lsblk -x TYPE|grep disk |sort |head -1 |awk '{print $1}')/g"
/autoinstal
- sed -i "s/enp1s0/$(lshw -class network -short |awk '{print $2}' |grep ^e |head
-1)/g" /autoinstall.yaml
- export DEBIAN_
--auto-
- rm /etc/resolv.conf
- echo "nameserver 8.8.8.8" >> /etc/resolv.conf
identity:
hostname: ubuntu
password: $6$0HMdVn5Wf1g9
realname: Ubuntu
username: ubuntu
kernel:
package: linux-generic
keyboard:
layout: us
late-commands:
- mkdir -p /target/
- cp /cdrom/
- echo '#!/bin/bash' > /target/tmp/post.sh
- echo 'export DEBIAN_
--auto-
- chmod +x /target/tmp/post.sh
- echo 'Australia/
- rm /target/
- curtin in-target --target=/target -- ln -s /usr/share/
/etc/localtime
- curtin in-target --target=/target -- /tmp/post.sh
- echo 'GRUB_TERMINAL=
- echo 'GRUB_SERIAL_
- echo 'GRUB_CMDLINE_
console=
- echo 'GRUB_TIMEOUT="10"' >> /target/
- 'echo ''ubuntu ALL=(ALL) NOPASSWD: ALL'' >> /target/
- echo 'APT::Periodic:
- echo 'APT::Periodic:
- echo 'APT::Periodic:
- echo 'APT::Periodic:
- curtin in-target --target=/target -- systemctl enable <email address hidden>
- curtin in-target --target=/target -- systemctl start <email address hidden>
- curtin in-target --target=/target -- systemctl enable <email address hidden>
- curtin in-target --target=/target -- systemctl start <email address hidden>
- curtin in-target --target=/target -- systemctl enable <email address hidden>
- curtin in-target --target=/target -- systemctl start <email address hidden>
- curtin in-target --target=/target -- update-grub
locale: en_US.UTF-8
network:
ethernets:
enp1s0:
dhcp4: true
version: 2
package_update: false
package_upgrade: false
ssh:
allow-pw: false
authorized-
- ''
install-server: true
storage:
config:
- grub_device: true
id: disk1
name: ''
path: /dev/vda
preserve: false
ptable: gpt
type: disk
wipe: superblock-
- device: disk1
flag: boot
id: disk1p1
number: 1
preserve: false
ptable: gpt
size: 1127219200
type: partition
wipe: superblock-
- fstype: fat32
id: disk1p1fs1
preserve: false
type: format
volume: disk1p1
- device: disk1p1fs1
id: mount-2
path: /boot/efi
type: mount
- device: disk1
flag: root
id: disk1p2
number: 2
preserve: false
size: -1
type: partition
wipe: superblock-
- fstype: zfsroot
id: disk1p2fs1
preserve: false
type: format
volume: disk1p2
- device: disk1p2fs1
id: disk1p2f1_rootpool
mountpoint: /
pool: rpool
preserve: false
type: zpool
vdevs:
- disk1p2fs1
- id: disk1_rootpool_
pool: disk1p2f1_rootpool
preserve: false
properties:
type: zfs
volume: /ROOT
- id: disk1_rootpool_
pool: disk1p2f1_rootpool
preserve: false
properties:
type: zfs
volume: /ROOT/zfsroot
- device: disk1p2fs1
id: mount-disk1p2fs1
path: /
type: mount
swap:
swap: 2G
user-data:
timezone: Australia/Melbourne
version: 1
...
Some additional information:
This config works for 20.04, 22.04, and 23.04, and fails on daily builds of 22.04 and later.
block_meta.py appears to have changed a bit since last year.