Hi Steven, On 11/16/2012 10:42 PM, Steven Chamberlain wrote: > I noticed some relevant code in the grub-installer script that seems to > do that: > >> if [ "$bootfstype" = "zfs" ]; then >> # Required by update-grub on ZFS >> mkdir -p $ROOT/boot/zfs >> cp /boot/zfs/zpool.cache $ROOT/boot/zfs/ >> fi > > but of course that will only work where /boot itself resides on ZFS. > Maybe this needs to also match where $rootfstype is "zfs". I am not sure if checking for / being ZFS is good enough then. Wouldn't we need to check for any file system being on ZFS to create a zpool.cache file? Aside, your triaging sounds like a good explanation and like an easy fix. Thing is, my d-i fu is non-existing. Would anyone care to help? I've prepared a _completely untested_ patch which may fix the issue but I have no idea how to test it. Note, if you are right, this bug is filed against the wrong package, we may clone and reassign it to grub-installer then. -- with kind regards, Arno Töll IRC: daemonkeeper on Freenode/OFTC GnuPG Key-ID: 0x9D80F36D
From b08feadb9604ba41a9a63f73edc15b81d42b6ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20T=C3=B6ll?= <arno@debian.org> Date: Wed, 21 Nov 2012 00:15:35 +0100 Subject: [PATCH] Also create /boot/zfs/zpool.cache if the root fs is on ZFS --- grub-installer | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/grub-installer b/grub-installer index d709de0..f01eda1 100755 --- a/grub-installer +++ b/grub-installer @@ -221,8 +221,10 @@ rootfs=$(findfs /) bootfs=$(findfs /boot) [ -n "$bootfs" ] || bootfs="$rootfs" + bootfstype=$(findfstype /boot) -[ -n "$bootfstype" ] || bootfstype="$(findfstype /)" +rootfstype="$(findfstype /)" +[ -n "$bootfstype" ] || bootfstype=$rootfstype case $ARCH in powerpc/chrp|powerpc/chrp_rs6k|powerpc/chrp_ibm|powerpc/cell) @@ -851,7 +853,7 @@ fi db_progress STEP 1 db_progress INFO grub-installer/progress/step_config_loader -if [ "$bootfstype" = "zfs" ]; then +if [ "$bootfstype" = "zfs" ] || [ "$rootfstype" = "zfs" ] ; then # Required by update-grub on ZFS mkdir -p $ROOT/boot/zfs cp /boot/zfs/zpool.cache $ROOT/boot/zfs/ -- 1.7.10.4
Attachment:
signature.asc
Description: OpenPGP digital signature