Bug#708614: grub-common: Regression from 1.99: update-grub fails in Xen DomU: warning: grub-probe can't find drive for /dev/xvda1.

2013-08-13 Thread Colin Watson
On Mon, Aug 12, 2013 at 07:56:30PM +0200, Axel Beckert wrote:
 Colin Watson wrote:
  OK, so what I need is the output of:
  
grub-probe -vv --device /dev/xvda1 --target=fs_uuid
 
 # grub-probe -vv --device /dev/xvda1 --target=fs_uuid
 grub-probe: info: Looking for /dev/xvda1.
 grub-probe: info: /dev/xvda is a parent of /dev/xvda1.
 grub-probe: info: /dev/xvda1 starts from 0.
 grub-probe: info: opening the device hostdisk//dev/xvda.
 grub-core/kern/disk.c:230: Opening `hostdisk//dev/xvda'...
 grub-core/kern/disk.c:312: Opening `hostdisk//dev/xvda' failed.
 grub-core/kern/disk.c:326: Closing `hostdisk//dev/xvda'.
 grub-probe: warning: disk does not exist, so falling back to partition device 
 /dev/xvda1.
 grub-probe: info: Looking for /dev/xvda1.
 grub-probe: info: /dev/xvda is a parent of /dev/xvda1.
 grub-probe: info: Looking for /dev/xvda1.
 grub-probe: info: /dev/xvda is a parent of /dev/xvda1.
 grub-probe: error: cannot find a GRUB drive for /dev/xvda1.  Check your 
 device.map.

Thanks.  This is apparently a recurrence of
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/623609 - I'll need
to apply gdb at strategic points to figure out where that went wrong, I
think.

-- 
Colin Watson   [cjwat...@debian.org]


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#708614: grub-common: Regression from 1.99: update-grub fails in Xen DomU: warning: grub-probe can't find drive for /dev/xvda1.

2013-08-12 Thread Colin Watson
On Sun, Aug 11, 2013 at 06:22:00PM +0200, Axel Beckert wrote:
 Colin Watson wrote:
  On Fri, May 17, 2013 at 10:55:24AM +0200, Axel Beckert wrote:
   warning: grub-probe can't find drive for /dev/xvda1.
   grub-probe: warning: disk does not exist, so falling back to partition 
   device /dev/xvda1.
   grub-probe: error: cannot find a GRUB drive for /dev/xvda1.  Check your 
   device.map.
  
  Sorry I've taken so long to reply to this.  Could you figure out the
  grub-probe command here, run it with the -vv option added, and attach
  the output?
 
 Output of version 2.00-15:
 
 # grub-probe -vv /dev/xvda1
 grub-probe: error: failed to get canonical path of udev.

I don't think that can possibly be the command that grub-mkconfig was
running.  You need to run sh -x /usr/sbin/grub-mkconfig /dev/null,
look for the failing grub-probe command in that output, and add the -vv
option to it.

-- 
Colin Watson   [cjwat...@debian.org]


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#708614: grub-common: Regression from 1.99: update-grub fails in Xen DomU: warning: grub-probe can't find drive for /dev/xvda1.

2013-08-12 Thread Axel Beckert
Hi Colin,

Colin Watson wrote:
   Sorry I've taken so long to reply to this.  Could you figure out the
   grub-probe command here, run it with the -vv option added, and attach
   the output?
  
  Output of version 2.00-15:
  
  # grub-probe -vv /dev/xvda1
  grub-probe: error: failed to get canonical path of udev.

JFTR: This command did not fail with 1.99 and have tons of output
lines.

 I don't think that can possibly be the command that grub-mkconfig was
 running.  You need to run sh -x /usr/sbin/grub-mkconfig /dev/null,
 look for the failing grub-probe command in that output, and add the -vv
 option to it.

Thanks for that hint. I actually wasn't sure where to start and I
started with error messages + --help (and there it looked as if any
options were optional). But since the command worked in 1.99 and
failed in 2.00 it looked like it would show the differences.

Since I saw there are multiple calls of grub-probe, so I add the
output of all of them:

# /usr/sbin/grub-probe --target=device /
/dev/xvda1
# /usr/sbin/grub-probe --device /dev/xvda1 --target=fs_uuid
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to 
partition device /dev/xvda1.
/usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/xvda1. Check 
your device.map.
# /usr/sbin/grub-probe --device /dev/xvda1 --target=fs
/usr/sbin/grub-probe: warning: disk does not exist, so falling back to 
partition device /dev/xvda1.
/usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/xvda1.  Check 
your device.map.

Then from /etc/grub.d/10_linux. As that one wasn't run with -x, too, I
ran it separately and the output of sh -x already showed some issues:

# sh -x /etc/grub.d/10_linux 21 | fgrep grub-probe
+ echo grub-probe
+ grub_probe=/usr/sbin/grub-probe
+ /usr/sbin/grub-probe --device --target=fs

That gave:

# /usr/sbin/grub-probe --device --target=fs
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try `grub-probe --help' or `grub-probe --usage' for more information.

