On Wed, 29 Nov 2023 at 15:08, 泰宇周 <taiyuzho...@gmail.com> wrote:
>
> I tried to use febootstrap to make a roofs image for qemu-kvm.
> It reported that
>
>     [    1.766919] Kernel panic - not syncing: VFS: Unable to mount root fs 
> on unknown-block(0,0)

When the kernel tells you it can't mount the root filesystem,
the interesting part of the log is the part above this line,
which you haven't given us. There the kernel will tell you
what block devices it has found and what filesystems it
tried to load them with.

The problem generally is either:
  * wrong command line (i.e. you asked the kernel to look for
    the rootfs in the wrong place)
 * the kernel doesn't have a driver for that block device in it
 * the kernel doesn't have a driver for that filesystem in it

In this case, you seem to be using a distro kernel. Those
are generally pretty stripped down with almost all their
device and filesystem drivers kept in an initrd. You haven't
told QEMU to load an initrd, and the kernel doesn't have the
drivers to directly mount the rootfs.

You should probably try passing the initrd to QEMU as well
as the kernel (-initrd argument).

thanks
-- PMM

Reply via email to