1. 程式人生 > >Linux 核心的一個問題

Linux 核心的一個問題

是virtio 驅動,但是沒有啟動

[    1.047924] md: ... autorun DONE.
[    1.050424] VFS: Cannot open root device "vda" or unknown-block(0,0): error -6
[    1.053462] Please append a correct "root=" boot option; here are the available partitions:
[    1.056923] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.060340] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.16.18 #3
[    1.061985] Call Trace:
[    1.062631]  dump_stack+0x61/0x7d
[    1.063488]  panic+0xe7/0x247
[    1.064242]  mount_block_root+0x26c/0x2d0
[    1.065350]  ? set_debug_rodata+0x17/0x17
[    1.066324]  mount_root+0x6a/0x6d
[    1.067002]  prepare_namespace+0x139/0x171
[    1.067834]  kernel_init_freeable+0x22d/0x255
[    1.068726]  ? rest_init+0xb0/0xb0
[    1.069427]  kernel_init+0xe/0xff
[    1.070110]  ret_from_fork+0x35/0x40
[    1.071013] Kernel Offset: disabled
[    1.071699] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

I have compiled a new linux kernel with CONFIG_VIRTIO_BLK=y. But it doesn't boot and kernel panics. To kernel command line i tried passing root=/dev/vda and root=/dev/vda1 but same kernel panic comes every time. VIRTIO_NET was working fine when VIRTIO_BLK was not enabled and VM booted up fine. But with virtio-blk i see the below kernel panic. Can someone please suggest what could be going wrong?

VFS: Cannot open root device "vda" or unknown-block(253,0)^M Please append a correct "root=" boot option; here are the available partitions:^M fd00 8388608 vda driver: virtio_blk^M fd01 7340032 vda1 00000000-0000-0000-0000-000000000000^M

fd02 512000 vda2 00000000-0000-0000-0000-000000000000^M fd03 535552 vda3 00000000-0000-0000-0000-000000000000^M Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(253,0)^M

Regards, Saurabh -------------- next part -------------- An HTML attac