+ /usr/sbin/grub-probe --device  --target=fs_uuid

That gave:

# /usr/sbin/grub-probe --device  --target=fs_uuid
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try `grub-probe --help' or `grub-probe --usage' for more information.

+ /usr/sbin/grub-probe --device  --target=partmap
/usr/sbin/grub-probe: error: cannot find a GRUB drive for .  Check your 
device.map.

Full output:

# /usr/sbin/grub-probe --device  --target=partmap
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try `grub-probe --help' or `grub-probe --usage' for more information.

The remaining output seems just to be a repetition:

+ /usr/sbin/grub-probe --device  --target=fs_uuid
+ /usr/sbin/grub-probe --device  --target=fs_uuid
+ /usr/sbin/grub-probe --device  --target=partmap
/usr/sbin/grub-probe: error: cannot find a GRUB drive for .  Check your 
device.map.
+ /usr/sbin/grub-probe --device  --target=fs_uuid
+ /usr/sbin/grub-probe --device  --target=partmap
/usr/sbin/grub-probe: error: cannot find a GRUB drive for .  Check your 
device.map.
+ /usr/sbin/grub-probe --device  --target=fs_uuid
+ /usr/sbin/grub-probe --device  --target=partmap
/usr/sbin/grub-probe: error: cannot find a GRUB drive for .  Check your 
device.map.
+ /usr/sbin/grub-probe --device  --target=fs_uuid
+ /usr/sbin/grub-probe --device  --target=partmap
/usr/sbin/grub-probe: error: cannot find a GRUB drive for .  Check your 
device.map.
+ /usr/sbin/grub-probe --device  --target=fs_uuid
+ /usr/sbin/grub-probe --device  --target=partmap
/usr/sbin/grub-probe: error: cannot find a GRUB drive for .  Check your 
device.map.
+ /usr/sbin/grub-probe --device  --target=fs_uuid
+ /usr/sbin/grub-probe --device  --target=partmap
/usr/sbin/grub-probe: error: cannot find a GRUB drive for .  Check your 
device.map.
+ /usr/sbin/grub-probe --device  --target=fs_uuid
+ /usr/sbin/grub-probe --device  --target=partmap
/usr/sbin/grub-probe: error: cannot find a GRUB drive for .  Check your 
device.map.
[...]

HTH

