Package: zfs-dracut
Version: 2.0.1-2
Severity: critical
Tags: patch
Justification: breaks the whole system

Dear Maintainer,

Because you install zgenhostid to sbin, the dracut module was broken,
so during a casual upgrade and rebuild (both on sid, reporting from
different system), on next boot the user is met with
"don't know how to handle root=zfs".

This has happened to a friend of mine's and my machines today,
thankfully we made backups of our ESPs, because our systems would've
run a high chance to become entirely broken, requiring mounting the
rootfses on other machines and regenerating there; this is not feasible
on a sealed system (mine) or one that boots off multiple striped NVMe
drives (his).

PLEASE apply this patch
(clean over b612af3ca30a04c5afbef1fcadeec76a516794ef)
and upload ASAP. I have verified it on my machine.

Best,
наб

-- System Information:
Debian Release: 10.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-13-amd64 (SMP w/24 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, 
TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages zfs-dracut depends on:
ii  dracut                  048+80-2+swapfile
ii  zfs-dkms [zfs-modules]  2.0.1-2~bpo10+1
ii  zfsutils-linux          2.0.1-2~bpo10+1

zfs-dracut recommends no packages.

zfs-dracut suggests no packages.
From 78ef6ade07bb218edac9ed4abeb54115ec82c197 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <[email protected]>
Date: Tue, 19 Jan 2021 14:16:13 +0100
Subject: [PATCH] Check zgenhostid in sbindir in dracut module
X-Mutt-PGP: OS

---
 debian/changelog                              |  7 +++++
 .../0014-Check-zgenhostid-in-sbindir.patch    | 30 +++++++++++++++++++
 debian/patches/series                         |  1 +
 3 files changed, 38 insertions(+)
 create mode 100644 debian/patches/0014-Check-zgenhostid-in-sbindir.patch

diff --git a/debian/changelog b/debian/changelog
index 2c60c679..29adc43b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+zfs-linux (2.0.1-3) UNRELEASED; urgency=medium
+
+  * Check zgenhostid in sbindir in dracut module. This renders systems that
+    rely on zfs-dracut for booting (i.e. use ZFS on root) bootable again.
+
+ -- наб <[email protected]>  Tue, 19 Jan 2021 14:16:24 +0100
+
 zfs-linux (2.0.1-2) unstable; urgency=medium
 
   * Patch: move manpage arcstat(1) to arcstat(8). (Closes: #980105)
diff --git a/debian/patches/0014-Check-zgenhostid-in-sbindir.patch b/debian/patches/0014-Check-zgenhostid-in-sbindir.patch
new file mode 100644
index 00000000..e7f09f0a
--- /dev/null
+++ b/debian/patches/0014-Check-zgenhostid-in-sbindir.patch
@@ -0,0 +1,30 @@
+From: =?utf-8?b?0L3QsNCx?= <[email protected]>
+Date: Tue, 19 Jan 2021 14:13:44 +0100
+Subject: Check zgenhostid in sbindir
+
+---
+ contrib/dracut/90zfs/module-setup.sh.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in
+index ec5e6e3..da2b097 100755
+--- a/contrib/dracut/90zfs/module-setup.sh.in
++++ b/contrib/dracut/90zfs/module-setup.sh.in
+@@ -5,7 +5,7 @@ check() {
+ 	[ "${1}" = "-d" ] && return 0
+ 
+ 	# Verify the zfs tool chain
+-	for tool in "@bindir@/zgenhostid" "@sbindir@/zpool" "@sbindir@/zfs" "@mounthelperdir@/mount.zfs" ; do
++	for tool in "@sbindir@/zgenhostid" "@sbindir@/zpool" "@sbindir@/zfs" "@mounthelperdir@/mount.zfs" ; do
+ 		test -x "$tool" || return 1
+ 	done
+ 	# Verify grep exists
+@@ -38,7 +38,7 @@ install() {
+ 	inst_rules @udevruledir@/60-zvol.rules
+ 	dracut_install hostid
+ 	dracut_install grep
+-	dracut_install @bindir@/zgenhostid
++	dracut_install @sbindir@/zgenhostid
+ 	dracut_install @sbindir@/zfs
+ 	dracut_install @sbindir@/zpool
+ 	# Workaround for https://github.com/openzfs/zfs/issues/4749 by
diff --git a/debian/patches/series b/debian/patches/series
index d52b62f3..25681344 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -18,3 +18,4 @@ force-verbose-rules.patch
 4620-zfs-vol-wait-fix-locked-encrypted-vols.patch
 move-arcstat-1-to-8.patch
 0001-zpool-Dryrun-fails-to-list-some-devices.patch
+0014-Check-zgenhostid-in-sbindir.patch
-- 
2.20.1

Attachment: signature.asc
Description: PGP signature

Reply via email to