grub-probe zfs bug: failed to get canonical path
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
zfs-linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
grub-probe /
fails with grub-probe: error: failed to get canonical path of `/dev/HDD0p2'. This is simply because grub makes the wrong assumption, that "zpool status $pool" lists the vdevs in use only with the '/dev/' prefix stripped off. It probably assumes something like /dev/sda etc., which is discouraged to use.
Instead, grub should use "zpool status -P $pool" to get the full device path. This would probably result into a symlink, e.g. /dev/disk-
The current setup I use is:
433 0 drwxr-xr-x 4 root root 80 Apr 28 20:22 /dev/chassis/SYS
434 0 drwxr-xr-x 2 root root 200 Apr 28 23:06 /dev/chassis/
435 0 lrwxrwxrwx 1 root root 12 Apr 28 23:16 /dev/chassis/
417 0 lrwxrwxrwx 1 root root 13 Apr 28 23:16 /dev/chassis/
442 0 lrwxrwxrwx 1 root root 13 Apr 28 23:16 /dev/chassis/
423 0 lrwxrwxrwx 1 root root 13 Apr 28 23:16 /dev/chassis/
436 0 lrwxrwxrwx 1 root root 12 Apr 28 23:16 /dev/chassis/
418 0 lrwxrwxrwx 1 root root 13 Apr 28 23:16 /dev/chassis/
443 0 lrwxrwxrwx 1 root root 13 Apr 28 23:16 /dev/chassis/
424 0 lrwxrwxrwx 1 root root 13 Apr 28 23:16 /dev/chassis/
437 0 drwxr-xr-x 2 root root 80 Apr 28 20:22 /dev/chassis/
438 0 lrwxrwxrwx 1 root root 12 Apr 28 23:16 /dev/chassis/
439 0 lrwxrwxrwx 1 root root 12 Apr 28 23:16 /dev/chassis/
with 'zpool create ... rpool /dev/chassis/
PS: The full version is 2.02~beta2-
For simulation one may setup a VirtualBox VM, with Storage == Controller SAS (Type: LsiLogic SAS, Port Count: 8), and e.g. one VDI attached to it (/dev/sda) and e.g. netboot an install image. When it comes to the 'partitioning disks' dialog, start a shell and fetch/install ksh93 (i.e. ksh-udeb).
Than the script http://
Changed in zfs-linux (Ubuntu): | |
status: | New → Confirmed |
no longer affects: | zfs |
no longer affects: | grub |
FWIW: Found another case, where grub2 fails:
May 3 15:37:28 in-target: grub-common is already the newest version (2.02~beta2- 36ubuntu3. 9).
May 3 15:37:28 in-target: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
May 3 15:37:28 main-menu[422]: (process:4764): grub-probe: error: failed to get canonical path of `rpool/ROOT/linux'.
May 3 15:37:28 main-menu[422]: (process:4764): grub-probe: error: failed to get canonical path of `rpool/ROOT/linux'.
May 3 15:37:28 main-menu[422]: WARNING **: Configuring 'grub-installer' failed with error code 1
May 3 15:37:28 main-menu[422]: WARNING **: Menu item 'grub-installer' failed.
May 3 15:37:40 main-menu[422]: INFO: Falling back to the package description for brltty-udeb
^C
~ # zfs list linux/home 19K 760G 19K legacy linux/var 963M 760G 963M legacy
NAME USED AVAIL REFER MOUNTPOINT
rpool 163G 760G 19K none
rpool/ROOT 2.55G 760G 19K none
rpool/ROOT/linux 2.55G 760G 1.61G /target
rpool/ROOT/
rpool/ROOT/
rpool/VARSHARE 19K 760G 19K /target/var/share
rpool/dump 64.0G 824G 8K -
rpool/swap 96.0G 856G 8K -
~ # zpool status
pool: rpool
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
nvme0n1p2 ONLINE 0 0 0
~ # zpool status -P
pool: rpool
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
/dev/nvme0n1p2 ONLINE 0 0 0