Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] qemu (at x86 created): cannot mount rootfs at amd64
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3922
Location: Hamburg

PostPosted: Thu Dec 18, 2014 10:12 am    Post subject: [solved] qemu (at x86 created): cannot mount rootfs at amd64 Reply with quote

I created a qcow2 image at a x86 system, imported it here at a 64 bit system.

It boots fine, but the kernel tells me:"Kernel panic, unable to mount rootfs on unknown block (0,0)"
The / of the image is btrfs, /boot ext2 IIRC, and btrfs is compiled in the host - b/c it is the default fs here. The ext234 are now kernel modules.

Any hints ?


Last edited by toralf on Sat Dec 20, 2014 6:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54244
Location: 56N 3W

PostPosted: Thu Dec 18, 2014 6:47 pm    Post subject: Reply with quote

toralf,

Code:
unknown block (0,0)

Whatever your VM provides as a hard disk chipset, or the virtio driver is missing from your guest kernel.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3922
Location: Hamburg

PostPosted: Sat Dec 20, 2014 5:04 pm    Post subject: Reply with quote

NeddySeagoon wrote:
the virtio driver is missing from your guest kernel.
hhm, I re-used the x86 config from the old system, adapted it ofc to the new hardware - which driver name (==kernel option) do you mean ?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54244
Location: 56N 3W

PostPosted: Sat Dec 20, 2014 5:42 pm    Post subject: Reply with quote

toralf,

There are two ways to present virtual hard drives to the guest in a KVM.
If you run lspci it the guest you may see an IDE interface, a SATA interface or both.
This is the host faking some hardware for the guest. The guest will have /dev/sda and friends, which is what you are used.to seeing on real hardware.

You may also enable the tmo parts of the virtio driver. One on the hast and one in the guest.
The guest hard drive is now /dev/vda.

You need to know what you have tet up, since the former needs the hardware drivers foc the fake hardware and the latter does not.
You also need the correct root= and fstab entries in the guest.

The guest needs
Code:
   │ CONFIG_VIRTIO_BLK:                                                               │ 
  │                                                                                  │ 
  │ This is the virtual block driver for virtio.  It can be used with                │ 
  │ lguest or QEMU based VMMs (like KVM or Xen).  Say Y or M.


On the bare metal I have
Code:
  │ │    <M> PCI driver for virtio devices                                         │ │ 
  │ │    <M> Virtio balloon driver                                                 │ │ 
  │ │    <M> Platform bus driver for memory mapped virtio devices   

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3922
Location: Hamburg

PostPosted: Sat Dec 20, 2014 6:11 pm    Post subject: Reply with quote

thx - you pointed me into the right direction

I had to change in the guest the grub2 command line from "root=/dev/vda4" to "root=/dev/sda4"
(and I compiled now virtio_blk as a kernel module too - /me wonders, if that kernel option should be moved to the other virtio things ....)

So, now I'm in the guest and can can adapt fstab, dmcrypt and so on :-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum