Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 107667 - sys-kernel/genkernel-3.3.6 linuxrc/initrd.scripts needs clearly defined usb keychain media support
Summary: sys-kernel/genkernel-3.3.6 linuxrc/initrd.scripts needs clearly defined usb k...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
: 108323 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-29 20:55 UTC by postmodern
Modified: 2006-04-13 16:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
sample findusbmount function (findusbmount,758 bytes, text/plain)
2005-09-29 20:57 UTC, postmodern
Details
Perhaps this instead? (Bug-#107667-a-guess.patch,434 bytes, patch)
2005-10-01 08:07 UTC, Tres 'RiverRat' Melton
Details | Diff
patch to linuxrc for usbfs and usbroot (linuxrc.patch,2.28 KB, patch)
2005-10-06 19:40 UTC, postmodern
Details | Diff
patch to initrd.defaults to add the USBROOT and USBROOT_DEV variables (initrd.defaults.patch,248 bytes, patch)
2005-10-06 19:41 UTC, postmodern
Details | Diff
patch to initrd.scripts to add the findusbmounts function (initrd.scripts.patch,2.51 KB, patch)
2005-10-06 19:42 UTC, postmodern
Details | Diff
patch to linuxrc for usbfs using DO_USB (linuxrc.patch,2.27 KB, patch)
2005-10-06 20:34 UTC, postmodern
Details | Diff
change DO_USB to DO_usb (linuxrc.patch,2.27 KB, patch)
2005-10-06 20:54 UTC, postmodern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description postmodern 2005-09-29 20:55:44 UTC
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.
Comment 1 postmodern 2005-09-29 20:57:25 UTC
Created attachment 69534 [details]
sample findusbmount function

A sample of a findusbmount function, similar to findcdmount but caters to usb
media.
Comment 2 Tres 'RiverRat' Melton 2005-10-01 08:07:55 UTC
Created attachment 69639 [details, diff]
Perhaps this instead?
Comment 3 postmodern 2005-10-01 17:56:14 UTC
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.
Comment 4 postmodern 2005-10-06 19:40:34 UTC
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.
Comment 5 postmodern 2005-10-06 19:41:29 UTC
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.
Comment 6 postmodern 2005-10-06 19:42:33 UTC
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.
Comment 7 postmodern 2005-10-06 20:34:32 UTC
Created attachment 70042 [details, diff]
patch to linuxrc for usbfs using DO_USB

patch to linuxrc for usbfs using DO_USB
Comment 8 postmodern 2005-10-06 20:54:09 UTC
Created attachment 70044 [details, diff]
change DO_USB to DO_usb

need more coffee
Comment 9 Tim Yamin (RETIRED) gentoo-dev 2005-11-05 13:48:16 UTC
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!
Comment 10 Tim Yamin (RETIRED) gentoo-dev 2005-11-06 04:05:17 UTC
*** Bug 108323 has been marked as a duplicate of this bug. ***
Comment 11 Tim Yamin (RETIRED) gentoo-dev 2005-12-29 14:46:46 UTC
*poke* (See comment #9)
Comment 12 Chris Gianelloni (RETIRED) gentoo-dev 2006-04-13 08:45:12 UTC
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?
Comment 13 postmodern 2006-04-13 16:46:14 UTC
Alright then, I havn't worked on this in a while so it's probably been fxied long ago.