Regards, Axel
-- 
 ,''`.  |  Axel Beckert a...@debian.org, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-|  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#708614: grub-common: Regression from 1.99: update-grub fails in Xen DomU: warning: grub-probe can't find drive for /dev/xvda1.

2013-08-12 Thread Colin Watson
On Mon, Aug 12, 2013 at 06:25:45PM +0200, Axel Beckert wrote:
 Since I saw there are multiple calls of grub-probe, so I add the
 output of all of them:
 
 # /usr/sbin/grub-probe --target=device /
 /dev/xvda1
 # /usr/sbin/grub-probe --device /dev/xvda1 --target=fs_uuid
 /usr/sbin/grub-probe: warning: disk does not exist, so falling back to 
 partition device /dev/xvda1.
 /usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/xvda1. Check 
 your device.map.

OK, so what I need is the output of:

  grub-probe -vv --device /dev/xvda1 --target=fs_uuid

-- 
Colin Watson   [cjwat...@debian.org]


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#708614: grub-common: Regression from 1.99: update-grub fails in Xen DomU: warning: grub-probe can't find drive for /dev/xvda1.

2013-08-12 Thread Axel Beckert
Hi Colin,

Colin Watson wrote:
 OK, so what I need is the output of:
 
   grub-probe -vv --device /dev/xvda1 --target=fs_uuid

# grub-probe -vv --device /dev/xvda1 --target=fs_uuid
grub-probe: info: Looking for /dev/xvda1.
grub-probe: info: /dev/xvda is a parent of /dev/xvda1.
grub-probe: info: /dev/xvda1 starts from 0.
grub-probe: info: opening the device hostdisk//dev/xvda.
grub-core/kern/disk.c:230: Opening `hostdisk//dev/xvda'...
grub-core/kern/disk.c:312: Opening `hostdisk//dev/xvda' failed.
grub-core/kern/disk.c:326: Closing `hostdisk//dev/xvda'.
grub-probe: warning: disk does not exist, so falling back to partition device 
/dev/xvda1.
grub-probe: info: Looking for /dev/xvda1.
grub-probe: info: /dev/xvda is a parent of /dev/xvda1.
grub-probe: info: Looking for /dev/xvda1.
grub-probe: info: /dev/xvda is a parent of /dev/xvda1.
grub-probe: error: cannot find a GRUB drive for /dev/xvda1.  Check your 
device.map.
# cat /boot/grub/device.map
(hd0)   /dev/xvda1
# 

HTH.

Regards, Axel
-- 
 ,''`.  |  Axel Beckert a...@debian.org, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-|  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#708614: grub-common: Regression from 1.99: update-grub fails in Xen DomU: warning: grub-probe can't find drive for /dev/xvda1.

2013-08-11 Thread Colin Watson
On Fri, May 17, 2013 at 10:55:24AM +0200, Axel Beckert wrote:
 warning: grub-probe can't find drive for /dev/xvda1.
 grub-probe: warning: disk does not exist, so falling back to partition device 
 /dev/xvda1.
 grub-probe: error: cannot find a GRUB drive for /dev/xvda1.  Check your 
 device.map.

Sorry I've taken so long to reply to this.  Could you figure out the
grub-probe command here, run it with the -vv option added, and attach
the output?

(Feel free to track me down at DebConf as well if you have remote access
to the relevant system.)

-- 
Colin Watson   [cjwat...@debian.org]


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#708614: grub-common: Regression from 1.99: update-grub fails in Xen DomU: warning: grub-probe can't find drive for /dev/xvda1.

2013-08-11 Thread Axel Beckert
Hi Colin,

Colin Watson wrote:
 On Fri, May 17, 2013 at 10:55:24AM +0200, Axel Beckert wrote:
  warning: grub-probe can't find drive for /dev/xvda1.
  grub-probe: warning: disk does not exist, so falling back to partition 
  device /dev/xvda1.
  grub-probe: error: cannot find a GRUB drive for /dev/xvda1.  Check your 
  device.map.
 
 Sorry I've taken so long to reply to this.  Could you figure out the
 grub-probe command here, run it with the -vv option added, and attach
 the output?

Output of version 2.00-15:

# grub-probe -vv /dev/xvda1
grub-probe: error: failed to get canonical path of udev.
# apt-cache policy udev
udev:
  Installed: 175-7.2
  Candidate: 175-7.2
  Version table:
 204-2 0
110 http://ftp.ch.debian.org/debian/ experimental/main amd64 Packages
 *** 175-7.2 0
990 http://ftp.ch.debian.org/debian/ sid/main amd64 Packages
600 http://ftp.ch.debian.org/debian/ testing/main amd64 Packages
400 http://ftp.ch.debian.org/debian/ stable/main amd64 Packages
100 /var/lib/dpkg/status

HTH.

Regards, Axel
-- 
 ,''`.  |  Axel Beckert a...@debian.org, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-|  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#708614: grub-common: Regression from 1.99: update-grub fails in Xen DomU: warning: grub-probe can't find drive for /dev/xvda1.

2013-05-17 Thread Axel Beckert
Package: grub-common
Version: 2.00-14
Severity: grave

Hi,

I'm running Sid with kernels from Experimental inside a Xen DomU. The
DomU is booted via pygrub, i.e. with its own kernels.

