When trying to install GRUB inside a KVM VM on a virtio device ( /dev/vda ) these are the results: 'grub-install /dev/vda' → "/dev/vda does not have any corresponding BIOS drive." 'grub> root (hd0)' → 'Error 21: Selected disk does not exist' There's a patch provided by Debian: http://patch-tracking.debian.net/patch/series/view/grub/0.97-51/use_grub-probe_in_grub-install.diff I've tried to apply it but wasn't successful - some hunks were rejected. Maybe someone with a little more knowledge gets it working. Reproducible: Always
As of debian's 0.97-47, use_grub-probe_in_grub-install.diff was useless. Did it change between then and 51?
Oh, and have you tested -r9?
No response from user.
Sorry for not responding to this bug - it must have been slipped through my fingers. Just tried 0.97-r9 and it worked, when doing this: Add this line to /boot/grub/device.map: (hd0) /dev/vda Open GRUB shell and specify the root device: grub> root (hd0,0) Filesystem type is ext2fs, partition type 0x83 Run the GRUB shell setup routine: grub> setup (hd0) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 18 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd0) (hd0)1+18 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... suc ceeded Done.
*** Bug 302755 has been marked as a duplicate of this bug. ***
I guess we don't need multiple bugs for the same issue. Re-opening this one.
I have the same issue here: emerge -pv grub [ebuild R ] sys-boot/grub-0.97-r9 USE="ncurses -custom-cflags -netboot -static" 0 kB cat /boot/grub/device.map (hd0) /dev/vda grub --no-floppy grub> root (hd0,0) Error 21: Selected disk does not exist grub> find /boot/grub/stage1 Error 15: File not found grub-install --no-floppy /dev/vda expr: non-numeric argument /dev/vda1 does not have any corresponding BIOS drive. I install grub successfully by booting kvm without if=virtio and after install correctly grub I reboot with if=virtio ;) Truzzone
(In reply to comment #7) > I have the same issue here: > > emerge -pv grub > [ebuild R ] sys-boot/grub-0.97-r9 USE="ncurses -custom-cflags -netboot > -static" 0 kB > > cat /boot/grub/device.map > (hd0) /dev/vda > > grub --no-floppy > grub> root (hd0,0) > Error 21: Selected disk does not exist > grub> find /boot/grub/stage1 > Error 15: File not found > > grub-install --no-floppy /dev/vda > expr: non-numeric argument > /dev/vda1 does not have any corresponding BIOS drive. > > I install grub successfully by booting kvm without if=virtio and after install > correctly grub I reboot with if=virtio ;) > > Truzzone > Try: grub --device-map=/boot/grub/device.map Also make sure there is only one entry for hd(0) in device.map The above worked for me.
Fedora should have a patch for this in their rpms: https://bugzilla.redhat.com/show_bug.cgi?id=479760
> Try: > grub --device-map=/boot/grub/device.map > Also make sure there is only one entry for hd(0) in device.map > The above worked for me. > ok, with this command works ok under virtio. Thanks
Now committed and published as new patchset: grub-0.97-patches-1.10.tar.bz2 Ebuild sys-boot/grub-0.97-r10 committed.
Hi, grub version:sys-boot/grub-0.97-r10 I'm just installing a new system in kvm, so my disk is /dev/vda and have still this problem. echo "(hd0) /dev/vda">> /boot/grub/device.map solves the problem.