Arm gem5完整系统Linux引导失败,错误为;内核死机-不同步:VFS:无法装载根fs“;

Arm gem5完整系统Linux引导失败,错误为;内核死机-不同步:VFS:无法装载根fs“;,arm,gem5,Arm,Gem5,我想在gem5的fs模式下运行arm的linux系统,我从以下地址下载相关文件: 我能够配置正确的文件路径,但最终在terminal2中获得了以下输出: [ 0.661620] No filesystem could mount root, tried: [ 0.661621] ext3 [ 0.661650] ext4`enter code here` [ 0.661663] ext2 [ 0.661676] vfat [ 0.661690]

我想在gem5的fs模式下运行arm的linux系统,我从以下地址下载相关文件:

我能够配置正确的文件路径,但最终在terminal2中获得了以下输出:

[    0.661620] No filesystem could mount root, tried: 
[    0.661621]  ext3
[    0.661650]  ext4`enter code here`
[    0.661663]  ext2
[    0.661676]  vfat
[    0.661690]  fuseblk
[    0.661703] 
[    0.661728] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(254,0)
在终点站得到了可怕的结果1:

warn: Tried to read RealView I/O at offset 0x60 that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Kernel panic in simulated kernel
我可以提供我的命令行输入,但简单地调整内部配置只会导致相同的结果:

./build/ARM/gem5.opt configs/example/arm/starter_fs.py --cpu="minor" --num-cores=4 --disk-image=/home/ad/GEM5/ARM_GEM5/gem5/my_image/disks/aarch64-ubuntu-trusty-headless.img --dtb=/home/ad/GEM5/ARM_GEM5/gem5/my_image/binaries/armv7_gem5_v1_4cpu.dtb --kernel=/home/ad/GEM5/ARM_GEM5/gem5/my_image/binaries/vmlinux
我怎样才能解决这个问题?
关于,

以下是此类问题的完整诊断程序:

总之,您必须确保:

  • 内核具有读取磁盘类型的配置,通常用于模拟:

    CONFIG_VIRTIO_PCI=y
    CONFIG_VIRTIO_BLK=y
    
    这似乎是问题所在,因为上面没有给出分区列表?请确认。如果不是,内核似乎无法从磁盘读取字节

  • 内核具有读取文件系统类型的配置。但是内核提到了ext2、3、4,所以这可能不是问题所在

  • 您将root=kernel CLI指向正确的分区

另请参见:它还包含一个可以正常工作的Buildroot设置


我还强烈建议您首先让它在QEMU上运行,它的启动速度要快得多。

我也遇到了类似的问题。使用原始的
starter\u fs.py
脚本,尝试在64位内核下运行Ubuntu和Linaro minimal(从)的完整系统仿真,会让我产生以下内核恐慌:

[    0.224367] List of all partitions:
[    0.224394] fe00         1048320 vda 
[    0.224397]  driver: virtio_blk
[    0.224440]   fe01         1048288 vda1 00000000-01
[    0.224441] 
[    0.224480] No filesystem could mount root, tried: 
[    0.224481]  ext3
[    0.224510]  ext4
[    0.224524]  ext2
[    0.224537]  squashfs
[    0.224551]  vfat
[    0.224566]  fuseblk
[    0.224579] 
[    0.224606] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(254,0)
[    0.224656] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.18.0+ #1
[    0.224692] Hardware name: V2P-CA15 (DT)
[    0.224717] Call trace:
[    0.224741]  dump_backtrace+0x0/0x1c0
[    0.224765]  show_stack+0x14/0x20
[    0.224790]  dump_stack+0x8c/0xac
[    0.224812]  panic+0x130/0x288
[    0.224836]  mount_block_root+0x22c/0x294
[    0.224861]  mount_root+0x140/0x174
[    0.224884]  prepare_namespace+0x138/0x180
[    0.224910]  kernel_init_freeable+0x1c0/0x1e0
[    0.224939]  kernel_init+0x10/0x108
[    0.224961]  ret_from_fork+0x10/0x18
[    0.224987] Kernel Offset: disabled
[    0.225009] CPU features: 0x21c06492
[    0.225032] Memory Limit: 2048 MB
[    0.225056] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(254,0) ]---

奇怪的是,几周前,它就像一个符咒。内核命令行上根分区的规范中存在的问题。在
starter\u fs.py
中,更改此行

