Currently the linuxrc/initrd.scripts script supplied with sys-kernel/genkernel-3.3.6 detects and accesses usb keychains (residing at /dev/sd*) in the same way as cdroms. This is incorrect since usb keychains are obviously not CDs making all diagnostic messages relating to CDRoms seem out of place when your booting off a keychain. Also USB keychains are not read-only material and should not be mounted with the -r option by default. A findcdmount like function that caters to usb media should be created so that USB keychains are treated appropriately and users building Gentoo enabled keychains do not have to hack the scripts themselves. A sample of such a function is attached. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 69534 [details] sample findusbmount function A sample of a findusbmount function, similar to findcdmount but caters to usb media.
Created attachment 69639 [details, diff] Perhaps this instead?
Ah yes much better. I'm about to slap Gentoo on my new Corsair usb keychain with some modified linuxrc/initrd.scripts that implements USBROOT and USBROOT_DEV keywords that enable CDROOT but gives preferrance towards findusbmount in the bootstrapCD function. I'll post the patchs after it's all tested.
Created attachment 70038 [details, diff] patch to linuxrc for usbfs and usbroot Adds the kernel command line option usbroot which is similar to cdroot, but enables the mounting of usbfs and causes bootstrapCD to use findusbmounts exclusively.
Created attachment 70039 [details, diff] patch to initrd.defaults to add the USBROOT and USBROOT_DEV variables patch to initrd.defaults to add the USBROOT and USBROOT_DEV variables.
Created attachment 70040 [details, diff] patch to initrd.scripts to add the findusbmounts function patch to initrd.scripts to add the findusbmounts function and alters bootstrapCD to use findusbmounts when USBROOT is enabled.
Created attachment 70042 [details, diff] patch to linuxrc for usbfs using DO_USB patch to linuxrc for usbfs using DO_USB
Created attachment 70044 [details, diff] change DO_USB to DO_usb need more coffee
Any reason for the "else" in the "if [ "${CDROOT}" -eq '1' ]" section in findusbmount()? As far as I can see if we have usbmount we always have CDROOT too. Also is the usbfs needed for something (such as mounting a USB key, for example?) as I just see it getting mounted and then later unmounted. Patch looks great otherwise, thanks!
*** Bug 108323 has been marked as a duplicate of this bug. ***
*poke* (See comment #9)
Is this even necessary? I'm just not sure I understand why we need specific USB handling, when using the CD stuff works perfectly for USB keychains?
Alright then, I havn't worked on this in a while so it's probably been fxied long ago.