Hi Chrysanthos,

As indicated by this line,
> ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(3,0) ]---
the problem seems to be that the root partition was identified incorrectly.

You can run the `fdisk` command to find the location of the root partition.
For example,
/scr/hn/riscv-ubuntu-disk-images/> fdisk -l ubuntu.img
Disk ubuntu.img: 7.51 GiB, 8053063680 bytes, 15728640 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E2DAF0DA-8641-4639-AEF7-3E832D145D82

Device        Start      End  Sectors  Size Type
ubuntu.img1  235554 15728606 15493053  7.4G Linux filesystem
ubuntu.img12 227362   235553     8192    4M Linux filesystem
ubuntu.img13     34     2081     2048    1M HiFive Unleashed FSBL
ubuntu.img14   2082    10273     8192    4M HiFive Unleashed BBL
ubuntu.img15  10274   227361   217088  106M EFI System

Partition table entries are not in disk order.

The largest partition is ubuntu.img1, so the mount point of / should be at
/dev/vda1 (or /dev/vda, I don't remember this :D).

I assume that you are using the gem5 library. If that is the case, you can
follow this example to set the mount point of / to another partition.
https://gem5.googlesource.com/public/gem5/+/refs/heads/stable/configs/example/gem5_library/x86-spec-cpu2017-benchmarks.py#240

It should look like,

board.set_kernel_disk_workload(
    # The x86 linux kernel will be automatically downloaded to the
    # `~/.cache/gem5` directory if not already present.
    kernel=Resource(
        "x86-linux-kernel-4.19.83",
    ),
    # The location of the x86 SPEC CPU 2017 image
    # Assume that it should be /dev/vda1
    disk_image=CustomDiskImageResource(
        "/path/to/the/disk/image",
        disk_root_partition="1",
    ),
    readfile_contents=command,
)

Regards,
Hoa Nguyen

On Sat, Mar 19, 2022 at 12:33 PM cpepi001--- via gem5-users <
gem5-users@gem5.org> wrote:

> Hello All,
>
> I would like to ask if it's possible to run SPEChpc 2021 benchmarks using
> gem5.
> I tried to run it with the x86-spec-cpu2017-benchmarks.py but I got the
> following error in the system.pc.com_1.device file:
>
> Kernel panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(3,0)
> CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.19.83 #1
> Hardware name:  , BIOS  06/08/2008
> Call Trace:
>  dump_stack+0x5d/0x79
>  panic+0xe2/0x236
>  mount_block_root+0x2b0/0x2e4
>  ? set_debug_rodata+0xc/0xc
>  prepare_namespace+0x15b/0x191
>  kernel_init_freeable+0x23c/0x24c
>  ? rest_init+0xa0/0xa0
>  kernel_init+0x5/0xf0
>  ret_from_fork+0x35/0x40
> Kernel Offset: disabled
> ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(3,0) ]---
>
> Does anyone knows how to properly configure it? if it's possible to run
> those benchmarks with gem5.
>
> version: 21.2.1.0
> command: build/X86/gem5.opt
> configs/example/gem5_library/x86-spec-hpc2021-benchmarks.py --image
> ../hpc2021-1.0.3.iso --benchmark 505.lbm_t --size test
> (x86-spec-hpc2021-benchmarks.py is the same as
> x86-spec-cpu2017-benchmarks.py with different benchmarks)
>
> Best,
> Chrysanthos
> _______________________________________________
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to