Bug 103609 - mkinitrd's (undocumented) --with-usb flag doesn't work anyway
Summary: mkinitrd's (undocumented) --with-usb flag doesn't work anyway
Alias: None
Product: Red Hat Linux Beta
Classification: Retired
Component: mkinitrd   
(Show other bugs)
Version: beta1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2003-09-02 22:53 UTC by Alexandre Oliva
Modified: 2007-04-18 16:57 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-09-03 18:58:46 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Alexandre Oliva 2003-09-02 22:53:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703

Description of problem:
I was hoping I was going to be able to do some RAID1 of boot partitions and LVM
physical volumes with this external hard disk I just purchased, but it turns out
that the kernel brings up raid devices before the usb-storage module is loaded.
 In fact, mkinitrd doesn't even add usb-storage.o to the initrd filesystem, even
though /boot is mounted from a RAID1 device that does have a member in the
external disk (does it matter?), and the root filesystem is in a volume group
whose physical volumes are all raid1 devices that have replicas in the external

Worse yet: if I force usb-storage to be copied to the initrd filesystem, then
the external hard disk is not recognized at all (e.g., fdisk /dev/sda fails).

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.create raid1 device for /boot or /,  with an external usb device as one of the

Actual Results:  The slot that used to be taken by the usb raid1 member is
missing (i.e., the partition was not found when the raid1 device was brought up)

Expected Results:  /me would like it to be :-)

Additional info:

Comment 1 Jeremy Katz 2003-09-02 23:02:54 UTC
You have to pass --with-usb to get mkinitrd to pull in usb modules.  Otherwise,
things got horribly bad very fast (it caused a number of bugs in 8.0 which is
why it was changed back for 9 and later)

Comment 2 Alexandre Oliva 2003-09-02 23:35:29 UTC
Err...  --with-usb?  mkinitrd doesn't seem to support such an option.  I tried
--with=usb as well, but then it couldn't find a module named usb.o.  And then,
as I wrote before, --with=usb-storage had ill effects.  Can you please check the
spelling of the option you're telling me to use?  Thanks,

Comment 3 Alexandre Oliva 2003-09-02 23:54:56 UTC
Ok, so...  There is a bug in /sbin/mkinitrd in that it matches --with* before
--with-usb, but you already have a fix for that.  The other problem is that,
although I don't have root or boot in a USB device, I do have them used by the
root and boot devices, as a raid 1 member of the former, and as a raid1 member
of one of the physical volumes that form the volume group that contains the root
logical volume.  But the code to tell whether --with-usb implies $needusb
doesn't check for raid members or volume groups :-(

Comment 4 Alexandre Oliva 2003-09-03 00:01:14 UTC
Err...  Actually, I didn't either /boot or / in RAID at all (I had the wrong
pair of /boot and / in mind.  This doesn't make any difference, though, AFAICT.
 Having it in a raid device or in a physical volume, it won't be detected.

Comment 5 Alexandre Oliva 2003-09-03 16:54:20 UTC
The solution I ended up using was to explicitly add the following modules to the
mkinitrd line, in this order:

--with=usb-uhci --with=sd_mod --with=usb-storage

with Red Hat Linux 9's mkinitrd, some additional options were needed in between
(it seems to not automatically add dependencies):

--with=usbcore --with=usb-uhci --with=scsi_mod --with=sd_mod --with=usb-storage

Now it works but, heck!, USB 1.1 is slow! (as expected :-)  I just got a
firewire cable that will plug into my laptop, so let's see how that works... 
First try wasn't successful :-(

Comment 6 Alexandre Oliva 2003-09-03 17:19:27 UTC
Oh, I forgot to mention: the Shrike mkinitrd doens't add the `sleep 5' after
loading usb-storage, so it doesn't quite work out of the box either.

On the good side, Shrike can access the disk as firewire, but Severn (with a
slightly newer kernel than what shipped in the beta) can't :-(

Comment 7 Jeremy Katz 2003-09-03 18:58:46 UTC
Committed the fix for --withusb.

Not going to fix raid on usb case, although if you want to patch things to
support it, feel free to send my way.

Note You need to log in before you can comment on or make changes to this bug.