qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with creating a root device


From: roger
Subject: Problem with creating a root device
Date: Sun, 20 Sep 2020 19:35:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 Thunderbird/68.10.0

I am updating an old qemu arm vm.

The old command that used to work was.

qemu-system-arm \
-M versatilepb \
-cpu arm1176 \
-m 256 \
-drive file=raspbian.img,index=0,media=disk,format=raw \
-net nic \
-net user,hostfwd=tcp::5022-:22,hostfwd=tcp::5080-:80 \
-dtb qemu-rpi-kernel/versatile-pb.dtb \
-kernel qemu-kernel \
-append 'root=/dev/sda2 panic=1' \
-no-reboot \
-nographic
#-serial stdio \

The above command was working with a Linux 4. I needed to update to Linux 5.

The first thing I tried was just changing the -kernel, -drive, and -dtb option to point at the new  versions. This resulted in the following aeror.

VFS: Cannot open root device "sda2" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
0100            4096 ram0 
 (driver?)
0101            4096 ram1 
 (driver?)
0102            4096 ram2 
 (driver?)
0103            4096 ram3 
 (driver?)
0104            4096 ram4 
 (driver?)
0105            4096 ram5 
 (driver?)
0106            4096 ram6 
 (driver?)
0107            4096 ram7 
 (driver?)
0108            4096 ram8 
 (driver?)
0109            4096 ram9 
 (driver?)
010a            4096 ram10 
 (driver?)
010b            4096 ram11 
 (driver?)
010c            4096 ram12 
 (driver?)
010d            4096 ram13 
 (driver?)
010e            4096 ram14 
 (driver?)
010f            4096 ram15 
 (driver?)
1f00           65536 mtdblock0 
 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 0 PID: 1 Comm: swapper Tainted: G        W         5.4.51 #1
Hardware name: ARM-Versatile (Device Tree Support)
[<c001c84c>] (unwind_backtrace) from [<c0018738>] (show_stack+0x10/0x14)
[<c0018738>] (show_stack) from [<c00252ec>] (panic+0xe4/0x2d8)
[<c00252ec>] (panic) from [<c0a7633c>] (mount_block_root+0x1f0/0x2b4)
[<c0a7633c>] (mount_block_root) from [<c0a767e0>] (prepare_namespace+0x15c/0x1bc)
[<c0a767e0>] (prepare_namespace) from [<c0609b0c>] (kernel_init+0x8/0xe8)
[<c0609b0c>] (kernel_init) from [<c00090e8>] (ret_from_fork+0x14/0x2c)
Exception stack(0xcf825fb0 to 0xcf825ff8)
5fa0:                                     00000000 00000000 00000000 00000000
5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
Rebooting in 1 seconds..

It looks like the sda device is not being created. I have tried numerous variations of -drive, -hda, different image file formats, etc. All to no avail. All resulting in the same error. All with no evidence anywhere in the log of a disk device being created.

sudo qemu-system-arm \
-kernel qemu-rpi-kernel/kernel-qemu-5.4.51-buster \
-append 'root=/dev/hda2 panic=1' \
-drive file=raspios.qcow,index=0,media=disk \
-cpu arm1176 -m 256 \
-M versatilepb \
-dtb qemu-rpi-kernel/versatile-pb-buster-5.4.51.dtb \
-no-reboot \
-serial stdio \
-net nic \
-net user,hostfwd=tcp::5022-:22,hostfwd=tcp::5080-:80

The only other thing I see at the start of the boot process is the scsi device driver timing out, and giving warning stack traces.

sym53c8xx 0000:00:0c.0: enabling device (0100 -> 0103)
sym0: <895a> rev 0x0 at pci 0000:00:0c.0 irq 66
sym0: No NVRAM, ID 7, Fast-40, ??, parity checking
random: fast init done
CACHE TEST FAILED: timeout.
sym0: CACHE INCORRECTLY CONFIGURED.
sym0: giving up ...
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at kernel/dma/mapping.c:337 dma_free_attrs+0xb8/0xc8
Modules linked in:

What have I got wrong? I need some some help to fix this!

All help gratefully received.

Thanks

Roger







reply via email to

[Prev in Thread] Current Thread [Next in Thread]