Comment 3 for bug 1661629

Revision history for this message
John Gallagher (john.gallagher) wrote :

Maybe there is something better, but it seems like the simplest change that would fix this would be something along the lines of the patch below. This just assumes that if the filesystem type is listed as zfs then it actually is zfs, and it adds the zfs module. With this change I was able to build a image using "MODULES=dep" and successfully create a crash dump with zfs on root.

--- /usr/share/initramfs-tools/hook-functions.orig 2018-06-26 22:24:55.918498180 +0000
+++ /usr/share/initramfs-tools/hook-functions 2018-06-26 22:48:44.350437446 +0000
@@ -350,9 +350,12 @@
   return
  fi

- # handle ubifs and return since ubifs is mounted on char devices
- # but most of the commands below only work with block devices.
- if [ "${FSTYPE}" = "ubifs" ]; then
+ # Most of the commands below only work with block devices. Some
+ # file systems don't specify a block device:
+ # - ubifs is mounted on char devices
+ # - zfs specifies the name of a zfs dataset
+ # In these cases, just assume the listed fs type is correct.
+ if [ "${FSTYPE}" = "ubifs" -o "${FSTYPE}" = "zfs" ]; then
   manual_add_modules "${FSTYPE}"
   return
  fi