Hence I need a /boot/grub/menu.lst inside the DomU. To generate that I
use update-grub for quite some time (IIRC years) now. Additionally,
the grub-legacy package (0.97-67) is installed, too, but GRUB is not
installed to any disk (as pygrub is used from outside the virtual
machine).

But since the upgrade from 1.99-27.1 to 2.00-14, installing new kernel
images (namely linux-image-3.8-1-amd64 and linux-image-3.8-2-amd64)
failed as follows:

Setting up linux-image-3.8-1-amd64 (3.8.12-1) ...
Running depmod.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-dater-host_reboot 3.8-1-amd64 
/boot/vmlinuz-3.8-1-amd64
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.8-1-amd64 
/boot/vmlinuz-3.8-1-amd64
update-initramfs: Generating /boot/initrd.img-3.8-1-amd64
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.8-1-amd64 
/boot/vmlinuz-3.8-1-amd64
Searching for GRUB installation directory ... found: /boot/grub
warning: grub-probe can't find drive for /dev/xvda1.
grub-probe: warning: disk does not exist, so falling back to partition device 
/dev/xvda1.
grub-probe: error: cannot find a GRUB drive for /dev/xvda1.  Check your 
device.map.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postinst.d at 
/var/lib/dpkg/info/linux-image-3.8-1-amd64.postinst line 696, STDIN line 2.
dpkg: error processing linux-image-3.8-1-amd64 (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up linux-image-3.8-2-amd64 (3.8.13-1) ...
Running depmod.
vmlinuz(/boot/vmlinuz-3.8-2-amd64
) points to /boot/vmlinuz-3.8-2-amd64
 (/boot/vmlinuz-3.8-2-amd64) -- doing nothing at 
/var/lib/dpkg/info/linux-image-3.8-2-amd64.postinst line 268.
initrd.img(/boot/initrd.img-3.8-2-amd64
) points to /boot/initrd.img-3.8-2-amd64
 (/boot/initrd.img-3.8-2-amd64) -- doing nothing at 
/var/lib/dpkg/info/linux-image-3.8-2-amd64.postinst line 268.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-dater-host_reboot 3.8-2-amd64 
/boot/vmlinuz-3.8-2-amd64
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.8-2-amd64 
/boot/vmlinuz-3.8-2-amd64
update-initramfs: Generating /boot/initrd.img-3.8-2-amd64
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.8-2-amd64 
/boot/vmlinuz-3.8-2-amd64
Searching for GRUB installation directory ... found: /boot/grub
warning: grub-probe can't find drive for /dev/xvda1.
grub-probe: warning: disk does not exist, so falling back to partition device 
/dev/xvda1.
grub-probe: error: cannot find a GRUB drive for /dev/xvda1.  Check your 
device.map.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postinst.d at 
/var/lib/dpkg/info/linux-image-3.8-2-amd64.postinst line 696.
dpkg: error processing linux-image-3.8-2-amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-3.8-1-amd64
 linux-image-3.8-2-amd64

Downgrading grub-common to the version from Wheezy/Jessie
(1.99-27+deb7u1) solved the failures.

Some more information about the virtual disk /dev/xvda1 and the grub
configuration:

$ fgrep /dev/xvda1 /etc/fstab
/dev/xvda1 / ext3 errors=remount-ro   0 1
$ cat /proc/cmdline
root=/dev/xvda1 ro root=/dev/xvda1 ro 
$ ls -l /dev/xvda*
brw-rw---T 1 root disk 202, 1 Aug 28  2012 /dev/xvda1
brw-rw---T 1 root disk 202, 2 Aug 28  2012 /dev/xvda2
$  swapon -s
FilenameTypeSizeUsedPriority
/dev/xvda2  partition   2097148 66892   -1
$ cat /boot/grub/menu.lst
# menu.lst - See: grub(8), info grub, update-grub(8)
#grub-install(8), grub-floppy(8),
#grub-md5-crypt, /usr/share/doc/grub
#and /usr/share/doc/grub-legacy-doc/.

default 0
timeout 5

# Pretty colours
color cyan/blue white/blue

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##  kopt_2_6_8=root=/dev/hdc1 ro
##  kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/xvda1 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic