* GRUB and support for Virtio
@ 2010-08-18 4:54 Daniel Bareiro
2010-08-18 12:49 ` Martin Kraus
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Bareiro @ 2010-08-18 4:54 UTC (permalink / raw)
To: KVM General
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]
Hi all!
I'm doing some tests in a KVM virtual machine with CentOS 5.5 and it
seems that GRUB is not recognizing the Virtio devices:
# ll /dev/vd*
brw-r----- 1 root disk 253, 0 ago 17 23:35 /dev/vda
brw-r----- 1 root disk 253, 1 ago 17 23:35 /dev/vda1
brw-r----- 1 root disk 253, 2 ago 17 23:35 /dev/vda2
brw-r----- 1 root disk 253, 16 ago 18 00:27 /dev/vdb
brw-r----- 1 root disk 253, 17 ago 18 00:32 /dev/vdb1
brw-r----- 1 root disk 253, 18 ago 18 00:32 /dev/vdb2
-----------------------------------------------------------------------
# grub
Probing devices to guess BIOS drives. This may take a long time.
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> root (hd0,0)
root (hd0,0)
Error 21: Selected disk does not exist
grub> root (hd1,0)
root (hd1,0)
Error 21: Selected disk does not exist
-----------------------------------------------------------------------
Is there any way to solve this problem?
Thanks in advance for your replies.
Regards,
Daniel
--
Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Lenny - Linux user #188.598
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: GRUB and support for Virtio
2010-08-18 4:54 GRUB and support for Virtio Daniel Bareiro
@ 2010-08-18 12:49 ` Martin Kraus
2010-08-18 13:30 ` Daniel Bareiro
0 siblings, 1 reply; 9+ messages in thread
From: Martin Kraus @ 2010-08-18 12:49 UTC (permalink / raw)
To: dbareiro, KVM General
On Wed, Aug 18, 2010 at 01:54:22AM -0300, Daniel Bareiro wrote:
> I'm doing some tests in a KVM virtual machine with CentOS 5.5 and it
> seems that GRUB is not recognizing the Virtio devices:
>
> # ll /dev/vd*
> brw-r----- 1 root disk 253, 0 ago 17 23:35 /dev/vda
> brw-r----- 1 root disk 253, 1 ago 17 23:35 /dev/vda1
> brw-r----- 1 root disk 253, 2 ago 17 23:35 /dev/vda2
> brw-r----- 1 root disk 253, 16 ago 18 00:27 /dev/vdb
> brw-r----- 1 root disk 253, 17 ago 18 00:32 /dev/vdb1
> brw-r----- 1 root disk 253, 18 ago 18 00:32 /dev/vdb2
I've never had any problems with installing grub on virtio. what is in your
/boot/grub/device.map?
mk
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: GRUB and support for Virtio
2010-08-18 12:49 ` Martin Kraus
@ 2010-08-18 13:30 ` Daniel Bareiro
2010-08-18 15:02 ` lists
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Bareiro @ 2010-08-18 13:30 UTC (permalink / raw)
To: KVM General
[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]
Hi, Martin.
On Wednesday, 18 August 2010 14:49:57 +0200,
Martin Kraus wrote:
> > I'm doing some tests in a KVM virtual machine with CentOS 5.5 and it
> > seems that GRUB is not recognizing the Virtio devices:
> >
> > # ll /dev/vd*
> > brw-r----- 1 root disk 253, 0 ago 17 23:35 /dev/vda
> > brw-r----- 1 root disk 253, 1 ago 17 23:35 /dev/vda1
> > brw-r----- 1 root disk 253, 2 ago 17 23:35 /dev/vda2
> > brw-r----- 1 root disk 253, 16 ago 18 00:27 /dev/vdb
> > brw-r----- 1 root disk 253, 17 ago 18 00:32 /dev/vdb1
> > brw-r----- 1 root disk 253, 18 ago 18 00:32 /dev/vdb2
> I've never had any problems with installing grub on virtio. what is in
> your /boot/grub/device.map?
# cat /boot/grub/device.map
# this device map was generated by anaconda
(hd0) /dev/vda
In Debian I had no problems, but in CentOS 5.5 I came across this when I
was doing some tests to convert an existing installation in another with
RAID-1.
Thanks for your reply.
Regards,
Daniel
--
Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Lenny - Linux user #188.598
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: GRUB and support for Virtio
2010-08-18 13:30 ` Daniel Bareiro
@ 2010-08-18 15:02 ` lists
2010-08-18 18:45 ` Nikolai K. Bochev
0 siblings, 1 reply; 9+ messages in thread
From: lists @ 2010-08-18 15:02 UTC (permalink / raw)
To: dbareiro, KVM General
make sure your device.map has correct maps (yours look good) then run
grub as follows:
grub --device-map=/boot/grub/device.map
I migrated all my centos 5.5 vms to virtio like that, and it worked
fine. And yes something is not correct with grub and virtio detection on
centos, it works on fedora.
fil
On 08/18/2010 09:30 AM, Daniel Bareiro wrote:
> Hi, Martin.
>
> On Wednesday, 18 August 2010 14:49:57 +0200,
> Martin Kraus wrote:
>
>>> I'm doing some tests in a KVM virtual machine with CentOS 5.5 and it
>>> seems that GRUB is not recognizing the Virtio devices:
>>>
>>> # ll /dev/vd*
>>> brw-r----- 1 root disk 253, 0 ago 17 23:35 /dev/vda
>>> brw-r----- 1 root disk 253, 1 ago 17 23:35 /dev/vda1
>>> brw-r----- 1 root disk 253, 2 ago 17 23:35 /dev/vda2
>>> brw-r----- 1 root disk 253, 16 ago 18 00:27 /dev/vdb
>>> brw-r----- 1 root disk 253, 17 ago 18 00:32 /dev/vdb1
>>> brw-r----- 1 root disk 253, 18 ago 18 00:32 /dev/vdb2
>
>> I've never had any problems with installing grub on virtio. what is in
>> your /boot/grub/device.map?
>
> # cat /boot/grub/device.map
> # this device map was generated by anaconda
> (hd0) /dev/vda
>
>
> In Debian I had no problems, but in CentOS 5.5 I came across this when I
> was doing some tests to convert an existing installation in another with
> RAID-1.
>
> Thanks for your reply.
>
> Regards,
> Daniel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: GRUB and support for Virtio
2010-08-18 15:02 ` lists
@ 2010-08-18 18:45 ` Nikolai K. Bochev
2010-08-22 0:44 ` Daniel Bareiro
2010-08-24 14:23 ` Daniel Bareiro
0 siblings, 2 replies; 9+ messages in thread
From: Nikolai K. Bochev @ 2010-08-18 18:45 UTC (permalink / raw)
To: lists; +Cc: dbareiro, KVM General
Strange, i did 2 clean installs of centos 5.5 on an ubuntu 9.10 host and it went flawless with virtio devices ( both disks and network ).
----- Original Message -----
> make sure your device.map has correct maps (yours look good) then run
> grub as follows:
>
> grub --device-map=/boot/grub/device.map
>
> I migrated all my centos 5.5 vms to virtio like that, and it worked
> fine. And yes something is not correct with grub and virtio detection
> on
> centos, it works on fedora.
>
> fil
--
Nikolai K. Bochev
System Administrator
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: GRUB and support for Virtio
2010-08-18 18:45 ` Nikolai K. Bochev
@ 2010-08-22 0:44 ` Daniel Bareiro
2010-08-24 14:23 ` Daniel Bareiro
1 sibling, 0 replies; 9+ messages in thread
From: Daniel Bareiro @ 2010-08-22 0:44 UTC (permalink / raw)
To: KVM General
[-- Attachment #1: Type: text/plain, Size: 2916 bytes --]
On Wednesday, 18 August 2010 21:45:56 +0300,
Nikolai K. Bochev wrote:
> Strange, i did 2 clean installs of centos 5.5 on an ubuntu 9.10 host
> and it went flawless with virtio devices ( both disks and network ).
It appears that Debian have the same problem. In the installation of
both Debian Lenny and CentOS 5.5, I had no problems, but appear later
using 'setup' and 'root':
-----------------------------------------------------------------------
debian-test8:~# fdisk -l /dev/vda
Disco /dev/vda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cilindros of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000b7998
Disposit. Inicio Comienzo Fin Bloques Id Sistema
/dev/vda1 1 122 979933+ 82 Linux swap / Solaris
/dev/vda2 123 1305 9502447+ 83 Linux
debian-test8:~#
debian-test8:~#
debian-test8:~# grub
Probing devices to guess BIOS drives. This may take a long time.
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> root (hd0,1)
root (hd0,1)
Error 21: Selected disk does not exist
grub>
grub> setup (hd0)
Error 12: Invalid device requested
-----------------------------------------------------------------------
But invoking GRUB with this file, it does recognize the disk:
-----------------------------------------------------------------------
debian-test8:~# cat /boot/grub/device.map
(hd0) /dev/vda
debian-test8:~# grub --device-map=/boot/grub/device.map
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> root (hd0,1)
root (hd0,1)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
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)"... 17 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,1)/boot/grub/stage2
/boot/grub/menu.lst"... succeeded
Done.
-----------------------------------------------------------------------
However, in installations made on IDE disks, it is not necessary to do
this. What could be causing this difference?
Thanks for your replies.
Regards,
Daniel
--
Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Lenny - Linux user #188.598
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: GRUB and support for Virtio
2010-08-18 18:45 ` Nikolai K. Bochev
2010-08-22 0:44 ` Daniel Bareiro
@ 2010-08-24 14:23 ` Daniel Bareiro
2010-08-24 18:51 ` SeaBIOS and GRUB booting from Virtio devices [was: GRUB and support for Virtio] Daniel Bareiro
1 sibling, 1 reply; 9+ messages in thread
From: Daniel Bareiro @ 2010-08-24 14:23 UTC (permalink / raw)
To: KVM General
[-- Attachment #1: Type: text/plain, Size: 4018 bytes --]
On Wednesday, 18 August 2010 21:45:56 +0300,
Nikolai K. Bochev wrote:
> Strange, i did 2 clean installs of centos 5.5 on an ubuntu 9.10 host
> and it went flawless with virtio devices ( both disks and network ).
Doing some tests with CentOS 5.5 on a KVM virtual machine, after doing
the installation, I added a second disk. But when trying to boot from
it, I get the following error:
---------------------------------------------------------------------
root (hd1,0)
Error 21: Selected disk does not exist
---------------------------------------------------------------------
The two disks are Virtio devices that are recognized when booting from
the first disk:
---------------------------------------------------------------------
[root@localhost ~]# fdisk -l /dev/vda
Disco /dev/vda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Unidades = cilindros de 16065 * 512 = 8225280 bytes
Disposit. Inicio Comienzo Fin Bloques Id Sistema
/dev/vda1 * 1 1174 9430123+ fd Linux raid autodetect
/dev/vda2 1175 1305 1052257+ fd Linux raid autodetect
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# fdisk -l /dev/vdb
Disco /dev/vdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Unidades = cilindros de 16065 * 512 = 8225280 bytes
Disposit. Inicio Comienzo Fin Bloques Id Sistema
/dev/vdb1 * 1 1174 9430123+ fd Linux raid autodetect
/dev/vdb2 1175 1305 1052257+ fd Linux raid autodetect
---------------------------------------------------------------------
The idea of these tests is to set up software RAID1 on a running system,
since, it seems that Anaconda does not support installation on degraded
RAID.
But I'm not sure if this is a problem of Virtio or that GRUB is not
recognizing the second disk.
I made sure to modify /boot/grub/device.map with the entry for the new
disk:
---------------------------------------------------------------------
[root@localhost grub]# cat /boot/grub/device.map
# this device map was generated by anaconda
(hd0) /dev/vda
(hd1) /dev/vdb
---------------------------------------------------------------------
And the reconfiguration of GRUB on both disks did not give problems:
---------------------------------------------------------------------
[root@localhost grub]# grub --device-map=/boot/grub/device.map
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the
possible
completions of a device/filename.]
grub> root (hd0,0)
root (hd0,0)
Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
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)"... 15 sectors are
embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p
(hd0,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.
grub> root (hd1,0)
root (hd1,0)
Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd1)
setup (hd1)
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 (hd1)"... 15 sectors are
embedded.
succeeded
Running "install /boot/grub/stage1 (hd1) (hd1)1+15 p
(hd1,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.
grub> quit
quit
---------------------------------------------------------------------
Any idea what may be causing the problem?
Regards,
Daniel
--
Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Lenny - Linux user #188.598
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: SeaBIOS and GRUB booting from Virtio devices [was: GRUB and support for Virtio]
2010-08-24 14:23 ` Daniel Bareiro
@ 2010-08-24 18:51 ` Daniel Bareiro
2010-08-24 19:27 ` Anthony Liguori
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Bareiro @ 2010-08-24 18:51 UTC (permalink / raw)
To: KVM General
[-- Attachment #1: Type: text/plain, Size: 4612 bytes --]
On Tuesday, 24 August 2010 11:23:59 -0300,
Daniel Bareiro wrote:
> > Strange, i did 2 clean installs of centos 5.5 on an ubuntu 9.10 host
> > and it went flawless with virtio devices ( both disks and network ).
> Doing some tests with CentOS 5.5 on a KVM virtual machine, after doing
> the installation, I added a second disk. But when trying to boot from
> it, I get the following error:
>
> ---------------------------------------------------------------------
> root (hd1,0)
>
> Error 21: Selected disk does not exist
> ---------------------------------------------------------------------
>
>
> The two disks are Virtio devices that are recognized when booting from
> the first disk:
>
> ---------------------------------------------------------------------
> [root@localhost ~]# fdisk -l /dev/vda
>
> Disco /dev/vda: 10.7 GB, 10737418240 bytes
> 255 heads, 63 sectors/track, 1305 cylinders
> Unidades = cilindros de 16065 * 512 = 8225280 bytes
>
> Disposit. Inicio Comienzo Fin Bloques Id Sistema
> /dev/vda1 * 1 1174 9430123+ fd Linux raid autodetect
> /dev/vda2 1175 1305 1052257+ fd Linux raid autodetect
> [root@localhost ~]#
> [root@localhost ~]#
> [root@localhost ~]# fdisk -l /dev/vdb
>
> Disco /dev/vdb: 10.7 GB, 10737418240 bytes
> 255 heads, 63 sectors/track, 1305 cylinders
> Unidades = cilindros de 16065 * 512 = 8225280 bytes
>
> Disposit. Inicio Comienzo Fin Bloques Id Sistema
> /dev/vdb1 * 1 1174 9430123+ fd Linux raid autodetect
> /dev/vdb2 1175 1305 1052257+ fd Linux raid autodetect
> ---------------------------------------------------------------------
>
> The idea of these tests is to set up software RAID1 on a running
> system, since, it seems that Anaconda does not support installation on
> degraded RAID.
>
> But I'm not sure if this is a problem of Virtio or that GRUB is not
> recognizing the second disk.
>
> I made sure to modify /boot/grub/device.map with the entry for the new
> disk:
>
> ---------------------------------------------------------------------
> [root@localhost grub]# cat /boot/grub/device.map
> # this device map was generated by anaconda
> (hd0) /dev/vda
> (hd1) /dev/vdb
> ---------------------------------------------------------------------
>
> And the reconfiguration of GRUB on both disks did not give problems:
>
> ---------------------------------------------------------------------
> [root@localhost grub]# grub --device-map=/boot/grub/device.map
>
>
> GNU GRUB version 0.97 (640K lower / 3072K upper memory)
>
> [ Minimal BASH-like line editing is supported. For the first word, TAB
> lists possible command completions. Anywhere else TAB lists the
> possible
> completions of a device/filename.]
> grub> root (hd0,0)
> root (hd0,0)
> Filesystem type is ext2fs, partition type 0xfd
> grub> setup (hd0)
> 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)"... 15 sectors are
> embedded.
> succeeded
> Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p
> (hd0,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
> Done.
> grub> root (hd1,0)
> root (hd1,0)
> Filesystem type is ext2fs, partition type 0xfd
> grub> setup (hd1)
> setup (hd1)
> 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 (hd1)"... 15 sectors are
> embedded.
> succeeded
> Running "install /boot/grub/stage1 (hd1) (hd1)1+15 p
> (hd1,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
> Done.
> grub> quit
> quit
> ---------------------------------------------------------------------
>
>
> Any idea what may be causing the problem?
Martin Kraus seems that recently experienced a similar problem and this
was linked to SeaBIOS [1] and compiling the version from the git would
solve this problem. I had no problems with GRUB trying to boot from two
different IDE drives.
I would like to know if there are plans to incorporate this to stable
KVM in the short term.
Regards,
Daniel
[1] http://www.spinics.net/lists/kvm/msg39928.html
--
Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Lenny - Linux user #188.598
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: SeaBIOS and GRUB booting from Virtio devices [was: GRUB and support for Virtio]
2010-08-24 18:51 ` SeaBIOS and GRUB booting from Virtio devices [was: GRUB and support for Virtio] Daniel Bareiro
@ 2010-08-24 19:27 ` Anthony Liguori
0 siblings, 0 replies; 9+ messages in thread
From: Anthony Liguori @ 2010-08-24 19:27 UTC (permalink / raw)
To: dbareiro, KVM General
On 08/24/2010 01:51 PM, Daniel Bareiro wrote:
>
> Martin Kraus seems that recently experienced a similar problem and this
> was linked to SeaBIOS [1] and compiling the version from the git would
> solve this problem. I had no problems with GRUB trying to boot from two
> different IDE drives.
>
> I would like to know if there are plans to incorporate this to stable
> KVM in the short term.
>
No, but the next release is very soon and will have this. It's a new
feature. There's never been
Regards,
Anthony Liguori
> Regards,
> Daniel
>
> [1] http://www.spinics.net/lists/kvm/msg39928.html
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-08-24 19:27 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-18 4:54 GRUB and support for Virtio Daniel Bareiro
2010-08-18 12:49 ` Martin Kraus
2010-08-18 13:30 ` Daniel Bareiro
2010-08-18 15:02 ` lists
2010-08-18 18:45 ` Nikolai K. Bochev
2010-08-22 0:44 ` Daniel Bareiro
2010-08-24 14:23 ` Daniel Bareiro
2010-08-24 18:51 ` SeaBIOS and GRUB booting from Virtio devices [was: GRUB and support for Virtio] Daniel Bareiro
2010-08-24 19:27 ` Anthony Liguori
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.