All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Dehennin <daniel.dehennin@baby-gnu.org>
To: grub-devel@gnu.org
Subject: grub2 disk error with kvm
Date: Mon, 11 Aug 2008 14:08:58 +0200	[thread overview]
Message-ID: <87vdy7g3dx.fsf@hati.baby-gnu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1724 bytes --]

Hello,

I post a bug report here as asked by nyu on #grub.

=== IRC LOG ===
[13:32] <nyu> nebuchadnezzar: could you report the grub one first?  the problem
    is grub_biosdisk_get_diskinfo_standard() fails, but this call wasn't used
    when probing for drives (and I think it should be)
=== IRC LOG ===

I have a kvm machine featuring debian lenny (now upgraded to sid).
It has only one disk configured, with one partition as LVM so I
install grub2 1.96+20080724-7.

When booting I have the following error:

===
error: unknown drive hd15
Entering rescue mode...
===

This does not come from the configuration, I renamed grub.cfg and the
same happens.

Nyu ask me to remove the grub_error call line 53:
grub_error (GRUB_ERR_BAD_DEVICE, "unknown device %s", name);

Then it gives me "error: no such disk".

In rescue mode:
- I can insmod normal and enter in normal mode to boot my system.
- ls gives me (lenny-var) (lenny-usr) (lenny-root) (lenny-boot) (hd0) (hd0,1) (hd1) (hd2)...(hd15)

The problem happens only when using the kvm -drive option:
sudo /usr/bin/kvm -M pc -m 256 -smp 1 -name lenny -monitor stdio \
    -boot c -drive file=/dev/hati/lenny,if=virtio,index=0,boot=on \
    -net nic,model=virtio,vlan=0 -net tap,vlan=0,ifname=vnet0 \
    -serial pty -parallel none -k fr

Replacing this by -hda makes it work:

sudo /usr/bin/kvm -M pc -m 256 -smp 1 -name lenny -monitor stdio \
    -boot c -hda dev/hati/lenny \
    -net nic,model=virtio,vlan=0 -net tap,vlan=0,ifname=vnet0 \
    -serial pty -parallel none -k fr

I provide the grub.cfg as attachement, I can provide lspci, dmesg or
what ever you need.

Regards.
-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1


[-- Attachment #2: grub.cfg --]
[-- Type: text/plain, Size: 1385 bytes --]

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/update-grub using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
set timeout=5
insmod lvm
set root=(lenny-usr)
search --fs-uuid --set b67ea215-b6ec-40cc-bfe8-56e1284a42c8
if font /share/grub/ascii.pff ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  terminal gfxterm
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_hurd ###
### END /etc/grub.d/10_hurd ###

### BEGIN /etc/grub.d/10_linux ###
insmod lvm
set root=(lenny-boot)
search --fs-uuid --set 5b03d02f-e69e-418d-8f03-b0eb4e3185de
menuentry "Debian GNU/Linux, linux 2.6.25-2-amd64" {
	linux	/vmlinuz-2.6.25-2-amd64 root=/dev/mapper/lenny-root ro  vga=0x318
	initrd	/initrd.img-2.6.25-2-amd64
}
menuentry "Debian GNU/Linux, linux 2.6.25-2-amd64 (single-user mode)" {
	linux	/vmlinuz-2.6.25-2-amd64 root=/dev/mapper/lenny-root ro single 
	initrd	/initrd.img-2.6.25-2-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file is an example on how to add custom entries
### END /etc/grub.d/40_custom ###

             reply	other threads:[~2008-08-11 12:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-11 12:08 Daniel Dehennin [this message]
2008-08-11 14:40 ` grub2 disk error with kvm Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vdy7g3dx.fsf@hati.baby-gnu.org \
    --to=daniel.dehennin@baby-gnu.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.