首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >gem5完全系统Linux引导失败,“内核恐慌-不是同步: VFS:无法挂载root”

gem5完全系统Linux引导失败,“内核恐慌-不是同步: VFS:无法挂载root”
EN

Stack Overflow用户
提问于 2020-08-06 05:59:08
回答 2查看 1.4K关注 0票数 1

我想在双星 5的fs模式下运行arm的linux系统,我从这个地址下载相关文件:。

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

代码语言:javascript
运行
复制
[    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)

在terminal1中得到了这个糟糕的输出:

代码语言:javascript
运行
复制
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

我可以提供命令行输入,但是简单地调整内部的配置只会导致相同的结果:

代码语言:javascript
运行
复制
./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

我怎么才能解决这个问题?致以敬意,

EN

回答 2

Stack Overflow用户

发布于 2020-08-06 07:08:21

下面是针对这类问题的完整诊断过程:https://askubuntu.com/questions/41930/kernel-panic-not-syncing-vfs-unable-to-mount-root-fs-on-unknown-block0-0/1048477#1048477

总之,你必须确保:

  • 内核具有读取磁盘类型的配置,通常用于模拟: CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_BLK=y 这似乎是问题所在,因为上面没有分区列表?请确认。如果没有,内核似乎无法从磁盘读取字节。
  • 内核具有读取文件系统类型的配置。但是内核提到not 2,3,4,所以很可能这不是问题所在。
  • 您正在将root=内核CLI指向正确的分区。

还请参阅:https://cirosantilli.com/linux-kernel-module-cheat/#not-syncing,它还包含一个只起作用的Buildroot设置。

我还强烈建议您首先让它在引导速度更快的QEMU上工作。

票数 1
EN

Stack Overflow用户

发布于 2020-08-17 08:52:34

我也有过类似的问题。试图在64位内核下(从gem5网站)运行Ubuntu和Linaro的全系统仿真,并使用原始的starter_fs.py脚本,这让我感到内核恐慌:

代码语言:javascript
运行
复制
[    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_fs.py中,更改了这一行

"root=/dev/vda",

通过这一点:

"root=/dev/vda1",

您可以看到,在此之前,指定了VirtIO 块装置内核需要一个分区,而不是块设备。然后,您可以运行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"

对我来说,内核恐慌已经消失了,,我能够再次引导我的系统--

代码语言:javascript
运行
复制
[    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:~#
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63277677

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档