
When you build an embedded Linux system with Buildroot and hit the boot-time kernel panic:
VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6Please append a correct "root=" boot option; here are the available partitions:Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
the root cause falls into one of three categories: the kernel command line lacks a valid root= (or rootwait) parameter, root= resolves to the wrong partition or an unsupported identifier like UUID= without an initramfs, or the kernel lacks built-in drivers (=y) to reach the storage controller and filesystem. This guide walks through each failure mode with concrete fixes targeting Buildroot 2024.02+ and Linux 6.1-6.6+.
You flash a Buildroot-generated image to an SD card or eMMC. The board powers on, U-Boot loads the kernel and device tree, the kernel boots — then panics in mount_block_root() before starting userspace. No shell, no rootfs logs, only serial console output ending in VFS: Unable to mount root fs on unknown-block(0,0).
In Linux init/do_mounts.c, unknown-block(0,0) does not mean a device tried to register as major 0, minor 0. Rather, 0 (MKDEV(0, 0)) is the unset ROOT_DEV sentinel formatted by __bdevname() when root= was omitted, empty, or failed to resolve via early_lookup_bdev() (Linux 6.5+) / name_to_dev_t() (Linux 6.1-6.4). By contrast, if the kernel resolves the block device (for example mmcblk0p2 at major 179, minor 2) yet fails to mount the filesystem (for example because CONFIG_EXT4_FS is missing or the superblock is corrupt), it prints unknown-block(179,2).
Understanding the boot chain when booting directly to a block device — U-Boot (fdt_chosen()) -> kernel command line parsing -> asynchronous driver probe -> prepare_namespace() -> mount_block_root() -> exec /sbin/init — makes it straightforward to pinpoint which stage broke. (If an initramfs with /init is present, kernel_init_freeable() runs /init directly and bypasses prepare_namespace() altogether.)
When booting without an initramfs /init, kernel_init() (init/main.c) calls kernel_init_freeable(), which invokes prepare_namespace() -> mount_root() -> mount_block_root() in init/do_mounts.c (with mount_root_generic() performing the block open and filesystem mount loop in Linux 6.5+). The panic output breaks down as follows:
| Component | Meaning |
|---|---|
VFS | Virtual Filesystem Switch — the kernel’s filesystem abstraction layer |
root device "(null)" | No root= token was parsed (root_device_name is NULL); if root=/dev/mmcblk0p2 was passed but not found, "mmcblk0p2" appears instead |
unknown-block(0,0) | ROOT_DEV remained 0 (MKDEV(0,0)) because root= was absent or failed device lookup (error -6 = -ENXIO) |
unknown-block(179,2) | Device 179:2 (mmcblk0p2) resolved, but VFS could not mount any filesystem on it (missing FS driver or corrupt image) |
Three primary failure modes produce unknown-block(0,0) in Buildroot builds:
bootargsOn Device Tree platforms, U-Boot injects its bootargs environment variable into /chosen/bootargs inside the Flattened Device Tree (FDT) via fdt_chosen() right before jumping to Linux (or via ATAGs on legacy non-DT ARM setups). During Linux startup, start_kernel() -> setup_arch() -> early_init_dt_scan_chosen() reads /chosen/bootargs into boot_command_line, setup_command_line() saves it, and parse_early_param() invokes __setup("root=", root_dev_setup) to store the string in saved_root_name. ROOT_DEV stays 0 until prepare_namespace() resolves saved_root_name.
root= ends up missing or broken when:
setenv bootargs commands that bootcmd executes during autobootbootcmd references a variable (such as mmcargs) that was never defined or saved (saveenv omitted)boot.scr or extlinux/extlinux.conf overwrites manually saved bootargs on rebootCONFIG_CMDLINE_FORCE=y, forcing a built-in CONFIG_CMDLINE that ignores both U-Boot and the Device TreeBuildroot’s BR2_TARGET_ROOTFS_EXT2=y and BR2_TARGET_ROOTFS_EXT2_4=y generate a standalone output/images/rootfs.ext4 filesystem image — they do not create a partition table. Partition layout is controlled separately by genimage (via BR2_PACKAGE_HOST_GENIMAGE=y and BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh") or manual flashing.
Common layout and numbering mismatches include:
genimage.cfg places boot.vfat on partition 1 and rootfs.ext4 on partition 2, while bootargs still passes root=/dev/mmcblk0p1genimage.cfg omits in-partition-table = "no", shifting boot to partition 2 and rootfs to partition 3mmc 0:2 in U-Boot vs /dev/mmcblk0p2 in Linux) are both 1-based, but controller numbers are not guaranteed to match. Linux assigns mmcblk0, mmcblk1, etc. in driver probe order unless pinned by DT aliases { mmc0 = ...; }, so an eMMC that U-Boot calls mmc 1 can become /dev/mmcblk0 in Linux when the SD slot is emptybootargs is unset/empty, allowing a stale /chosen/bootargs hardcoded inside the .dts file to take effectEven with an exact root= parameter, prepare_namespace() cannot open the device if the storage controller driver, block driver, or root filesystem driver is missing or built as a module (=m) without an initramfs:
CONFIG_MMC=y + CONFIG_MMC_BLOCK=y + SoC host driver (for example CONFIG_MMC_SUNXI=y for Allwinner, CONFIG_MMC_SDHCI_OF_ARASAN=y for Xilinx ZynqMP), plus CONFIG_PWRSEQ_SIMPLE=y if the DT uses an MMC power-sequence nodeCONFIG_ATA=y + CONFIG_SATA_AHCI=y (PCIe) or CONFIG_SATA_AHCI_PLATFORM=y (SoC platform DT) + CONFIG_SCSI=y + CONFIG_BLK_DEV_SD=yCONFIG_PCI=y + SoC PCIe host bridge driver + CONFIG_NVME_CORE=y + CONFIG_BLK_DEV_NVME=yCONFIG_USB=y + host controller driver (e.g., CONFIG_USB_EHCI_HCD=y / CONFIG_USB_XHCI_HCD=y) + CONFIG_USB_STORAGE=y + CONFIG_SCSI=y + CONFIG_BLK_DEV_SD=yCONFIG_EXT4_FS=y (and CONFIG_EXT4_USE_FOR_EXT2=y if mounting ext2, or CONFIG_SQUASHFS=y / CONFIG_BTRFS_FS=y as appropriate)Critical rule: Without an initramfs, every driver along the path to the root filesystem must be built-in (=y). If compiled as =m, the .ko files live inside /lib/modules on the very rootfs the kernel is trying to mount — an unbreakable circular dependency.
bootargs and Use Kernel-Native IdentifiersEnsure U-Boot passes a complete bootargs string (or update boot.cmd / extlinux.conf if using script/DistroBoot):
# In U-Boot shell=> printenv bootargsbootargs=console=ttyS0,115200=> setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait rw=> saveenv=> boot
Critical flags explained:
rootwait — blocks indefinitely in prepare_namespace() until the root block device registers (essential for MMC/SD and USB devices probed asynchronously; rootwait=<sec> bounds the wait in newer kernels).rootfstype=ext4 — skips probing other compiled-in filesystems in /proc/filesystems and prevents fallback attempts with incompatible ext2/ext3 probes.rw — mounts the rootfs read-write. By default, the Linux kernel mounts root read-only (ro, MS_RDONLY | MS_SILENT in init/do_mounts.c) unless rw is specified or userspace init remounts it later.earlycon / earlyprintk — enables serial output before the full TTY driver probes (earlycon reads DT /chosen/stdout-path; on 32-bit ARM earlyprintk uses compile-time CONFIG_DEBUG_LL).For boards with multiple MMC/block interfaces where mmcblk0 and mmcblk1 can swap probe order, use PARTUUID=:
# By PARTUUID (natively parsed by Linux early_lookup_bdev / name_to_dev_t without initramfs)# MBR format: <32-bit-disk-signature>-<2-digit-hex-partition>=> setenv bootargs console=ttyS0,115200 root=PARTUUID=12345678-02 rootwait
Important
PARTUUID=vsUUID=distinction: Direct kernel boot without an initramfs supports/dev/...,major:minor,PARTUUID=, andPARTLABEL=— it does not scan filesystem superblocks forroot=UUID=<fs-uuid>orroot=LABEL=.... Passingroot=UUID=...directly to the kernel without an initramfs triggersVFS: Cannot open root device "UUID=..." or unknown-block(0,0). Only useroot=UUID=...when an initramfs runsblkid,findfs, orudevto resolve the filesystem UUID beforeswitch_root.
Inspect PARTUUID (and UUID if using an initramfs) on the host or generated image:
# On host (inspecting partitioned SD card or loop-mounted image)$ sudo blkid /dev/sdX2/dev/sdX2: UUID="abcdef12-3456-7890-abcd-ef1234567890" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="12345678-02"
genimage.cfg Partition Layout with bootargsIn Buildroot make menuconfig, filesystem generation and disk partitioning are configured in two separate places:
Filesystem images --->[*] ext2/3/4 root filesystem (BR2_TARGET_ROOTFS_EXT2=y)ext2/3/4 variant (ext4) ---> (BR2_TARGET_ROOTFS_EXT2_4=y)System configuration --->(support/scripts/genimage.sh) Custom scripts to run after creating filesystem images(-c board/<vendor>/<board>/genimage.cfg) Extra arguments passed to custom scriptsHost utilities --->[*] host genimage (BR2_PACKAGE_HOST_GENIMAGE=y)
Check your genimage.cfg to confirm the exact partition order and ensure raw bootloader blocks do not get added to the partition table:
# genimage.cfg excerptimage sdcard.img {hdimage {# Optional for MBR: pin disk-signature so PARTUUID stays stable across buildsdisk-signature = 0x12345678}partition u-boot {# Example for Allwinner SoCs; raw bootloader offset varies by SoCin-partition-table = "no"image = "u-boot-sunxi-with-spl.bin"offset = 8K}partition boot {partition-type = 0x0Cbootable = "true"image = "boot.vfat"}partition rootfs {partition-type = 0x83image = "rootfs.ext4"size = 512M}}
Here, u-boot has in-partition-table = "no", so boot is partition 1 and rootfs is partition 2 (root=/dev/mmcblk0p2 or root=PARTUUID=12345678-02). Always verify the generated partition table on the host:
$ fdisk -l output/images/sdcard.img
=y, not =m)In make linux-menuconfig, verify that every required subsystem is built statically (<*> / =y), paying attention that File systems is a top-level menu rather than inside Device Drivers:
Device Drivers --->MMC/SD/SDIO card support ---><*> MMC block device driver (CONFIG_MMC_BLOCK)<*> Secure Digital Host Controller Interface (CONFIG_MMC_SDHCI)<*> SDHCI platform and OF driver helper (CONFIG_MMC_SDHCI_PLTFM)<*> SDHCI OF support for Arasan (ZynqMP) (CONFIG_MMC_SDHCI_OF_ARASAN)<*> Allwinner sunxi SD/MMC Host Controller (CONFIG_MMC_SUNXI)<*> Synopsys DesignWare Memory Card Interface (CONFIG_MMC_DW)SCSI device support ---><*> SCSI disk support (CONFIG_BLK_DEV_SD)<*> Serial ATA and Parallel ATA drivers (libata) ---> (CONFIG_ATA)<*> AHCI SATA support (CONFIG_SATA_AHCI)<*> Platform AHCI SATA support (CONFIG_SATA_AHCI_PLATFORM)NVME Support ---><*> NVM Express block device (CONFIG_BLK_DEV_NVME)File systems ---><*> The Extended 4 (ext4) filesystem (CONFIG_EXT4_FS)[*] Use ext4 for ext2 file systems (CONFIG_EXT4_USE_FOR_EXT2)
Also verify Device Drivers ---> Generic Driver Options ---> [*] Maintain a devtmpfs filesystem to mount at /dev (CONFIG_DEVTMPFS=y) and [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs (CONFIG_DEVTMPFS_MOUNT=y) so /dev nodes exist as soon as the rootfs mounts.
/chosen/bootargs and Kernel CONFIG_CMDLINE PrecedencePrecedence between the kernel config, U-Boot, and the Device Tree follows a strict hierarchy:
CONFIG_CMDLINE_FORCE=y (Linux .config): Highest priority — forces the kernel’s hardcoded CONFIG_CMDLINE and discards anything passed by U-Boot or the .dtb.$bootargs via fdt_chosen(): When U-Boot runs bootz/bootm/booti with a non-empty bootargs environment variable, fdt_chosen() overwrites /chosen/bootargs inside the DTB passed to Linux./chosen/bootargs (.dts): Takes effect when U-Boot’s bootargs is unset/empty, or when a custom boot flow skips fdt_chosen():/chosen {bootargs = "console=ttyS0,115200 root=/dev/mmcblk0p1";stdout-path = "serial0:115200n8";};
If an outdated .dts /chosen/bootargs or CONFIG_CMDLINE_FORCE is interfering:
CONFIG_CMDLINE_FORCE in make linux-menuconfig (use CONFIG_CMDLINE_FROM_BOOTLOADER=y).bootargs from the board .dts (keep stdout-path) and manage bootargs in U-Boot / boot.cmd / extlinux.conf.fdt addr to the loaded DTB address and resize it first. Note that if $bootargs is non-empty, bootz/bootm/booti runs fdt_chosen() and overwrites /chosen/bootargs with $bootargs — so either update $bootargs directly or delete bootargs (env delete bootargs) before relying on a patched DTB property:=> fdt addr ${fdt_addr_r}=> fdt resize=> fdt print /chosen=> setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait=> bootz ${kernel_addr_r} - ${fdt_addr_r}
Consider an Orange Pi Zero (Allwinner H2+, orangepi_zero_defconfig) configured with Buildroot 2024.02+, Linux 6.6, and U-Boot 2024.01 using a two-partition SD card layout (note that upstream orangepi_zero_defconfig defaults to a single ext4 partition with extlinux.conf; separating boot and rootfs requires updating both genimage.cfg and bootargs together):
8K: u-boot-sunxi-with-spl.bin (unpartitioned)boot.vfat): boot.scr, zImage, sun8i-h2-plus-orangepi-zero.dtbrootfs.ext4): Buildroot root filesystemboot.cmd and bootargsIf your FAT boot partition uses boot.scr, update boot.cmd (not only saveenv) and compile it with mkimage:
# boot.cmdsetenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwaitfatload mmc 0:1 ${kernel_addr_r} zImagefatload mmc 0:1 ${fdt_addr_r} sun8i-h2-plus-orangepi-zero.dtbbootz ${kernel_addr_r} - ${fdt_addr_r}
Compile to boot.scr (or enable BR2_TARGET_UBOOT_BOOT_SCRIPT in Buildroot):
$ mkimage -C none -A arm -T script -d boot.cmd boot.scr
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES)Store persistent kernel overrides in a config fragment referenced by BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES rather than editing output/build/linux-6.6/.config directly (which make linux-dirclean wipes):
# board/custom/orangepi-zero/linux-mmc-rootfs.fragmentCONFIG_MMC=yCONFIG_MMC_BLOCK=yCONFIG_MMC_SUNXI=yCONFIG_PWRSEQ_SIMPLE=yCONFIG_EXT4_FS=yCONFIG_EXT4_USE_FOR_EXT2=yCONFIG_DEVTMPFS=yCONFIG_DEVTMPFS_MOUNT=y
genimage.cfgInclude u-boot-sunxi-with-spl.bin at offset = 8K with in-partition-table = "no" so the Allwinner BootROM loads SPL while boot and rootfs stay at partitions 1 and 2:
image boot.vfat {vfat {files = {"zImage","sun8i-h2-plus-orangepi-zero.dtb","boot.scr"}}size = 16M}image sdcard.img {hdimage { }partition u-boot {in-partition-table = "no"image = "u-boot-sunxi-with-spl.bin"offset = 8Ksize = 1016K}partition boot {partition-type = 0x0Cbootable = "true"image = "boot.vfat"}partition rootfs {partition-type = 0x83image = "rootfs.ext4"size = 512M}}
$ sudo dd if=output/images/sdcard.img of=/dev/sdX bs=4M status=progress conv=fsync
Illustrative serial console boot log after fixing bootargs, genimage.cfg, and built-in drivers:
[ 0.000000] Booting Linux on physical CPU 0x0[ 0.000000] Linux version 6.6.0 (buildroot@build) (arm-buildroot-linux-gnueabihf-gcc 13.2.0)[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait[ 1.812410] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB[ 1.930115] mmc0: new high speed SDHC card at address aaaa[ 1.938420] mmcblk0: mmc0:aaaa SC16G 14.8 GiB[ 1.946204] mmcblk0: p1 p2[ 2.041890] EXT4-fs (mmcblk0p2): mounted filesystem a1b2c3d4-0000-0000-0000-000000000000 ro with ordered data mode. Quota mode: none.[ 2.054112] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.[ 2.061905] devtmpfs: mounted[ 2.069440] Freeing unused kernel memory: 1024K[ 2.075301] Run /sbin/init as init process
If your Buildroot configuration links an initramfs into the kernel (BR2_TARGET_ROOTFS_INITRAMFS=y, which automatically selects BR2_TARGET_ROOTFS_CPIO=y and populates CONFIG_INITRAMFS_SOURCE), the boot flow changes completely. During do_basic_setup(), populate_rootfs() extracts the CPIO archive into the RAM-backed rootfs. Because /init (ramdisk_execute_command) exists inside rootfs, kernel_init_freeable() executes /init directly and skips prepare_namespace() and mount_block_root() (so no VFS: Mounted root (...) line is printed).
If that initramfs is acting as a pivot stage to mount a real storage partition and fails, you will instead see /init exit with an Attempted to kill init! panic:
Freeing unused kernel memory: 1024KRun /init as init process/init: line 12: can't open /dev/mmcblk0p2: No such file or directoryKernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
When using an initramfs /init script to switch to a real block rootfs, ensure it:
proc, sysfs, and devtmpfs (mount -t devtmpfs devtmpfs /dev) so /dev device nodes appear dynamically (CONFIG_DEVTMPFS_MOUNT only auto-mounts /dev inside prepare_namespace(), which is bypassed whenever /init executes from initramfs)=m inside the initramfs (modprobe mmc_block && modprobe sunxi-mmc)while [ ! -b /dev/mmcblk0p2 ]; do sleep 0.1; done)/mnt/root, moves pseudo-filesystems if needed, and executes exec switch_root /mnt/root /sbin/initIn Buildroot, the default CPIO/initramfs entry script lives at fs/cpio/init (fs/initramfs/initramfs.mk only handles re-linking the CPIO archive into the Linux kernel). To customize /init, supply a custom executable /init via a rootfs overlay (BR2_ROOTFS_OVERLAY) or a BR2_ROOTFS_POST_BUILD_SCRIPT.
earlycon and earlyprintkWhen a panic or silent hang occurs before the serial TTY driver initializes, early console output reveals the exact failure point:
earlycon): Enable CONFIG_SERIAL_EARLYCON=y (and CONFIG_SERIAL_8250_CONSOLE=y or your SoC UART console driver), ensure /chosen/stdout-path is set in the .dts, and pass earlycon in bootargs (or explicitly: earlycon=uart8250,mmio32,0x01c28000,115200n8). This works across ARM32, ARM64, and RISC-V.earlyprintk): Pass earlyprintk in bootargs:=> setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
On 32-bit ARM (arch/arm), earlyprintk does not read the Device Tree. It requires CONFIG_DEBUG_LL=y, CONFIG_EARLY_PRINTK=y, and the compile-time SoC UART selection in Kconfig (for example CONFIG_DEBUG_SUNXI_UART0=y, setting CONFIG_DEBUG_UART_PHYS=0x01c28000 and CONFIG_DEBUG_UART_VIRT=0xf1c28000). Once U-Boot transfers control to Linux (head.S / setup_arch()), kernel messages appear immediately without waiting for full serial driver initialization.
# On target (if you reach shell)$ cat /proc/cmdlineconsole=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
If root= is missing or points to the wrong partition, check boot.cmd / extlinux.conf, U-Boot bootargs, and kernel CONFIG_CMDLINE_FORCE.
# In U-Boot (for GPT tables, use 'part list mmc 0' as well)=> mmc dev 0=> mmc partPartition Map for MMC device 0 -- Partition Type: DOSPart Start Sector Num Sectors UUID Type1 2048 32768 12345678-01 0c Boot2 34816 1048576 12345678-02 83
Confirm partition 2 has Linux type 83 (or Linux filesystem GUID on GPT) and matches root=/dev/mmcblk0p2 or root=PARTUUID=12345678-02.
# On target$ dmesg | grep -i mmc[ 1.760120] sunxi-mmc 1c0f000.mmc: Got CD GPIO[ 1.812410] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB[ 1.930115] mmc0: new high speed SDHC card at address aaaa[ 1.938420] mmcblk0: mmc0:aaaa SC16G 14.8 GiB
The host controller driver (sunxi-mmc at 0x01c0f000) probed cleanly and registered mmcblk0.
# On host (read-only check before flashing)$ fsck.ext4 -fn output/images/rootfs.ext4e2fsck 1.47.0 (5-Feb-2023)Pass 1: Checking inodes, blocks, and sizesPass 2: Checking directory structurePass 3: Checking directory connectivityPass 4: Checking reference countsPass 5: Checking group summary informationrootfs.ext4: 1234/32768 files (0.1% non-contiguous), 18432/131072 blocks
$ grep -E '^CONFIG_(MMC|MMC_BLOCK|MMC_SUNXI|ATA|SATA_AHCI|SATA_AHCI_PLATFORM|NVME_CORE|BLK_DEV_NVME|SCSI|BLK_DEV_SD|EXT4_FS|DEVTMPFS|DEVTMPFS_MOUNT)=' output/build/linux-*/.configCONFIG_MMC=yCONFIG_MMC_BLOCK=yCONFIG_MMC_SUNXI=yCONFIG_EXT4_FS=yCONFIG_DEVTMPFS=yCONFIG_DEVTMPFS_MOUNT=y
Every driver required to reach and mount the rootfs must show =y, not =m or is not set.
| Pitfall | Symptom | Fix |
|---|---|---|
root= uses /dev/sda1 on MMC/SD | Panic persists (unknown-block(0,0)) | Use /dev/mmcblk0pX or PARTUUID= for SD/eMMC |
root=UUID=... passed without initramfs | Cannot open root device "UUID=..." | Use root=PARTUUID=... for direct kernel boot, or enable an initramfs |
rootwait omitted on slow MMC/USB probe | Intermittent panic on boot | Add rootwait so prepare_namespace() waits for device registration |
Storage or FS driver built as =m | Block device or FS never mounts | Rebuild kernel with required drivers as =y |
mmcblk0/mmcblk1 probe order flips | Works with SD card, fails on eMMC-only boot | Pin DT aliases { mmc0 = ...; } or boot via root=PARTUUID=... |
genimage regenerates MBR disk-signature | PARTUUID changes after image rebuild | Pin disk-signature (MBR) or partition-uuid (GPT) in genimage.cfg |
boot.scr / extlinux.conf or CONFIG_CMDLINE_FORCE overrides saveenv | setenv bootargs reverts on reboot | Update boot.cmd / extlinux.conf and disable CONFIG_CMDLINE_FORCE |
Initramfs /init missing devtmpfs or pivot | Kernel runs /init then panics on missing /dev/mmcblk0p2 | Mount devtmpfs, load drivers, wait for node, then exec switch_root |
Wrong console device in bootargs | Silent hang after Starting kernel ... | Match console= to SoC UART (ttyS0, ttyAMA0, ttyLP0) and enable earlycon |
+----------------------+ +----------------------+ +----------------------+| U-Boot | | Linux Early Boot | | VFS Rootfs Mount |+----------------------+ +----------------------+ +----------------------+| 1. Load zImage + DTB |-->| 1. Scan /chosen/ | | 1. If /init exists: || 2. Run boot.scr or | | bootargs cmdline | | exec /init (cpio) || extlinux.conf | | 2. Probe block + FS |-->| 2. Else prepare_ || 3. fdt_chosen() sets | | drivers (=y) | | namespace() -> || /chosen/bootargs | | 3. Wait if rootwait | | early_lookup_bdev || from $bootargs | | is set on cmdline | | 3. mount_block_root || | | | | 4. exec /sbin/init |+----------------------+ +----------------------+ +----------------------+| | |v v v+----------------------------------------------------------------------------+| FAILURE MODES || [X] No root=, or root=UUID= without initramfs -> unknown-block(0,0) || [X] Wrong partition in root= or no rootwait -> unknown-block(0,0) || [X] Storage driver =m (no block dev probed) -> unknown-block(0,0) || [X] Block dev ok, FS =m or corrupt superblock -> unknown-block(179,2) || [X] Initramfs /init exits before switch_root -> Attempted to kill init! |+----------------------------------------------------------------------------+
The VFS: Unable to mount root fs on unknown-block(0,0) panic is a boot configuration or kernel-config mismatch rather than a runtime code defect:
bootargs and boot scripts — ensure root=/dev/<device> rootwait (or root=PARTUUID=...) reaches /proc/cmdline and is not overwritten by boot.scr, extlinux.conf, or CONFIG_CMDLINE_FORCEgenimage.cfg partition order — confirm in-partition-table = "no" on raw bootloader regions so the rootfs lands on the expected partition number=y — controller, block (CONFIG_MMC_BLOCK, CONFIG_BLK_DEV_SD, CONFIG_BLK_DEV_NVME), CONFIG_DEVTMPFS_MOUNT, and filesystem (CONFIG_EXT4_FS) drivers must be built-in when booting without an initramfsPARTUUID= (not UUID=) for direct boot — name_to_dev_t() / early_lookup_bdev() cannot resolve filesystem UUID= without userspace initramfs toolingfs/cpio/init runs directly and skips prepare_namespace(); mount devtmpfs, load any modules, wait for the block node, and exec switch_rootOnce the bootloader, partition table, and built-in kernel drivers agree, mount_block_root() mounts the root filesystem cleanly and hands execution to /sbin/init.
root=, rootwait, earlycon)driver-api/mmc)bootargs, bootcmd)fdt Command (fdt chosen, fdt set)mmc Command (mmc dev, mmc part)Quick Links
Legal Stuff





