mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
not syncing: VFS: Unable to mount root fs on unknown-block(0,0) section
This commit is contained in:
23
README.adoc
23
README.adoc
@@ -6646,6 +6646,29 @@ Source: link:kernel_modules/warn_on.c[]
|
|||||||
|
|
||||||
Can also be activated with the `panic_on_warn` boot parameter.
|
Can also be activated with the `panic_on_warn` boot parameter.
|
||||||
|
|
||||||
|
[[not-syncing]]
|
||||||
|
==== not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
|
||||||
|
|
||||||
|
Let's learn how to diagnose problems with the root filesystem not being found. TODO add a sample panic error message for each error type:
|
||||||
|
|
||||||
|
* https://askubuntu.com/questions/41930/kernel-panic-not-syncing-vfs-unable-to-mount-root-fs-on-unknown-block0-0/1048477#1048477
|
||||||
|
|
||||||
|
This is the diagnosis procedure:
|
||||||
|
|
||||||
|
* does the filesystem appear on the list of filesystems? If not, then likely you are missing either:
|
||||||
|
** the driver for that hardware type, e.g. hard drive / SSD type. Here, Linux does not know how to communicate with a given hardware to get bytes from it at all. In simiulation, the most important often missing one is virtio which needs:
|
||||||
|
+
|
||||||
|
....
|
||||||
|
CONFIG_VIRTIO_PCI=y
|
||||||
|
CONFIG_VIRTIO_BLK=y
|
||||||
|
....
|
||||||
|
** the driver for that filesystem type. Here, Linux can read bytes from the hardware, but cannot interpret them as a tree of files because it does not recognize the file system format. For example, to boot from <<squashfs>> we would need:
|
||||||
|
+
|
||||||
|
....
|
||||||
|
CONFIG_SQUASHFS=y
|
||||||
|
....
|
||||||
|
* your filesystem of interest appears in the list, then you just need to set the `root` <<kernel-command-line-parameters,command line parameter>> to point to that, e.g. `root=/dev/sda`
|
||||||
|
|
||||||
=== Pseudo filesystems
|
=== Pseudo filesystems
|
||||||
|
|
||||||
Pseudo filesystems are filesystems that don't represent actual files in a hard disk, but rather allow us to do special operations on filesystem-related system calls.
|
Pseudo filesystems are filesystems that don't represent actual files in a hard disk, but rather allow us to do special operations on filesystem-related system calls.
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y
|
|||||||
# Filesystems.
|
# Filesystems.
|
||||||
CONFIG_DEBUG_FS=y
|
CONFIG_DEBUG_FS=y
|
||||||
CONFIG_OVERLAY_FS=y
|
CONFIG_OVERLAY_FS=y
|
||||||
|
# https://cirosantilli.com/linux-kernel-module-cheat#squashfs
|
||||||
CONFIG_SQUASHFS=y
|
CONFIG_SQUASHFS=y
|
||||||
|
|
||||||
# GDB debugging.
|
# GDB debugging.
|
||||||
@@ -77,6 +78,7 @@ CONFIG_NET_9P_VIRTIO=y
|
|||||||
CONFIG_PCI=y
|
CONFIG_PCI=y
|
||||||
CONFIG_PCI_HOST_COMMON=y
|
CONFIG_PCI_HOST_COMMON=y
|
||||||
CONFIG_PCI_HOST_GENERIC=y
|
CONFIG_PCI_HOST_GENERIC=y
|
||||||
|
# https://cirosantilli.com/linux-kernel-module-cheat#not-syncing
|
||||||
CONFIG_VIRTIO_PCI=y
|
CONFIG_VIRTIO_PCI=y
|
||||||
CONFIG_VIRTIO_BLK=y
|
CONFIG_VIRTIO_BLK=y
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user