Bug#586815: grub-probe: error: cannot find a device for / is still a problem with dmcrypt, lvm2 and /dev/sda

Michael Ostermeier michael.ostermeier.eit at fh-ingolstadt.de
Mon Jun 28 20:44:03 UTC 2010


Hello Colin,

thank you for your help.

>> But the old setup was still better. On the new one:
>>
>> * it still complains not to find /dev/hda

it’s here:

# apt-get --reinstall install grub-pc/unstable
Vorbereiten zum Ersetzen von grub-pc 1.98+20100617-1
(durch .../grub-pc_1.98+20100617-1_i386.deb) ... Entpacke Ersatz für
grub-pc ... Verarbeite Trigger für man-db ...
Richte grub-pc ein (1.98+20100617-1) ...
/usr/sbin/grub-probe: error: cannot stat `/dev/hda'.
Generating grub.cfg ...
Found background: /boot/grub/gnu.png
Found background image: moreblue-orbit-grub.png
Found linux image: /boot/vmlinuz-2.6.32-5-686
Found initrd image: /boot/initrd.img-2.6.32-5-686
Found linux image: /boot/vmlinuz-2.6.32-3-686
Found initrd image: /boot/initrd.img-2.6.32-3-686
done

> You already said you edited /boot/grub/device.map, so I'm not sure.

Yes:
$ cat /boot/grub/device.map
(hd0)	/dev/sda

> Could you please send me the output of:
>
>   sh -x /usr/sbin/grub-mkconfig -o /boot/grub/grub.cfg

Yes, sure. It’s a bit long:

+ transform=s,x,x,
+ prefix=/usr
+ exec_prefix=/usr
+ sbindir=/usr/sbin
+ libdir=/usr/lib
+ sysconfdir=/etc
+ PACKAGE_NAME=GRUB
+ PACKAGE_VERSION=1.98+20100617-1
+ host_os=linux-gnu
+ datarootdir=/usr/share
+ datadir=/usr/share
+ sed s,x,x,
+ echo grub
+ pkgdatadir=/usr/share/grub
+ grub_cfg=
+ grub_mkconfig_dir=/etc/grub.d
+ basename /usr/sbin/grub-mkconfig
+ self=grub-mkconfig
+ sed s,x,x,
+ echo grub-mkdevicemap
+ grub_mkdevicemap=/usr/sbin/grub-mkdevicemap
+ sed s,x,x,
+ echo grub-probe
+ grub_probe=/usr/sbin/grub-probe
+ test 2 -gt 0
+ option=-o
+ shift
+ argument -o /boot/grub/grub.cfg
+ opt=-o
+ shift
+ test 1 -eq 0
+ echo /boot/grub/grub.cfg
+ grub_cfg=/boot/grub/grub.cfg
+ shift
+ test 0 -gt 0
+ . /usr/lib/grub/grub-mkconfig_lib
+ transform=s,x,x,
+ prefix=/usr
+ exec_prefix=/usr
+ datarootdir=/usr/share
+ datadir=/usr/share
+ bindir=/usr/bin
+ sbindir=/usr/sbin
+ sed s,x,x,
+ echo grub
+ pkgdatadir=/usr/share/grub
+ test x/usr/sbin/grub-probe = x
+ test x = x
+ sed s,x,x,
+ echo grub-mkrelpath
+ grub_mkrelpath=/usr/bin/grub-mkrelpath
+ which gettext
+
+ gettext=gettext
+ sed s,x,x,
+ echo /boot/grub
+ grub_prefix=/boot/grub
+ [ x = x ]
+ id -u
+ EUID=0
+ [ 0 != 0 ]
+ set /usr/sbin/grub-mkdevicemap dummy
+ test -f /usr/sbin/grub-mkdevicemap
+ :
+ set /usr/sbin/grub-probe dummy
+ test -f /usr/sbin/grub-probe
+ :
+ mkdir -p /boot/grub
+ test -e /boot/grub/device.map
+ :
+ /usr/sbin/grub-probe --target=device /
+ GRUB_DEVICE=/dev/mapper/Taschenrechner-root
+ /usr/sbin/grub-probe --device /dev/mapper/Taschenrechner-root
--target=fs_uuid
+ GRUB_DEVICE_UUID=
+ true
+ /usr/sbin/grub-probe --target=device /boot
+ GRUB_DEVICE_BOOT=/dev/sda1
+ /usr/sbin/grub-probe --device /dev/sda1 --target=fs_uuid
+ GRUB_DEVICE_BOOT_UUID=8f49ce0a-470f-4606-bada-164206be904a
+ /usr/sbin/grub-probe --target=fs /
+ echo unknown
+ GRUB_FS=unknown
+ test -f /etc/default/grub
+ . /etc/default/grub
+ GRUB_DEFAULT=0
+ GRUB_TIMEOUT=2
+ lsb_release -i -s
+ GRUB_DISTRIBUTOR=Debian
+ GRUB_CMDLINE_LINUX_DEFAULT=vga=0x305
+ GRUB_CMDLINE_LINUX=
+ GRUB_GFXMODE=0x105
+ GRUB_BACKGROUND=/boot/grub/gnu.png
+ [ x != x ]
+ termoutdefault=0
+ [ x = x ]
+ GRUB_TERMINAL_OUTPUT=gfxterm
+ termoutdefault=1
+ [ xgfxterm = xgfxterm ]
+ test -e /boot/grub/gfxterm.mod
+ head -n 1 /boot/grub/video.lst
+ GRUB_VIDEO_BACKEND=vbe
+ [ -z vbe ]
+ [ -n  ]
+ path=/usr/share/grub/unicode.pf2
+ is_path_readable_by_grub /usr/share/grub/unicode.pf2
+ path=/usr/share/grub/unicode.pf2
+ test -e /usr/share/grub/unicode.pf2
+ :
+ /usr/sbin/grub-probe -t fs /usr/share/grub/unicode.pf2
+ return 1
+ continue
+ path=/usr/share/grub/unifont.pf2
+ is_path_readable_by_grub /usr/share/grub/unifont.pf2
+ path=/usr/share/grub/unifont.pf2
+ test -e /usr/share/grub/unifont.pf2
+ return 1
+ continue
+ path=/usr/share/grub/ascii.pf2
+ is_path_readable_by_grub /usr/share/grub/ascii.pf2
+ path=/usr/share/grub/ascii.pf2
+ test -e /usr/share/grub/ascii.pf2
+ :
+ /usr/sbin/grub-probe -t fs /usr/share/grub/ascii.pf2
+ return 1
+ continue
+ path=/boot/grub/unicode.pf2
+ is_path_readable_by_grub /boot/grub/unicode.pf2
+ path=/boot/grub/unicode.pf2
+ test -e /boot/grub/unicode.pf2
+ :
+ /usr/sbin/grub-probe -t fs /boot/grub/unicode.pf2
+ :
+ return 0
+ GRUB_FONT_PATH=/boot/grub/unicode.pf2
+ [ unicode = ascii ]
+ break 2
+ [ -z /boot/grub/unicode.pf2 ]
+ export GRUB_DEVICE GRUB_DEVICE_UUID GRUB_DEVICE_BOOT
GRUB_DEVICE_BOOT_UUID GRUB_FS GRUB_FONT_PATH GRUB_PRELOAD_MODULES
GRUB_VIDEO_BACKEND
+ export GRUB_DEFAULT GRUB_HIDDEN_TIMEOUT GRUB_HIDDEN_TIMEOUT_QUIET
GRUB_TIMEOUT GRUB_DEFAULT_BUTTON GRUB_HIDDEN_TIMEOUT_BUTTON
GRUB_TIMEOUT_BUTTON GRUB_BUTTON_CMOS_ADDRESS GRUB_DISTRIBUTOR
GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_CMDLINE_NETBSD
GRUB_CMDLINE_NETBSD_DEFAULT GRUB_TERMINAL_INPUT GRUB_TERMINAL_OUTPUT
GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_DISABLE_LINUX_RECOVERY
GRUB_DISABLE_NETBSD_RECOVERY GRUB_GFXMODE GRUB_BACKGROUND GRUB_THEME
GRUB_GFXPAYLOAD_LINUX GRUB_DISABLE_OS_PROBER GRUB_INIT_TUNE
GRUB_SAVEDEFAULT
+ test x/boot/grub/grub.cfg != x
+ rm -f /boot/grub/grub.cfg.new
+ exec
+ chmod 400 /boot/grub/grub.cfg.new
+ echo Generating grub.cfg ...
Generating grub.cfg ...
+ cat
+ grub_file_is_not_garbage /etc/grub.d/00_header
+ test -f /etc/grub.d/00_header
+ return 0
+ test -x /etc/grub.d/00_header
+ echo
+ echo ### BEGIN /etc/grub.d/00_header ###
+ /etc/grub.d/00_header
Found background: /boot/grub/gnu.png
+ echo ### END /etc/grub.d/00_header ###
+ grub_file_is_not_garbage /etc/grub.d/05_debian_theme
+ test -f /etc/grub.d/05_debian_theme
+ return 0
+ test -x /etc/grub.d/05_debian_theme
+ echo
+ echo ### BEGIN /etc/grub.d/05_debian_theme ###
+ /etc/grub.d/05_debian_theme
Found background image: moreblue-orbit-grub.png
+ echo ### END /etc/grub.d/05_debian_theme ###
+ grub_file_is_not_garbage /etc/grub.d/10_linux
+ test -f /etc/grub.d/10_linux
+ return 0
+ test -x /etc/grub.d/10_linux
+ echo
+ echo ### BEGIN /etc/grub.d/10_linux ###
+ /etc/grub.d/10_linux
Found linux image: /boot/vmlinuz-2.6.32-5-686
Found initrd image: /boot/initrd.img-2.6.32-5-686
Found linux image: /boot/vmlinuz-2.6.32-3-686
Found initrd image: /boot/initrd.img-2.6.32-3-686
+ echo ### END /etc/grub.d/10_linux ###
+ grub_file_is_not_garbage /etc/grub.d/30_os-prober
+ test -f /etc/grub.d/30_os-prober
+ return 0
+ test -x /etc/grub.d/30_os-prober
+ echo
+ echo ### BEGIN /etc/grub.d/30_os-prober ###
+ /etc/grub.d/30_os-prober
+ echo ### END /etc/grub.d/30_os-prober ###
+ grub_file_is_not_garbage /etc/grub.d/40_custom
+ test -f /etc/grub.d/40_custom
+ return 0
+ test -x /etc/grub.d/40_custom
+ echo
+ echo ### BEGIN /etc/grub.d/40_custom ###
+ /etc/grub.d/40_custom
+ echo ### END /etc/grub.d/40_custom ###
+ grub_file_is_not_garbage /etc/grub.d/41_custom
+ test -f /etc/grub.d/41_custom
+ return 0
+ test -x /etc/grub.d/41_custom
+ echo
+ echo ### BEGIN /etc/grub.d/41_custom ###
+ /etc/grub.d/41_custom
+ echo ### END /etc/grub.d/41_custom ###
+ grub_file_is_not_garbage /etc/grub.d/README
+ test -f /etc/grub.d/README
+ return 0
+ test -x /etc/grub.d/README
+ [ x/boot/grub/grub.cfg != x ]
+ grep -q ^password  /boot/grub/grub.cfg.new
+ chmod 444 /boot/grub/grub.cfg.new
+ test x/boot/grub/grub.cfg != x
+ mv -f /boot/grub/grub.cfg.new /boot/grub/grub.cfg
+ echo done
done

>> * the background-picture is still not displayed
>> * the resolution of the screen is still bad until the kernel is setting
>>   the font later during booting
>
> vga= doesn't work with the 32-bit boot protocol now used by GRUB 2.  You
> can use GRUB_GFXPAYLOAD_LINUX (see 'info grub' in unstable; there are
> caveats)

Ok, thank you. I should have seen the deprecated warning myself.

But neither GRUB_GFXPAYLOAD_LINUX=keep in combination with
GRUB_GFXMODE=0x105 nor GRUB_GFXPAYLOAD_LINUX=1024x768x8 worked.

So i tested:
> edit /etc/grub.d/10_linux and change places where it emits 'linux'
> and 'initrd' commands to 'linux16' and 'initrd16' respectively.
and it worked. Was this changed in the last weeks? Because it worked a
few weeks ago.

But this didn’t fix the other minor issues: resolution and the
background-image in the grub menu, which both broke on the same
update.

Best regards
Miche









More information about the Pkg-grub-devel mailing list