I'm creating a ubuntu 20.04 QEMU image with debootstrap (debootstrap --arch amd64 focal .). However, when I tried to boot it with a compiled Linux kernel, it failed to boot:
[ 0.678611] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)[ 0.681639] Call Trace:...[ 0.685135] ret_from_fork+0x35/0x40[ 0.685712] Kernel Offset: disabled[ 0.686182] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---I'm using the following command:
sudo qemu-system-x86_64 \ -enable-kvm -cpu host -smp 2 -m 4096 -no-reboot -nographic \ -drive id=root,media=disk,file=ubuntu2004.img \ -net nic,macaddr=00:da:bc:de:00:13 -net tap,ifname=tap0,script=no \ -kernel kernel/arch/x86/boot/bzImage \ -append "root=/dev/sda1 console=ttyS0"So I'm guessing the error comes from the wrong root device name (/dev/sda1 in my case). Is there any way to find the correct root device name?