Bug#848944: grub-common: grub-probe fails for ZFS root pool on /dev/mapper device
John Goerzen
jgoerzen at complete.org
Wed Dec 21 03:58:39 UTC 2016
Package: grub-common
Version: 2.02~beta2-22+deb8u1
Severity: important
Hi,
Running update-grub provides this:
root at hephaestus:/tmp# update-grub
/usr/sbin/grub-probe: error: failed to get canonical path of `/dev/MASS2-zfstank'.
By using strace, I determined the problem is in how it uses zpool
status.
In my situation, it called "zpool status tank". zpool status, by
default, omits everything before the final slash in the device name.
So, it shows just MASS2-zfstank in the above example, rather than
/dev/mapper/MASS2-zfstank. grub-probe is clearly assuming --
incorrectly -- that everything is always under /dev.
The correct approach is to use "zpool status -P", which displays the
full path. Then it will not need to prepend /dev, and will always get
the correct item.
-- Package-specific info:
*********************** BEGIN /proc/mounts
/dev/sda1 /ntfs fuseblk ro,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
/dev/sdb1 /boot ext2 rw,noatime,nodiratime 0 0
*********************** END /proc/mounts
*********************** BEGIN /boot/grub/device.map
(hd0) /dev/disk/by-id/ata-Hitachi_HDS723020BLA642_MN1220F32A3W6D
(hd1) /dev/disk/by-id/ata-WDC_WD5000AAKS-60A7B2_WD-WMASZ0028605
*********************** END /boot/grub/device.map
*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 --hint='hd0,msdos1' e6e07121-50eb-4eab-9d6e-192e089d27d9
else
search --no-floppy --fs-uuid --set=root e6e07121-50eb-4eab-9d6e-192e089d27d9
fi
font="/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=-1
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 --hint='hd0,msdos1' e6e07121-50eb-4eab-9d6e-192e089d27d9
else
search --no-floppy --fs-uuid --set=root e6e07121-50eb-4eab-9d6e-192e089d27d9
fi
insmod png
if background_image /grub/.background_cache.png; then
set color_normal=white/black
set color_highlight=black/white
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-/tank/hephaestus-1/ROOT' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 --hint='hd0,msdos1' e6e07121-50eb-4eab-9d6e-192e089d27d9
else
search --no-floppy --fs-uuid --set=root e6e07121-50eb-4eab-9d6e-192e089d27d9
fi
echo 'Loading Linux 3.16.0-4-amd64 ...'
linux /vmlinuz-3.16.0-4-amd64 root=ZFS=/hephaestus-1/ROOT ro cgroup_enable=memory,cpu,devices,cpuacct,freezer,blkio swapaccount=1 security=apparmor apparmor=1
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.16.0-4-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-/tank/hephaestus-1/ROOT' {
menuentry 'Debian GNU/Linux, with Linux 3.16.0-4-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-4-amd64-advanced-/tank/hephaestus-1/ROOT' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 --hint='hd0,msdos1' e6e07121-50eb-4eab-9d6e-192e089d27d9
else
search --no-floppy --fs-uuid --set=root e6e07121-50eb-4eab-9d6e-192e089d27d9
fi
echo 'Loading Linux 3.16.0-4-amd64 ...'
linux /vmlinuz-3.16.0-4-amd64 root=ZFS=/hephaestus-1/ROOT ro cgroup_enable=memory,cpu,devices,cpuacct,freezer,blkio swapaccount=1 security=apparmor apparmor=1
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.16.0-4-amd64
}
menuentry 'Debian GNU/Linux, with Linux 3.16.0-4-amd64 (sysvinit)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-4-amd64-init-sysvinit-/tank/hephaestus-1/ROOT' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 --hint='hd0,msdos1' e6e07121-50eb-4eab-9d6e-192e089d27d9
else
search --no-floppy --fs-uuid --set=root e6e07121-50eb-4eab-9d6e-192e089d27d9
fi
echo 'Loading Linux 3.16.0-4-amd64 ...'
linux /vmlinuz-3.16.0-4-amd64 root=ZFS=/hephaestus-1/ROOT ro cgroup_enable=memory,cpu,devices,cpuacct,freezer,blkio swapaccount=1 security=apparmor apparmor=1 init=/lib/sysvinit/init
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.16.0-4-amd64
}
menuentry 'Debian GNU/Linux, with Linux 3.16.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-4-amd64-recovery-/tank/hephaestus-1/ROOT' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 --hint='hd0,msdos1' e6e07121-50eb-4eab-9d6e-192e089d27d9
else
search --no-floppy --fs-uuid --set=root e6e07121-50eb-4eab-9d6e-192e089d27d9
fi
echo 'Loading Linux 3.16.0-4-amd64 ...'
linux /vmlinuz-3.16.0-4-amd64 root=ZFS=/hephaestus-1/ROOT ro single
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.16.0-4-amd64
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-40908A2F908A2B8A' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 40908A2F908A2B8A
else
search --no-floppy --fs-uuid --set=root 40908A2F908A2B8A
fi
parttool ${root} hidden-
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
*********************** END /boot/grub/grub.cfg
*********************** BEGIN /proc/mdstat
cat: /proc/mdstat: No such file or directory
*********************** END /proc/mdstat
*********************** BEGIN /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root 9 Dec 20 21:44 ata-HL-DT-ST_BD-RE_WH14NS40_K9AD6F83804 -> ../../sr0
lrwxrwxrwx 1 root root 9 Dec 20 21:44 ata-Hitachi_HDS723020BLA642_MN1220F32A3W6D -> ../../sdb
lrwxrwxrwx 1 root root 10 Dec 20 21:44 ata-Hitachi_HDS723020BLA642_MN1220F32A3W6D-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Dec 20 21:44 ata-Hitachi_HDS723020BLA642_MN1220F32A3W6D-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Dec 20 21:44 ata-Hitachi_HDS723020BLA642_MN1220F32A3W6D-part5 -> ../../sdb5
lrwxrwxrwx 1 root root 10 Dec 20 21:44 ata-Hitachi_HDS723020BLA642_MN1220F32A3W6D-part6 -> ../../sdb6
lrwxrwxrwx 1 root root 9 Dec 20 21:44 ata-MZ-5EA1000-0D3_S0SENEAC104693 -> ../../sdc
lrwxrwxrwx 1 root root 9 Dec 20 21:44 ata-SAMSUNG_HD501LJ_S0MUJ1NP602051 -> ../../sda
lrwxrwxrwx 1 root root 10 Dec 20 21:44 ata-SAMSUNG_HD501LJ_S0MUJ1NP602051-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Dec 20 21:44 dm-name-MASS2-swap_1 -> ../../dm-2
lrwxrwxrwx 1 root root 10 Dec 20 21:44 dm-name-MASS2-zfscache -> ../../dm-4
lrwxrwxrwx 1 root root 10 Dec 20 21:44 dm-name-MASS2-zfslog -> ../../dm-5
lrwxrwxrwx 1 root root 10 Dec 20 21:44 dm-name-MASS2-zfstank -> ../../dm-1
lrwxrwxrwx 1 root root 10 Dec 20 21:44 dm-name-sdb5_crypt -> ../../dm-0
lrwxrwxrwx 1 root root 10 Dec 20 21:44 dm-name-ssd_crypt -> ../../dm-3
lrwxrwxrwx 1 root root 10 Dec 20 21:44 dm-uuid-CRYPT-LUKS1-8a6627a949fc459d924c219d6a001fbd-ssd_crypt -> ../../dm-3
lrwxrwxrwx 1 root root 10 Dec 20 21:44 dm-uuid-CRYPT-LUKS1-acead6ebacc743259c3045f0d095e264-sdb5_crypt -> ../../dm-0
lrwxrwxrwx 1 root root 10 Dec 20 21:44 dm-uuid-LVM-uGUYq84akr7RPNuzfxdDW2RI69T7fFKDJa8YrbWuoJF8ErWRjb2m6BfdnD103wLP -> ../../dm-5
lrwxrwxrwx 1 root root 10 Dec 20 21:44 dm-uuid-LVM-uGUYq84akr7RPNuzfxdDW2RI69T7fFKDYOAPlxG2QiwpulOBTDtvn2slh8ej1GqM -> ../../dm-2
lrwxrwxrwx 1 root root 10 Dec 20 21:44 dm-uuid-LVM-uGUYq84akr7RPNuzfxdDW2RI69T7fFKDnmb2R7Dh8XCJ1sZrUmFhptCsGGAyq24c -> ../../dm-4
lrwxrwxrwx 1 root root 10 Dec 20 21:44 dm-uuid-LVM-uGUYq84akr7RPNuzfxdDW2RI69T7fFKDoL2paBRFsBQorR6VSoeflbdiCW6TSqd0 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Dec 20 21:44 lvm-pv-uuid-3R3o1U-07sF-axys-ynIw-qgBQ-IePo-ZtBeMu -> ../../dm-3
lrwxrwxrwx 1 root root 10 Dec 20 21:44 lvm-pv-uuid-hT4tkL-HSne-XUDG-lOc6-GYTl-f6Lt-JtCLTA -> ../../dm-0
lrwxrwxrwx 1 root root 9 Dec 20 21:44 wwn-0x50000f001b602051 -> ../../sda
lrwxrwxrwx 1 root root 10 Dec 20 21:44 wwn-0x50000f001b602051-part1 -> ../../sda1
lrwxrwxrwx 1 root root 9 Dec 20 21:44 wwn-0x5000cca369e0c946 -> ../../sdb
lrwxrwxrwx 1 root root 10 Dec 20 21:44 wwn-0x5000cca369e0c946-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Dec 20 21:44 wwn-0x5000cca369e0c946-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Dec 20 21:44 wwn-0x5000cca369e0c946-part5 -> ../../sdb5
lrwxrwxrwx 1 root root 10 Dec 20 21:44 wwn-0x5000cca369e0c946-part6 -> ../../sdb6
lrwxrwxrwx 1 root root 9 Dec 20 21:44 wwn-0x500253825000d1a5 -> ../../sdc
*********************** END /dev/disk/by-id
*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Dec 20 21:44 40908A2F908A2B8A -> ../../sda1
lrwxrwxrwx 1 root root 9 Dec 20 21:44 8a6627a9-49fc-459d-924c-219d6a001fbd -> ../../sdc
lrwxrwxrwx 1 root root 10 Dec 20 21:44 acead6eb-acc7-4325-9c30-45f0d095e264 -> ../../sdb5
lrwxrwxrwx 1 root root 10 Dec 20 21:44 be829107-5eba-497f-a79f-77d439ff9ff3 -> ../../dm-2
lrwxrwxrwx 1 root root 10 Dec 20 21:44 e6e07121-50eb-4eab-9d6e-192e089d27d9 -> ../../sdb1
*********************** END /dev/disk/by-uuid
-- System Information:
Debian Release: 8.6
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages grub-common depends on:
ii gettext-base 0.19.3-2
ii libc6 2.19-18+deb8u6
ii libdevmapper1.02.1 2:1.02.90-2.2+deb8u1
ii libfreetype6 2.5.2-3+deb8u1
ii libfuse2 2.9.3-15+deb8u2
ii liblzma5 5.1.1alpha+20120614-2+b3
ii libpng12-0 1.2.50-2+deb8u2
ii zlib1g 1:1.2.8.dfsg-2+b1
Versions of packages grub-common recommends:
ii os-prober 1.65
Versions of packages grub-common suggests:
ii console-setup 1.123
ii desktop-base 8.0.2
pn grub-emu <none>
pn multiboot-doc <none>
ii xorriso 1.3.2-1.1
-- no debconf information
More information about the Pkg-grub-devel
mailing list