Skip to contentSkip to conversation

grub-probe can't find device (regression) Bug #33133

DISCUSSION Ian Dall 3 participants 3 messages Apr 20, 2011 – Apr 21, 2011

lore
Share & tools
lore

Ian Dall

author
#0 lore raw

I have reported bug #33133 in savannah.

The issue is that "grub-probe -v --target=device /tmp/root/boot" fails in current trunk. The issue appears to have been introduced in revision 3214 into grub/grub-core/kern/emu/getroot.c:grub_find_root_device_from_mountinfo().

/tmp for me is a tmpfs. /tmp/root has mounted on it a USB pen (/dev/sdd1).

Steppign through with gdb, it seems that the list of entries gets created properly, but around line 209, there is something curious:

if (entries[i].major != 0)
continue; /* not a virtual device */

which I can't understand. Its effect is to always skip over mount points for real devices. I'm not really sure I completely understand what this virtual device work around is. But may this whole test is just bogus. Why not the "lowest" mount enclosing the path?

Regards,
Ian

Signature · 1 line
Ian Dall <[email protected]>
#1 lore raw
Quoted 6 lines

Steppign through with gdb, it seems that the list of entries gets created properly, but around line 209, there is something curious:

if (entries[i].major != 0)
continue; /* not a virtual device */

@cjwatson: it's a mismerge. Could you fix it?

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#2 lore raw
Quoted 8 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 5 lines · Ian Dall

Steppign through with gdb, it seems that the list of entries gets created properly, but around line 209, there is something curious:

if (entries[i].major != 0)
continue; /* not a virtual device */

@cjwatson: it's a mismerge. Could you fix it?

It is indeed. Sorry about that. I had the two relevant patches in the opposite order in my quilt series from the order in which they were applied to trunk, and a certain amount of confusion resulted from resolving this.

I've removed this bogus test now.

2011-04-21 Colin Watson <[email protected]>

* grub-core/kern/emu/getroot.c (grub_find_root_device_from_mountinfo): Remove non-virtual-device test that was incorrectly reintroduced in r3214. Reported by: Ian Dall. Fixes Savannah bug #33133.

Thanks,

Signature · 1 line
Colin Watson                                       [[email protected]]