|Subject:||end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1, 0) while booting linux on qemu|
|Date:||Thu, 18 Feb 2021 16:28:27 +0900|
I have found a good reference today (https://ibug.io/blog/2019/04/os-lab-1/ ) which shows how to build kernel and run it on qemu.
I followed it (but with aarch64-none-elf- for kernel build and aarch64-linux-gcc- for fake init process build) including making the example myinitrd.img file.
Myinitrd.img is a ramdisk image containing fake init program which repeatedly prints “Hello” every 1 second..
And myinitrd.img also contains device files that were made by these commands ( given inside the mounted image )
sudo mknod dev/ram b 1 0
sudo mknod dev/console c 5 1
and when I tried
qemu-system-aarch64 -M virt -cpu cortex-a72 -kernel arch/arm64/boot/Image -initrd myinitrd.img --append "root=/dev/ram init=/init" -m 2048M -nographic
It started booting but at the end failed to mount myinitrd.img on ram device.
[ 3.010354] Kernel Offset: 0x2d87d6c00000 from 0xffff800010000000
[ 3.010844] PHYS_OFFSET: 0xfffff9ce00000000
[ 3.011668] CPU features: 0x0002,20806000
[ 3.012076] Memory Limit: none
[ 3.013702] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0) ]---
Could anyone tell me what can be wrong? (I tried changing ram device number and file name in vain).
|[Prev in Thread]||Current Thread||[Next in Thread]|