Bug#479056: grub: destroys /boot/grub/device.map
Aurelien Jarno
aurel32 at debian.org
Fri May 2 22:37:28 UTC 2008
On Fri, May 02, 2008 at 09:18:01PM +0200, Robert Millan wrote:
> On Fri, May 02, 2008 at 03:27:38PM +0200, Aurelien Jarno wrote:
> >
> > Starting with version 0.97-33, /usr/sbin/update-grub destroys
> > /boot/grub/device.map,
>
> This is (probably) intentional. When device.map doesn't contain the needed
> information, it regenerates it with grub-mkdevicemap in an attempt to solve
> the situation.
>
> > and then outputs the following error message:
> >
> > Searching for GRUB installation directory ... found: /boot/grub
> > grub-probe: error: Cannot find a GRUB drive for /dev/vda1. Check your device.map.
> >
> > Here is the contents of /boot/grub/device.map before it is destroyed:
> > (fd0) /dev/fd0
> > (hd0) /dev/vda
> >
> > /dev/vda corresponds to the first virtio device.
>
> AFAICS there are two problems here:
>
> - grub-mkdevicemap doesn't grok virtio devices. Could you confirm the
> attached quick & dirty patch makes it work? Also, is this device path
> Linux-specific?
Yes that make it working. Currently virtio is only supported on Linux,
so the device patch is Linux-specific. But that may change in the future
> - grub-probe can't handle the conversion (once device.map is correct). I
> need more information about this. Try:
> grub-probe -t drive -d /dev/vda -v
> and maybe also:
> grub-probe -t drive -d /dev/vda -vv
>
# grub-probe -t drive -d /dev/vda -v
grub-probe: info: the size of hd0 is 25165824
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: the size of hd0 is 25165824
grub-probe: info: the size of hd0 is 25165824
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: the size of hd0 is 25165824
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: the size of hd0 is 25165824
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: the size of hd0 is 25165824
grub-probe: info: the size of hd0 is 25165824
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: the size of hd0 is 25165824
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: /dev/vda starts from 0
(hd0)
# grub-probe -t drive -d /dev/vda -vv
grub-probe: info: the size of hd0 is 25165824
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: the size of hd0 is 25165824
grub-probe: info: the size of hd0 is 25165824
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: the size of hd0 is 25165824
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:220: Opening `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:312: Closing `hd0'.
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:220: Opening `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/partition.c:108: Detecting gpt_partition_map...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/partition.c:114: gpt_partition_map detection failed.
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/partition.c:108: Detecting apple_partition_map...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/apple.c:124: partition 0: bad magic (found 0x5256; wanted 0x504d
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/partition.c:114: apple_partition_map detection failed.
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/partition.c:108: Detecting pc_partition_map...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 0: flag 0x0, type 0x83, start 0x3f, len 0x16370eb
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/partition.c:119: pc_partition_map detection succeeded.
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 0: flag 0x0, type 0x83, start 0x3f, len 0x16370eb
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:220: Opening `hd0,1'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,1'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,1'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/apple.c:124: partition 0: bad magic (found 0x5256; wanted 0x504d
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,1'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 0: flag 0x0, type 0x83, start 0x3f, len 0x16370eb
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,1'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,1'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,1'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,1'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:312: Closing `hd0,1'.
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 1: flag 0x0, type 0x5, start 0x163712a, len 0x1c6f74
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 0: flag 0x0, type 0x82, start 0x1637169, len 0x1c6f35
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:220: Opening `hd0,5'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,5'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,5'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/apple.c:124: partition 0: bad magic (found 0x5256; wanted 0x504d
/home/grub-probe: info: opening the device `/dev/vda'
grub-probe: info: the size of hd0 is 25165824
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: the size of hd0 is 25165824
grub-probe: info: the size of hd0 is 25165824
rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,5'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 0: flag 0x0, type 0x83, start 0x3f, len 0x16370eb
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 1: flag 0x0, type 0x5, start 0x163712a, len 0x1c6f74
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,5'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 0: flag 0x0, type 0x82, start 0x1637169, len 0x1c6f35
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,5'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,5'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,5'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,5'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:312: Closing `hd0,5'.
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 1: flag 0x0, type 0x0, start 0x163712a, len 0x0
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 2: flag 0x0, type 0x0, start 0x163712a, len 0x0
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 3: flag 0x0, type 0x0, start 0x163712a, len 0x0
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:312: Closing `hd0'.
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/disk/raid.c:359: Scanning for RAID devices
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:220: Opening `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:312: Closing `hd0'.
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:220: Opening `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/partition.c:108: Detecting gpt_partition_map...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/partition.c:114: gpt_partition_map detection failed.
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/partition.c:108: Detecting apple_partition_map...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/apple.c:124: partition 0: bad magic (found 0x5256; wanted 0x504d
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/partition.c:114: apple_partition_map detection failed.
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/partition.c:108: Detecting pc_partition_map...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 0: flag 0x0, type 0x83, start 0x3f, len 0x16370eb
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/partition.c:119: pc_partition_map detection succeeded.
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 0: flag 0x0, type 0x83, start 0x3f, len 0x16370eb
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/disk/raid.c:359: Scanning for RAID devices
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:220: Opening `hd0,1'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,1'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,1'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/apple.c:124: partition 0: bad magic (found 0x5256; wanted 0x504d
/grub-probe: info: opening the device `/dev/vda'
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: the size of hd0 is 25165824
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: opening the device `/dev/vda'
grub-probe: info: /dev/vda starts from 0
home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,1'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 0: flag 0x0, type 0x83, start 0x3f, len 0x16370eb
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,1'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:312: Closing `hd0,1'.
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 1: flag 0x0, type 0x5, start 0x163712a, len 0x1c6f74
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 0: flag 0x0, type 0x82, start 0x1637169, len 0x1c6f35
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/disk/raid.c:359: Scanning for RAID devices
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:220: Opening `hd0,5'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,5'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,5'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/apple.c:124: partition 0: bad magic (found 0x5256; wanted 0x504d
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,5'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 0: flag 0x0, type 0x83, start 0x3f, len 0x16370eb
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 1: flag 0x0, type 0x5, start 0x163712a, len 0x1c6f74
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,5'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 0: flag 0x0, type 0x82, start 0x1637169, len 0x1c6f35
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:364: Reading `hd0,5'...
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:312: Closing `hd0,5'.
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 1: flag 0x0, type 0x0, start 0x163712a, len 0x0
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 2: flag 0x0, type 0x0, start 0x163712a, len 0x0
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/partmap/pc.c:141: partition 3: flag 0x0, type 0x0, start 0x163712a, len 0x0
/home/rmh/hacking/grub/svn/upload/grub2-1.96+20080429/kern/disk.c:312: Closing `hd0'.
(hd0)
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32 at debian.org | aurelien at aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
More information about the Pkg-grub-devel
mailing list