bugGNU GRUB - Bugs: bug #58270, grub-probe fails to detect zfs...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #58270: grub-probe fails to detect zfs filesystem if native encryption is enabled

Submitted by:  Kridsada Thanabulpong <sirn>
Submitted on:  Wed 29 Apr 2020 06:54:27 AM UTC  
Votes:  100  
 
Category:  Filesystem Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Release: 
Release:  other Reproducibility:  Every Time
Planned Release:  None

Wed 29 Apr 2020 06:54:27 AM UTC, original submission:  

When ZFS native encryption is enabled on a root pool with `zpool create -O encryption=on`, running grub-probe will result in `grub-probe: error: unknown filesystem.` error.

Below is the output from running `env ZPOOL_VDEV_NAME_PATH=1 grub-probe -vvv /`:

grub-probe: info: cannot open `/boot/grub/device.map': No such file or directory.
grub-probe: info: /dev/nvme0n1p3 is not present.
grub-probe: info: Looking for /dev/nvme0n1p3.
grub-probe: info: /dev/nvme0n1 is a parent of /dev/nvme0n1p3.
grub-probe: info: /dev/nvme0n1p3 starts from 69206016.
grub-probe: info: opening the device hostdisk//dev/nvme0n1.
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/nvme0n1 is 1953525168.
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/nvme0n1 is 1953525168.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-probe: info: Partition 0 starts from 2048.
grub-probe: info: Partition 1 starts from 2097152.
grub-probe: info: Partition 2 starts from 69206016.
grub-probe: info: /dev/nvme0n1p3 is present.
grub-probe: info: Looking for /dev/nvme0n1p3.
grub-probe: info: /dev/nvme0n1 is a parent of /dev/nvme0n1p3.
grub-probe: info: /dev/nvme0n1p3 starts from 69206016.
grub-probe: info: opening the device hostdisk//dev/nvme0n1.
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/nvme0n1 is 1953525168.
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/nvme0n1 is 1953525168.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-probe: info: Partition 0 starts from 2048.
grub-probe: info: Partition 1 starts from 2097152.
grub-probe: info: Partition 2 starts from 69206016.
grub-probe: info: /dev/nvme0n1p3 is present.
grub-probe: info: Looking for /dev/nvme0n1p3.
grub-probe: info: /dev/nvme0n1 is a parent of /dev/nvme0n1p3.
grub-probe: info: /dev/nvme0n1p3 starts from 69206016.
grub-probe: info: opening the device hostdisk//dev/nvme0n1.
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/nvme0n1 is 1953525168.
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/nvme0n1 is 1953525168.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub-probe: info: no LVM signature found.
grub-probe: info: Partition 0 starts from 2048.
grub-probe: info: Partition 1 starts from 2097152.
grub-probe: info: Partition 2 starts from 69206016.
grub-probe: info: opening hostdisk//dev/nvme0n1,gpt3.
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/nvme0n1 is 1953525168.
grub-core/kern/fs.c:56: Detecting zfs...
grub-core/fs/zfs/zfs.c:1192: label ok 0
grub-core/fs/zfs/zfs.c:1007: check 2 passed
grub-core/fs/zfs/zfs.c:1018: check 3 passed
grub-core/fs/zfs/zfs.c:1025: check 4 passed
grub-core/fs/zfs/zfs.c:1035: check 6 passed
grub-core/fs/zfs/zfs.c:1043: check 7 passed
grub-core/fs/zfs/zfs.c:1054: check 8 passed
grub-core/fs/zfs/zfs.c:1064: check 9 passed
grub-core/fs/zfs/zfs.c:1086: check 11 passed
grub-core/fs/zfs/zfs.c:1112: check 10 passed
grub-core/fs/zfs/zfs.c:1128: str=com.delphix:hole_birth
grub-core/fs/zfs/zfs.c:1128: str=com.delphix:embedded_data
grub-core/fs/zfs/zfs.c:1137: check 12 passed (feature flags)
grub-core/fs/zfs/zfs.c:1877: zio_read: E 0: size 4096/4096
grub-core/fs/zfs/zfs.c:1899: endian = -1
grub-core/fs/zfs/zfs.c:593: dva=8, a0dd340
grub-core/fs/zfs/zfs.c:2680: endian = -1, blkid=0
grub-core/fs/zfs/zfs.c:2023: endian = -1
grub-core/fs/zfs/zfs.c:2054: endian = -1
grub-core/fs/zfs/zfs.c:1877: zio_read: E 0: size 131072/4096
grub-core/fs/zfs/zfs.c:1899: endian = -1
grub-core/fs/zfs/zfs.c:593: dva=8, 4d719528
grub-core/fs/zfs/zfs.c:2023: endian = 1
grub-core/fs/zfs/zfs.c:2049: endian = 1
grub-core/fs/zfs/zfs.c:1877: zio_read: E 0: size 16384/4096
grub-core/fs/zfs/zfs.c:1899: endian = 1
grub-core/fs/zfs/zfs.c:593: dva=8, 120f31a0
grub-core/fs/zfs/zfs.c:2685: alive
grub-core/fs/zfs/zfs.c:2496: looking for 'features_for_read'
grub-core/fs/zfs/zfs.c:2023: endian = 1
grub-core/fs/zfs/zfs.c:2049: endian = 1
grub-core/fs/zfs/zfs.c:1877: zio_read: E 0: size 16384/4096
grub-core/fs/zfs/zfs.c:1899: endian = 1
grub-core/fs/zfs/zfs.c:593: dva=8, 1069330
grub-core/fs/zfs/zfs.c:2506: zap read
grub-core/fs/zfs/zfs.c:2519: fat zap
grub-core/fs/zfs/zfs.c:2023: endian = 1
grub-core/fs/zfs/zfs.c:2049: endian = 1
grub-core/fs/zfs/zfs.c:1877: zio_read: E 0: size 16384/4096
grub-core/fs/zfs/zfs.c:1899: endian = 1
grub-core/fs/zfs/zfs.c:593: dva=8, 1069338
grub-core/fs/zfs/zfs.c:2279: fzap: length 18
grub-core/fs/zfs/zfs.c:2523: returned 0
grub-core/fs/zfs/zfs.c:2680: endian = -1, blkid=1
grub-core/fs/zfs/zfs.c:2023: endian = -1
grub-core/fs/zfs/zfs.c:2054: endian = -1
grub-core/fs/zfs/zfs.c:1877: zio_read: E 0: size 131072/4096
grub-core/fs/zfs/zfs.c:1899: endian = -1
grub-core/fs/zfs/zfs.c:593: dva=8, 4d719528
grub-core/fs/zfs/zfs.c:2023: endian = 1
grub-core/fs/zfs/zfs.c:2049: endian = 1
grub-core/fs/zfs/zfs.c:1877: zio_read: E 0: size 16384/4096
grub-core/fs/zfs/zfs.c:1899: endian = 1
grub-core/fs/zfs/zfs.c:593: dva=8, 122e1b90
grub-core/fs/zfs/zfs.c:2685: alive
grub-core/fs/zfs/zfs.c:2023: endian = 1
grub-core/fs/zfs/zfs.c:2049: endian = 1
grub-core/fs/zfs/zfs.c:1877: zio_read: E 0: size 1024/1024
grub-core/fs/zfs/zfs.c:1899: endian = 1
grub-core/fs/zfs/zfs.c:593: dva=8, 5e3a4dc8
grub-core/fs/zfs/zfs.c:2110: zap: name = com.delphix:extensible_dataset, value = 1a, cd = 0
grub-core/fs/zfs/zfs.c:2110: zap: name = com.datto:bookmark_v2, value = 0, cd = 0
grub-core/fs/zfs/zfs.c:2110: zap: name = com.datto:encryption, value = 15, cd = 0
grub-core/kern/fs.c:78: zfs detection failed.
grub-probe: error: unknown filesystem.

Partition details:

Disk /dev/nvme0n1: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Force MP600
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 74F3A96C-0C8A-4563-A45A-4F57A31A9747

Device            Start        End    Sectors   Size Type
/dev/nvme0n1p1     2048    2097151    2095104  1023M EFI System
/dev/nvme0n1p2  2097152   69206015   67108864    32G Linux swap
/dev/nvme0n1p3 69206016 1953523711 1884317696 898.5G Solaris root


Current workaround involves patching util/grub.d/10_linux.in to:

--- util/grub.d/10_linux.in     2018-11-25 02:13:02.000000000 +0900
+++ util/grub.d/10_linux.in     2020-04-29 00:38:53.091231269 +0900
@@ -72,6 +72,9 @@
        fi;;
     xzfs)
        rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
+       if [ -z "${rpool}" ] && command -v zdb >/dev/null; then
+               rpool=`zdb -l ${GRUB_DEVICE} |grep " name:" | cut -d\' -f2`
+       fi
        bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`"
        LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}"
        ;;

which allows rpool to be detected and booted.

Kridsada Thanabulpong <sirn>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lamawithonel (Voted in favor of this item)
  • -email is unavailable- added by sirn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 100 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-06-07 lamawithonel Carbon-CopyRemoved -email is unavailable- => -
    2020-06-07 lamawithonel Carbon-Copy- => Added lucas.yamanishi@gmail.com
        Carbon-Copy- => Added lamawithonel

    Back to the top


    Powered by Savane 3.5