All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Laager <rlaager@wiktel.com>
To: grub-devel@gnu.org
Subject: [PATCH] Don't create grubenv on ZFS
Date: Thu, 02 Feb 2012 05:16:30 -0600	[thread overview]
Message-ID: <1328181390.3572.74.camel@watermelon.coderich.net> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 214 bytes --]

GRUB can't write to ZFS.  Creating a grubenv file leads to a misleading
"sparse file not allowed" error on boot.  The attached patch for
grub-install skips the creation of a grubenv file on ZFS.

-- 
Richard

[-- Attachment #1.2: zfs-no-grubenv.patch --]
[-- Type: text/x-patch, Size: 580 bytes --]

--- grub2-1.99-orig/util/grub-install.in	2011-04-03 08:36:21.000000000 -0500
+++ grub2-1.99/util/grub-install.in	2012-01-10 00:21:52.159253000 -0600
@@ -460,7 +460,9 @@
 grub_device="`"$grub_probe" --device-map="${device_map}" --target=device "${grubdir}"`" || exit 1
 
 if ! test -f "${grubdir}"/grubenv; then
-    "$grub_editenv" "${grubdir}"/grubenv create
+    if ! test "x`"$grub_probe" --target=fs "${grubdir}"`" = xzfs; then
+        "$grub_editenv" "${grubdir}"/grubenv create
+    fi
 fi
 
 # Create the core image. First, auto-detect the filesystem module.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

             reply	other threads:[~2012-02-02 11:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-02 11:16 Richard Laager [this message]
2012-02-03 10:05 ` [PATCH] Don't create grubenv on ZFS Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-03 10:07   ` Richard Laager
2012-02-03 10:22     ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-03 11:59       ` Richard Laager
2012-02-04 22:34 ` Jordan Uggla
2012-02-05  1:26   ` Richard Laager

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1328181390.3572.74.camel@watermelon.coderich.net \
    --to=rlaager@wiktel.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.