Open luckylinux opened 1 year ago
Tried ZFS 2.2.0 ("final") from mantic-proposed repository, but same issue happens. It seems zfs-mount-generator causes the boot process to fail, thus systemd requests Root Password or CTRL+D to continue.
Exact version: 2.2.0-0ubuntu1~23.10
Version mismatch between kernel module and system: zfs version
(I'm currently trying to rebuild all DKMS modules)
root@UbuntuWorkstation02:~# zfs version
zfs-2.2.0-0ubuntu1~23.10
zfs-kmod-2.2.0~rc3-0ubuntu4
Version inconsistency solved, but still does NOT work
root@UbuntuWorkstation02:/# zfs version
zfs-2.2.0-0ubuntu1~23.10
zfs-kmod-2.2.0-0ubuntu1~23.10
Logs from recovery mode (kernel command line parameter "debug" set) dmesg.log journalctl.log
Far from ideal, but if I boot into emergency mode, then run
zfs mount -a
systemctl restart networking
systemctl restart ssh
init 3
Then I get to a normal login prompt. Login as root & run /etc/init.d/lightdm restart
and I can log in as a user in MATE.
The man page for zfs-mount-generator is not very clear on the example.
If I run
mkdir /tmp/zfs-mount-generator
/lib/systemd/system-generators/zfs-mount-generator /tmp/zfs-mount-generator
Nothing happens. But dmesg reports zfs-mount-generator: zero or three arguments required
Trying with zero arguments yields:
root@UbuntuWorkstation02:/# /lib/systemd/system-generators/zfs-mount-generator
Input 'none' is not an absolute file system path, escaping is likely not going to be reversible.
Input 'none' is not an absolute file system path, escaping is likely not going to be reversible
Ubuntu Bug report, since this might be Ubuntu-specific: https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/2043253
Guys, who faced this problem. Try add "set -x" to zfs-mount-generator and execute it. This gave me an idea. Remove poolname from /etc/zfs/zfs-list.cache/. This compeltely solved this problem for me. My problem came from this: I restore my pool from backup with other name.
You can also touch newpool in this directory and exectute zfs-mount-generator as mentioned here https://manpages.debian.org/testing/zfsutils-linux/zfs-mount-generator.8.en.html
In my case I "solved" the problem by installing the "vanilla" openzfs package.
Script if interested - Note that 2.2.3 came out a while ago as well
#!/bin/bash
# Install Requirements
sudo apt-get --no-install-recommends install dkms
sudo apt-get install dh-dkms
sudo apt-get install aptitude libcurl4-openssl-dev libpam0g-dev lsb-release build-essential autoconf automake libtool libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev python3 python3-dev python3-setuptools python3-cffi libffi-dev python3-packaging git libcurl4-openssl-dev debhelper-compat dh-python po-debconf python3-all-dev python3-sphinx
sudo apt-get install build-essential autoconf automake libtool gawk fakeroot libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev python3 python3-dev python3-setuptools python3-cffi libffi-dev python3-packaging git libcurl4-openssl-dev debhelper-compat dh-python po-debconf python3-all-dev python3-sphinx
sudo apt-get install linux-headers-generic
sudo apt-get install bc bison flex
# Define Desired Version
version="2.2.2"
cd /usr/src
mkdir -p zfs
cd zfs
# Save basedir
basedir=$(pwd)
# Use git and clone zfs-$version tag
#git clone https://github.com/openzfs/zfs.git --depth 1 --tag zfs-$version
#
# Use tar (working)
wget https://github.com/openzfs/zfs/archive/refs/tags/zfs-$version.tar.gz -O zfs-$version.tar.gz
mkdir -p zfs-$version
tar xvf zfs-$version.tar.gz -C zfs-$version --strip-components 1
#
# Use tar (currently broken archive)
#wget https://github.com/openzfs/zfs/releases/download/zfs-$version/zfs-$version.tar.gz -O zfs-$version.tar.gz
#tar xvf zfs-$version.tar.gz
# Change working direectory
cd zfs-$version
# Apply Patch in order to disable SIMD and Enable successfully ZFS Compile
#wget https://raw.githubusercontent.com/chimera-linux/cports/master/main/zfs/patches/aarch64-disable-neon.patch -O aarch64-disable-neon.patch
#patch -p1 < aarch64-disable-neon.patch
sh autogen.sh
./configure
make -s -j$(nproc)
make native-deb
make native-deb-utils native-deb-dkms
# Select Subset of Packages to prevent installation of default linux-image and linux-headers
cd $basedir
mkdir -p selected-packages
mkdir -p selected-packages/$version
cd selected-packages/$version/
mv ../../openzfs-libnvpair3_$version*.deb ./
mv ../../openzfs-libpam-zfs_$version*.deb ./
mv ../../openzfs-libuutil3_$version*.deb ./
mv ../../openzfs-libzfs4_$version*.deb ./
mv ../../openzfs-libzpool5_$version*.deb ./
mv ../../openzfs-zfs-dkms_$version*.deb ./
mv ../../openzfs-zfs-initramfs_$version*.deb ./
mv ../../openzfs-zfs-zed_$version*.deb ./
mv ../../openzfs-zfsutils_$version*.deb ./
sudo apt-get install --fix-missing ./*.deb
System information
Describe the problem you're observing
System Boot is Abnormal. Gives the message "Give root password for maintenance or press CTRL+D to continue".
Describe how to reproduce the problem
Installed Ubuntu 23.10 on NVME using debootstrap (UEFI install).
Include any warning/errors/backtraces from the system logs
journalctl.log
I tried to re-generate the zfs cache and that seems to be set correctly in /etc/zfs/zfs-list.cache/rpool.
It is possible that the /root, /var/log, /home/ folders contained some data already. I tried to empty them and reboot, to make sure that ZFS would mount correctly.
Strangely enough
zfs mount -a
quickly finishes (without errors) whilemount -a
seems to enter an infinite loop.The culprit issue seems to be (based on log files):
It's difficult to know where the issue lies exactly, if the script/program doesn't return more informations on where it's actually failing.
The mounting order to /root, /home/stefano and /var/tmp is suspicious. And I have a feeling that ZFS keeps trying to automount since e.g. the journalctl log file that I created in /root/ quickly disappeared after creation.