Begin importing ZFS root pool rpoo. Failure 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
subiquity |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hello.
This message only appears at the first start of Ubuntu Noble installed in a ZFS version.
I suspect the installer forgot to export the pools when it ends.
A part of the message:
Begin importing ZFS root pool rpool.
Failure 1
Command /sbin/zpool import -c /etc/zfs/zpool .cache -N 'rpool'
Message cannot import 'rpool' pool was previously in use from another system. Last access.....
The pool can be imported, use zpool import -f to import the pool.
It is therefore necessary to strike
zpool import -f rpool
zpool import -f bpool
exit
then the startup continues.
ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: subiquity (unknown)
ProcVersionSign
Uname: Linux 6.6.0-14-generic x86_64
NonfreeKernelMo
ApportVersion: 2.27.0-0ubuntu6
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Thu Jan 18 14:21:11 2024
InstallationDate: Installed on 2024-01-18 (0 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Daily amd64 (20240116)
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm-
XDG_RUNTIME_
SourcePackage: subiquity
UpgradeStatus: No upgrade log present (probably fresh install)
I also have this issue, currently testing deployment of 24.04 on our infrastructure. Having the installer export the zpool before reboot seems like it should fix the problem.
In the meantime I have worked around it - as it's not possible to preseed the zpool export as a late-command and have the installer exit cleanly (it explodes at the final step of copying the installer logs to the target system, which happens after late-commands have run) I have instead added late-commands to manipulate the installer /etc/hostid to match the target and then bounce the zpool, as zfs uses this hostid to determine which system a pool belongs to.
- cp /target/etc/hostid /etc/hostid
- umount -l /target
- zpool export rpool
- zpool import rpool -f
- mount -t zfs -o zfsutil rpool/ROOT/zfsroot /target
Our disk configuration doesn't use a bpool but I assume adding the relevant export/import would work for that case.