[Pkg-zfsonlinux-devel] Bug#859825: zfs-initramfs: finding root by bootfs or mountpoint properties broken

Andreas Korsten bugs-debian at korsten.org
Fri Apr 7 16:34:48 UTC 2017


Package: zfs-initramfs
Version: 0.6.5.9-5
Severity: important

Dear Maintainer,

according to line 765 of the file
/usr/share/initramfs-tools/scripts/zfs
it should be possible for the initramfs to detect the root file system
by the zpool's bootfs property.  This fails because in line 838 IFS is
redefined.  A simple fix would be something like this:


--- /usr/share/initramfs-tools/scripts/zfs	2017-03-19 11:14:57.000000000 +0100
+++ /etc/initramfs-tools/scripts/zfs	2017-04-07 17:10:56.304513058 +0200
@@ -840,8 +840,8 @@
 		do
 			[ -z "$pool" ] && continue
 
-			import_pool "$pool"
-			find_rootfs "$pool"
+			IFS="$OLD_IFS" import_pool "$pool"
+			IFS="$OLD_IFS" find_rootfs "$pool"
 		done
 		IFS="$OLD_IFS"
 

If you set boot=zfs and omit root=zfs:AUTO, this will work (tested
with a single zpool and the bootfs and mountpoint properties set).
However, setting root=zfs:AUTO still fails because in line 790
ZFS_BOOTFS is set to zfs:AUTO and subsequently in line 930 it is
attempted to look up a dataset with the name zfs:AUTO (not even the
zfs: part will be stripped in this case).



-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=, LC_CTYPE= (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages zfs-initramfs depends on:
ii  busybox                 1:1.22.0-19+b2
ii  initramfs-tools         0.127
ii  zfs-dkms [zfs-modules]  0.6.5.9-5
ii  zfsutils-linux          0.6.5.9-5

zfs-initramfs recommends no packages.

zfs-initramfs suggests no packages.

-- no debconf information



More information about the Pkg-zfsonlinux-devel mailing list