Waiting for Removable Media Problem

While I was working on BSP for ALIX 3D3, I had to configure the kernel fragments for the board. I started with standard x86 kernel configuration provided by linux-yocto package. This standard configuration includes very basic fragments to at least boot a regular x86 system. For example, it enables network, usb, pci and sound.

As ALIX 3D3 is a compatible x86 machine, I got the standard configuration and enabled ALIX specific configuration such as CS5536 companion chip, sound, AMD Geode random number generator, Geode LX Framebuffer, etc. After enabling these configuration, I built core-image-minimal live image and dd‘ed the image into CF Card. After booting the machine, I saw that the boot process is stuck and the only thing in the screen is “waiting for removable media”.

I knew that this was caused by the init script and took a look at the script. Clearly, it couldn’t find the disk (/dev/sda) and couldn’t find the root image in the disk afterwards. Later on, I checked dmesg output and there was nothing related with disks. Kernel could not probe them. After checking the kernel parameters, I enabled CS5536 PATA support. Now sda could be seen in the dmesg output. However, I still had the same problem even if there was no problem with the disks. My attention, then, was turned to udev.

After hours of debugging udev and its rules, I found out that the udev version that I use (>= udev 182) requires CONFIG_DEVTMPFS kernel parameter to be present to work properly. After adding the following kernel parameters, udev successfully probed/mounted disks and the boot process went OK.

1
2
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y

When you are working on BSP, or kernel parameters, be sure to enable above parameters in the kernel. Otherwise, udev will not work properly.

Happy hacking!

PS: Yocto Project version is dylan. This blog post was written dylan branch in mind

Comments