Skip to contentSkip to conversation

Initrd problem with 2.6 kernel

DISCUSSION Andrey Borzenkov 1 participant 1 message Aug 8, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines

There is a chicken and egg problem with initrd on 2.6. When root=/dev/xxx is passed to kernel, kernel will call try_name, which uses /sys/block/drive/dev, to find out the device number for ROOT_DEV. The problem is /sys/block/drive may not exist if the driver is loaded by /linuxrc in initrd. As the result, /linuxrc can't use /proc/sys/kernel/real-root-dev to determine the root device number.

{pts/1}% grep \"/sys\" *

do_mounts.c:    sys_mkdir("/sys", 0700);
do_mounts.c:    if (sys_mount("sysfs", "/sys", "sysfs", 0, NULL) < 0)
do_mounts.c:    sys_umount("/sys", 0);
do_mounts.c:    sys_rmdir("/sys");

or do you mean something different?

-andrey