Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QqEdy-0003oH-0i for mharc-grub-devel@gnu.org; Sun, 07 Aug 2011 21:28:38 -0400 Received: from eggs.gnu.org ([140.186.70.92]:60565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqEdv-0003nX-5I for grub-devel@gnu.org; Sun, 07 Aug 2011 21:28:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqEdt-0000fL-Ps for grub-devel@gnu.org; Sun, 07 Aug 2011 21:28:35 -0400 Received: from mail-iy0-f175.google.com ([209.85.210.175]:37482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqEdt-0000fH-J9 for grub-devel@gnu.org; Sun, 07 Aug 2011 21:28:33 -0400 Received: by iyn15 with SMTP id 15so6029179iyn.6 for ; Sun, 07 Aug 2011 18:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; bh=qTSbTl3WQL61+Y607hyRBFDpR4rTmq7BzZzXwIkQmtw=; b=dAz/vlxyQJhv9uJUV3fdHXMPc8ty8H3/cGxvGd3bYIw0wpnEZkh34FiL1RNv1UGc6Y NQW1Gki/U0Xw1Rq8aZZ8JCL5He2Ne90Xne3fQJ3FoJhIDgiJnAFcxDEXg4+sbNa0+Frg lu+bE6rMqnKBlBTfODq6ToGuFF8WUnXnHlWwE= Received: by 10.42.158.195 with SMTP id i3mr768866icx.205.1312766912756; Sun, 07 Aug 2011 18:28:32 -0700 (PDT) Received: from fawn.thebedells.dyndns.org (cpe-74-76-197-33.nycap.res.rr.com [74.76.197.33]) by mx.google.com with ESMTPS id n18sm2153098ibg.1.2011.08.07.18.28.31 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 07 Aug 2011 18:28:32 -0700 (PDT) From: Zachary Bedell Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: getroot for ZFS without libzfs? Date: Sun, 7 Aug 2011 21:28:30 -0400 Message-Id: <624ACA48-86E4-4ECB-A975-A47B1FB7F7E6@gmail.com> To: grub-devel@gnu.org Mime-Version: 1.0 (Apple Message framework v1244.3) X-Mailer: Apple Mail (2.1244.3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.175 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2011 01:28:36 -0000 Greetings all, I've been working for the last few weeks with Grub on a Linux system = using ZFS drivers from zfsonlinux.org. One change required to Grub has = been in adapting the way the the build process detects and links to = libzfs for the code in util/getroot.c. I'd like to see the changes = required included in Grub of course, but I have some concerns about the = licensing issues and also accessing the private libzfs. It appears that existing Grub code already links against libzfs for the = benefit of find_root_device_from_libzfs and other functions in = getroot.c. It also appears that libzfs is not used outside this file. = That linkage surprises me a bit as I would have expected GPL Grub linked = against CDDL libzfs to create a problem. Also libzfs is considered a = private API and not intended to be linked against, though admittedly = what I propose (reading on-disk structures directly) is arguably worse = than accessing a private library. As best I can tell, all of the ZFS-related functionality that getroot.c = requires was included in the GPL release that Sun made in Grub 0.97. I = think it should be relatively straight forward to modify getroot.c to = use the GPL'd ZFS code to directly access the disk and read the = necessary bits out of ZFS that it needs to configure itself. Assuming = that change is made, it should be possible to expunge Grub of all = references to libzfs and have its ZFS support operate purely on the = GPL'd dump from Sun. I'd like to dive in and make these changes, but I wanted to solicit = thoughts from other Grub devs before starting. Am I incorrect in my = belief that linking libzfs is a GPL problem for Grub? Is the CDDL/GPL = problem not reciprocal and this only a problem for CDDL ZFS using GPL = kernel and not the other way around? Does anyone see an issue with getroot.c reading the on-disk ZFS = structures directly? grub-probe already does this in its search for = uberblocks and labels, so I don't think changing getroot.c is making the = situation worse. Any other thoughts would be appreciated. Best regards, Zac Bedell