zfs-mount-generator results in ZFS Boot Stuck - Please Give Root Password or Press CTRL+D to Continue
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zfs-linux (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
System Boot is Abnormal. Gives the message "Give root password for maintenance or press CTRL+D to continue".
I installed Ubuntu 23.10 on NVME using debootstrap (UEFI install).
I tried to re-generate the zfs cache and that seems to be set correctly in /etc/zfs/
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) while mount -a seems to enter an infinite loop.
The culprit issue seems to be (based on log files):
```
Nov 10 14:00:04 UbuntuWorkstation11 systemd[1]: Reloading requested from client PID 1743 (unit emergency.
Nov 10 14:00:04 UbuntuWorkstation11 systemd[1]: Reloading...
Nov 10 14:00:04 UbuntuWorkstation11 (sd-execu[1747]: /usr/lib/
Nov 10 14:00:04 UbuntuWorkstation11 (sd-execu[1747]: /usr/lib/
Nov 10 14:00:04 UbuntuWorkstation11 ERROR: zfs-mount-generator failed and you requested a revert:
Nov 10 14:00:04 UbuntuWorkstation11 systemd[1]: Reloading finished in 469 ms.
Nov 10 14:00:04 UbuntuWorkstation11 systemd[1]: Reloading requested from client PID 1807 (unit emergency.
Nov 10 14:00:04 UbuntuWorkstation11 systemd[1]: Reloading...
Nov 10 14:00:04 UbuntuWorkstation11 (sd-execu[1811]: /usr/lib/
Nov 10 14:00:04 UbuntuWorkstation11 (sd-execu[1811]: /usr/lib/
Nov 10 14:00:04 UbuntuWorkstation11 ERROR: zfs-mount-generator failed and you requested a revert:
Nov 10 14:00:05 UbuntuWorkstation11 systemd[1]: Reloading finished in 466 ms.
Nov 10 14:00:05 UbuntuWorkstation11 systemd[1]: Reloading requested from client PID 1733 (unit emergency.
Nov 10 14:00:05 UbuntuWorkstation11 systemd[1]: Reloading...
Nov 10 14:00:05 UbuntuWorkstation11 (sd-execu[1873]: /usr/lib/
Nov 10 14:00:05 UbuntuWorkstation11 (sd-execu[1873]: /usr/lib/
Nov 10 14:00:05 UbuntuWorkstation11 ERROR: zfs-mount-generator failed and you requested a revert:
Nov 10 14:00:05 UbuntuWorkstation11 systemd[1]: Reloading finished in 467 ms.
Nov 10 14:00:12 UbuntuWorkstation11 systemd[1]: Stopped target emergency.target - Emergency Mode.
```
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.
```
root@UbuntuWork
NAME USED AVAIL REFER MOUNTPOINT
rpool 7.30G 1.75T 96K none
rpool/ROOT 7.29G 1.75T 96K none
rpool/ROOT/ubuntu 7.29G 1.75T 6.81G /
rpool/ROOT/
rpool/ROOT/
rpool/ROOT/
rpool/ROOT/
rpool/ROOT/
rpool/ROOT/
rpool/ROOT/
rpool/ROOT/
rpool/ROOT/
rpool/ROOT/
rpool/ROOT/
rpool/ROOT/
rpool/ROOT/
rpool/ROOT/
rpool/ROOT/
rpool/USERDATA 524K 1.75T 96K none
rpool/USERDATA/root 276K 1.75T 140K /root
rpool/USERDATA/
```
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.
```
root@UbuntuWork
# /boot Partition
UUID=8ce455bf-
# /boot/efi Data
UUID=C39A-FFBB /boot/efi vfat umask=0022,
# Tools over NFS
nas.home:
```
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.
```
root@UbuntuWork
zfs-2.2.
zfs-kmod-
```
The bug is also reported upstream, however it's very likely to be Ubuntu-specific, since no other person complained about it.
Upstream bug report: https:/
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.
Particularly the lines
```
zfs mount -a
init 3
```
Seem to be necessary.
And I don't know why but all datasets seem to mount correctly, EXCEPT:
```
/root
/home/stefano
/home/podman
```