From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Kraus Subject: Re: grub booting from virtio but can't see virtio disks Date: Sat, 7 Aug 2010 17:31:16 +0200 Message-ID: <20100807153114.GA8631@/bin/hostname> References: <20100802190548.GF18585@/bin/hostname> <20100803055859.GR24773@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm To: Gleb Natapov Return-path: Received: from fedecks.wujiman.net ([212.71.128.163]:45393 "EHLO fedecks.wujiman.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752061Ab0HGRwG (ORCPT ); Sat, 7 Aug 2010 13:52:06 -0400 Content-Disposition: inline In-Reply-To: <20100803055859.GR24773@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Aug 03, 2010 at 08:58:59AM +0300, Gleb Natapov wrote: > On Mon, Aug 02, 2010 at 09:05:48PM +0200, Martin Kraus wrote: > > Hi. I've been wondering why grub can boot from a virtio device but can't see > > virtio devices. I wanted to have a generic disk which would have a bios > > partition with grub modules and this would include grub.cfg from a second disk. > > I could use this image to boot all my virtual linux machines without the need > > to have a partition on a logical volume. This way I have a separate virtio > > boot lv with partitions and it works fine. It just doesn't seem as nice and I'm > > curious if there is a way to get it to work, meaning if for example using efi > > or some other kind of bios for qemu or grub module would help it. > > > What is your qemu version and qemu command line? debian squeeze 0.12.4 kvm -cpu host -drive file=/dev/mapper/virtual-ctech_boot,boot=on,if=virtio,cache=none -drive file=/dev/mapper/virtual-ctech,if=virtio,cache=none virtual-ctech_boot is partitioned and mounts as "/boot" in the virtual guest and virtual-ctech is not partitioned and is mounted as "/". This works fine but grub sees only the virtual-ctech_boot from which it is booting. From that I see it is possible to access virtio devices at boot time but somehow the bootdisk is different from the other disk. I have to set if=ide for virtual-ctech for grub to be able to see it. Is it possible to see all the virtio disks in grub or am I just out of luck? thanks mk