Description of problem: mkinitrd does not create a good initrd for usb-storage devices Version-Release number of selected component (if applicable): How reproducible: I discovered (and fixed) a bug in mkinitrd. I have an external USB disk attached to a USB 2.0 PCMCIA card. I realize that I cannot have the /boot partition on the external disk, but I have the / partition on the external disk. I was able to install perfectly. However when I try to boot up, the initrd that is created does not have the correct configuration to power on my external USB disk, so I get a kernel panic. Evenually I was able to get it to work, by creating a new initrd. I also had to edit mkinitrd. You have a sleep statement in there that waits for 5 seconds after loading usb-storage.o. However your if statement is incorrect - I do not have the script in front of me, but basically you say that "if module being loaded is usb-storage then sleep 5 seconds" - but what you SHOULD say is "if module being loaded is usb-storage.o then sleep 5 seconds" - i.e. you omitted the ".o" after usb-storage. Also, I have run out of patience, but it may be that you also have to put in a sleep after loading all the usb drivers, such as usb-uhci, usb-ohci, etc. It REALLY would be nice actually if your installer would generate an initrd which supports the system that is being installed. It's ridiculous that the installer is able to recognize my external disk, yet once I try to boot up, I have to make manual modifications to the initrd. Also, I have noticed that when I shutdown, the shutdown process turns off PCMCIA support while the disk is still mounted, so of course the shutdown hangs. I will report this separately. Steps to reproduce: 1.vi /sbin/mkinitrd 2.search for sleep 5 3.look in amazement as you see that the programmer left off ".o" after usb- storage in the previous if statement. Actual results: System cannot boot. Expected results: I expect that if anaconda allows me to install on my external USB disk, I should be able to load the system that I created. Additional info:
usb disks are only allowed as an installation target in expert mode, which is not supported. mkinitrd with the --with-usb flag in rawhide does things right for usb-storage.
I tried the with-usb option and it makes no difference. Until you fix the bug in the if statement and change it to look for "usb-storage.o" rather than "usb- storage" it will not work.
No, $module has the .o (or .ko if using 2.6) sed'd off the end. Look up about 10 or 15 lines.
I did look 10-15 lines above, and I saw this: module=`echo $MODULE | sed "s|.*/||"` However if you actually run this command (and I tried it out on the command line as well as echo-ing the value of $MODULE afterwards, it does NOT strip off the .o - please try it before you assume that it works.
Again, rawhide. It's a different beast :) module=`echo $MODULE | sed "s|.*/||" | sed "s/.k\?o$//"`