[    0.228847] EXT4-fs (vda1): mounted filesystem without journal. Opts: (null)
[    0.228906] VFS: Mounted root (ext4 filesystem) on device 254:1.
[    0.229539] devtmpfs: mounted
[    0.229792] Freeing unused kernel memory: 448K
INIT: version 2.88 booting
[    0.234168] random: fast init done
Starting udev
[    0.277039] udevd[715]: starting version 182
[    0.411534] EXT4-fs (vda1): re-mounted. Opts: block_validity,delalloc,barrier,user_xattr
Starting Bootlog daemon: bootlogd.
[    0.426573] random: dd: uninitialized urandom read (512 bytes read)
Populating dev cache
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
hwclock: can't open '/dev/misc/rtc': No such file or directory
Mon Jan 27 08:00:00 UTC 2014
hwclock: can't open '/dev/misc/rtc': No such file or directory
INIT: Entering runlevel: 5
Configuring network interfaces... ifconfig: SIOCGIFFLAGS: No such device
Starting rpcbind daemon...rpcbind: cannot create socket for udp6
rpcbind: cannot create socket for tcp6
done.
rpcbind: cannot get uid of '': Success
creating NFS state directory: done
starting statd: done
Starting auto-serial-console: done
Stopping Bootlog daemon: 
bootlogd.
Last login: Mon Jan 27 08:00:00 UTC 2014 on tty1
INIT: no more processes left in this runlevel
root@genericarmv8:~# id
id
uid=0(root) gid=0(root) groups=0(root)
root@genericarmv8:~#
“root=/dev/vda”,

据此:

“root=/dev/vda1”,

您可以看到,之前指定了。内核需要分区,而不是块设备。然后,您可以运行gem5:

build/ARM/gem5.opt-configs/example/ARM/starter_fs.py--cpu=“hpi”--num cores=1--disk image=“linaro-minimal-aarch64.img”--kernel=“vmlinux.arm64”

对我来说,内核恐慌消失了,我能够再次启动我的系统

[    0.228847] EXT4-fs (vda1): mounted filesystem without journal. Opts: (null)
[    0.228906] VFS: Mounted root (ext4 filesystem) on device 254:1.
[    0.229539] devtmpfs: mounted
[    0.229792] Freeing unused kernel memory: 448K
INIT: version 2.88 booting
[    0.234168] random: fast init done
Starting udev
[    0.277039] udevd[715]: starting version 182
[    0.411534] EXT4-fs (vda1): re-mounted. Opts: block_validity,delalloc,barrier,user_xattr
Starting Bootlog daemon: bootlogd.
[    0.426573] random: dd: uninitialized urandom read (512 bytes read)
Populating dev cache
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
hwclock: can't open '/dev/misc/rtc': No such file or directory
Mon Jan 27 08:00:00 UTC 2014
hwclock: can't open '/dev/misc/rtc': No such file or directory
INIT: Entering runlevel: 5
Configuring network interfaces... ifconfig: SIOCGIFFLAGS: No such device
Starting rpcbind daemon...rpcbind: cannot create socket for udp6
rpcbind: cannot create socket for tcp6
done.
rpcbind: cannot get uid of '': Success
creating NFS state directory: done
starting statd: done
Starting auto-serial-console: done
Stopping Bootlog daemon: 
bootlogd.
Last login: Mon Jan 27 08:00:00 UTC 2014 on tty1
INIT: no more processes left in this runlevel
root@genericarmv8:~# id
id
uid=0(root) gid=0(root) groups=0(root)
root@genericarmv8:~#

我将配置添加到内核中,现在终端显示以下内容:“[0.881139]VFS:无法打开根设备“vda”或未知块(0,0):错误-6[0.881182]请添加正确的“root=”引导选项;以下是可用分区:[0.881232]0100 4096 ram0”。接下来,我修改根选项:“root=/dev/ram1”。但我仍然收到无法装入的错误消息,并且列出的分区列表是ram0-15。@SiqingFu我不确定
/dev/ram
分区是什么。您是否尝试过改为
root=/dev/vda
?这是VirTio One。/DEV/VDA是初始的默认配置,我曾经在虚拟机上运行所有这些,我考虑它是否与此相关。@ SiqingFu没有显示任何在代码上面的可用分区吗?没有文件系统可以安装根,尝试< /COD>?Ubuntu映像可能已分区,因此可能
vda1
vda2
。另请参见:非常感谢,此修改步骤是必要的,但仍不足以解决上述问题。我遇到的问题的关键是我在VMware上运行了所有这些。当我直接在我的电脑上安装ubuntu时,只有通过以上步骤才能解决这个问题。