Summary: | Kernel 2.6 fails to boot from md with initrd | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Wouter Coppens <wouter.coppens> |
Component: | [OLD] Core system | Assignee: | x86-kernel (DEPRECATED) <x86-kernel> |
Status: | RESOLVED UPSTREAM | ||
Severity: | major | CC: | steel300 |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | .config for gentoo-dev-sources-2.6.3-r1 |
Description
Wouter Coppens
2004-02-23 01:54:41 UTC
Created attachment 26148 [details]
.config for gentoo-dev-sources-2.6.3-r1
Does this work if you compile raid1 into the kernel? How about a newer kernel? If I compile raid1 in the kernel, it works perfectly. I tried it with 2.6.5-gentoo and it still fails. Do you object to compiling raid 1 into the kernel every time? If it's something that is needed to boot, then it should be in the kernel anyways. It sounds like a udev thing as well. Since it's compiled as as module, the devices aren't getting created until the module is loaded. Those devices are needed to boot. By failing on 2.6.5-gentoo, do you mean that it fails with raid1 compiled as a module? The problem is that I have more then 100 servers to manage, all with different hardware. If I compile everything as modules, I can use 1 kernel for all my servers and loads the necessary drivers from an initrd. It works fine this way with kernel-2.4 If the system is installed on scsi-disks, it needs to load the scsi-module first and than the raid1. Otherwise the raid doesn't start. And I don't want to compile every driver in the kernel. So we found a way to make it work. Are you using udev? It sounds kind of like a race condition almost. The devices aren't getting created fast enough for the kernel to use. I'm lowering the priority, since we sort of found a solution. How many drviers would have to be built into the kernel to incorporate this fix? I guess this is closed. We found a solution, but no response back. I don't know if it's solved. It was not solved with gentoo-sources-2.6.5-r1 and I haven't tested it since then. I don't see any reason it shouldn't work; this seems looks as more of an issue where the raid1 module isn't actually being loaded. Does the initrd say that it loaded the module successfully? I have tested it again and it is not solved. File listing of the initrd: # find . ./bin ./bin/nash ./bin/modprobe ./bin/insmod ./dev ./dev/md0 ./dev/md1 ./dev/md2 ./dev/ram ./dev/null ./dev/tty1 ./dev/tty2 ./dev/tty3 ./dev/tty4 ./dev/console ./dev/systty ./etc ./lib ./lib/raid1.ko ./proc ./sbin ./linuxrc ./sysroot ./loopfs # cat linuxrc #!/bin/nash echo "Loading raid1.ko module" insmod /lib/raid1.ko echo Mounting /proc filesystem mount -t proc /proc /proc raidautorun /dev/md0 raidautorun /dev/md1 raidautorun /dev/md2 echo Creating block devices mkdevices /dev echo Creating root device mkrootdev /dev/root echo 0x0100 > /proc/sys/kernel/real-root-dev echo Mounting root filesystem mount -o noatime --ro -t reiserfs /dev/root /sysroot pivot_root /sysroot /sysroot/initrd umount /initrd/proc I've done some additionel tests. The problem should be searched within the devices. For some reason it's missing some devices. If I compile 'devfs' and 'mount at boot' in the kernel, I can boot it with the raid1 modules in the initrd. I want to use udev and not devfs because it's obsolete. I'm gonna try to create the devices nodes in the initrd and see if I can boot. ok, I have found what's going wrong. I took a closer look at the devices in the initrd: /dev/md0 is a symbolic link to /dev/md/0 /dev/md1 is a symbolic link to /dev/md/1 but the directory /dev/md is missing, so the symbolic links point to nowhere. I deleted the md's and recreated them with mknod. Now it works fine. So the mkinitrd script should be modified to create proper devices and not symbolic links. [ From comment #13 ] I'm closing this bug since it is an upstream issue with the mkinitrd script and we can't do anything about that... Can I suggest filing a bug about this with its author? If you have any further issues then please feel free to reopen this bug. Thanks! |