[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#693001: Support ZFS-on-Linux in initramfs-tools



Package: initramfs-tools
Severity: wishlist
Tags: patch
X-Debbugs-CC: dajhorn@vanadac.com

I sent this to the debian-kernel list just over a week ago and haven't
received a response.  Accordingly, I'm filing it as a bug report.  I
hope I'm following appropriate procedure.


GRUB 2.00 has support for ZFS-on-Linux (the out-of-tree kernel module,
as opposed to the ZFS FUSE implementation).  I wrote some of the code
that was added in 2.00; so that is where I fit into all this.

When booting off a ZFS root filesystem, GRUB sets this:
  root=ZFS=pool_name/dataset/path

For a real world example, following Solaris's convention, this is what I
use in my HOWTO:
  root=ZFS=rpool/ROOT/ubuntu

Darik Horn is doing a wonderful job maintaining ZFS-on-Linux support in
an Ubuntu PPA.  With regard to Debian, he's been taking care to keep the
PPA compatible with Debian, and he's working to learn how to get
packages in Debian itself.  See the last email on:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=686447

[UPDATE: He's looking for a sponsor.  If interested, contact him.]

initramfs-tools is nicely extensible via "boot=foo", where the foo
scripts will then be loaded.  Darik has used this for ZFS. However,
"boot=zfs" still has to be set manually in the GRUB config (or he has to
ship a patched GRUB package).  As more things have been upstreamed,
we're getting close to the goal of not needing any modified packages
(only the addition of ZFS packages) for things to work "out of the box".

Accordingly, I propose this patch to initramfs-tools:

diff --git a/init b/init
index cb832ff..01210ae 100755
--- a/init
+++ b/init
@@ -103,6 +103,9 @@ for x in $(cat /proc/cmdline); do
                /dev/nfs)
                        [ -z "${BOOT}" ] && BOOT=nfs
                        ;;
+               ZFS=*)
+                       [ -z "${BOOT}" ] && BOOT=zfs
+                       ;;
                esac
                ;;
        rootflags=*)

-- 
Richard

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: