Bug#824974: grub-pc: grub-probe fails on root-on-ZFS systems

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Oct 13 09:37:23 UTC 2016


Tags: patch, upstream

this should be fixed with the attached patch included in Ubuntu
yakkety's grub2 package.

it uses the environment variable ZPOOL_VDEV_NAME_PATH to cause "zpool
status" to generate output like "zpool status -P" would (since the
latter is not available for all ZFS implementations, the environment
variable is the safe way to go).

since the output now contains device paths starting with '/', grub-probe
will not prepend them with '/dev/', but use them directly. this should
fix all of the possible device paths, not just '/dev/disk/by-*' like
previous patches attempting to fix this did.

note that this is filed upstream as http://savannah.gnu.org/bugs/?43653
but not yet fixed.

example output:

# zpool status
  pool: rpool
 state: ONLINE
  scan: none requested
config:

  NAME                               STATE     READ WRITE CKSUM
  rpool                              ONLINE       0     0     0
    ata-QEMU_HARDDISK_QM00001-part2  ONLINE       0     0     0
    ata-QEMU_HARDDISK_QM00002        ONLINE       0     0     0
  logs
    ata-QEMU_HARDDISK_QM00007        ONLINE       0     0     0

errors: No known data errors

# zpool status -P
  pool: rpool
 state: ONLINE
config:

  NAME                                               STATE     READ WRITE CKSUM
  rpool                                              ONLINE       0     0     0
    /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part2  ONLINE       0     0     0
    /dev/disk/by-id/ata-QEMU_HARDDISK_QM00002-part1  ONLINE       0     0     0
  logs
    /dev/disk/by-id/ata-QEMU_HARDDISK_QM00007-part1  ONLINE       0     0     0

errors: No known data errors

# ZPOOL_VDEV_NAME_PATH=YES zpool status
  pool: rpool
 state: ONLINE
  scan: none requested
config:

  NAME                                               STATE     READ WRITE CKSUM
  rpool                                              ONLINE       0     0     0
    /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part2  ONLINE       0     0     0
    /dev/disk/by-id/ata-QEMU_HARDDISK_QM00002-part1  ONLINE       0     0     0
  logs
    /dev/disk/by-id/ata-QEMU_HARDDISK_QM00007-part1  ONLINE       0     0     0

errors: No known data errors

-------------- next part --------------
A non-text attachment was scrubbed...
Name: zpool_full_device_name.patch
Type: text/x-diff
Size: 808 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20161013/301fe3a7/attachment.patch>


More information about the Pkg-grub-devel mailing list