Linux 内核无法挂载 /dev 文件系统
Linux kernel can't mount /dev file system
我正在构建一个自定义 linux 图像,使用未处理的 Linux 内核 2.6.32.65.
内核启动正常,直到它达到:
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem) on device 3:1.
Freeing unused kernel memory: 304k freed
init: Unable to mount /dev filesystem: No such device
init: ureadahead main process (983) terminated with status 5
init: console-setup main process (1052) terminated with status 1
我尝试了here提到的解决方案,虽然错误不完全相同,但没有运气。我尝试了多个 "reference" .config
文件。我一直在谷歌搜索,但我找不到任何有同样问题的东西。
我 运行 这个自定义图像在 gem5 模拟器上,文件系统来自 ubuntu-core 和一个干净的内核。在输出的前面,内核显示了这个:
hda: max request size: 128KiB
hda: 16514064 sectors (8455 MB), CHS=16383/16/63
hda: hda1
所以内核能够很好地看到分区。我不认为这是由文件系统中的某些东西引起的。也许initrd?还是内核本身?我该如何解决?
1.) 问题不在 devfs 中,似乎问题出在控制台设置上。 2.) 这是初始化问题而不是 linux 内核问题。 3.) 尝试将 /bin/sh 而不是 init 传递给内核 cmd line
我对自定义内置嵌入式 Linux 也有同样的问题。
检查您是否在内核 .config
中启用了 devfs
# core filesystems
CONFIG_PROC_FS=y
CONFIG_SYSFS=y
## devfs
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
我正在构建一个自定义 linux 图像,使用未处理的 Linux 内核 2.6.32.65.
内核启动正常,直到它达到:
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem) on device 3:1.
Freeing unused kernel memory: 304k freed
init: Unable to mount /dev filesystem: No such device
init: ureadahead main process (983) terminated with status 5
init: console-setup main process (1052) terminated with status 1
我尝试了here提到的解决方案,虽然错误不完全相同,但没有运气。我尝试了多个 "reference" .config
文件。我一直在谷歌搜索,但我找不到任何有同样问题的东西。
我 运行 这个自定义图像在 gem5 模拟器上,文件系统来自 ubuntu-core 和一个干净的内核。在输出的前面,内核显示了这个:
hda: max request size: 128KiB
hda: 16514064 sectors (8455 MB), CHS=16383/16/63
hda: hda1
所以内核能够很好地看到分区。我不认为这是由文件系统中的某些东西引起的。也许initrd?还是内核本身?我该如何解决?
1.) 问题不在 devfs 中,似乎问题出在控制台设置上。 2.) 这是初始化问题而不是 linux 内核问题。 3.) 尝试将 /bin/sh 而不是 init 传递给内核 cmd line
我对自定义内置嵌入式 Linux 也有同样的问题。 检查您是否在内核 .config
中启用了 devfs# core filesystems
CONFIG_PROC_FS=y
CONFIG_SYSFS=y
## devfs
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y