--- linuxrc.orig	Fri Jan  3 02:56:07 2003
+++ linuxrc	Fri Jan  3 15:21:39 2003
@@ -36,6 +36,8 @@
 seagate.o t128.o tmscsim.o u14-34f.o ultrastor.o wd7000.o \
 a100u2w.o 3w-xxxx.o"
 
+USB_MODULES="usbcore.o usb-uhci.o usb-ohci.o usb-storage.o"
+
 # Misc functions
 
 mountit(){
@@ -110,6 +112,23 @@
 NOSCSI=""
 case "$CMDLINE" in *noscsi*) NOSCSI="yes"; ;; esac
 
+#Check use USB Drive
+USE_USB=""
+USB_ARG=""
+FOUND_USB=""
+case "$CMDLINE" in
+    *usbcd|*usbcd\ *|*usbcd=*)
+	USE_USB="yes"
+	for i in $CMDLINE; do
+	    case "$i" in
+		usbcd=*)
+		    USB_ARG="$i"
+		    ;;
+	    esac
+	done
+	;;
+esac
+
 # Disable kernel messages while probing modules in autodetect mode
 echo "0" > /proc/sys/kernel/printk
 
@@ -159,16 +178,35 @@
 test -n "$INTERACTIVE" && echo "6" > /proc/sys/kernel/printk
 for i in "$@"; do
 echo -n "${CRE}${BLUE}Probing ${TYPE}... ${MAGENTA}$i${NORMAL}"
-if test -f /modules/scsi/$i && insmod -f /modules/scsi/$i >/dev/null 2>&1
-then
-echo "${CRE} ${GREEN}Found ${TYPE} device(s) handled by ${MAGENTA}$i${GREEN}.${NORMAL}"
-case "$TYPE" in scsi|SCSI) FOUND_SCSI="yes"; ;; esac
-fi
+case "$TYPE" in
+    USB)
+	if test -f /modules/usb/$i && insmod -f /modules/usb/$i >/dev/null 2>&1 && test "$i" = "usb-storage.o"
+	then
+	sleep $USB_ARG
+	echo "${CRE} ${GREEN}Found ${TYPE} device(s) handled by ${MAGENTA}$i${GREEN}.${NORMAL}"
+	FOUND_USB="yes"
+	fi
+    ;;
+    *)
+	if test -f /modules/scsi/$i && insmod -f /modules/scsi/$i >/dev/null 2>&1
+	then
+	echo "${CRE} ${GREEN}Found ${TYPE} device(s) handled by ${MAGENTA}$i${GREEN}.${NORMAL}"
+	case "$TYPE" in scsi|SCSI) FOUND_SCSI="yes"; ;; esac
+	fi
+    ;;
+esac
 done
 test -n "$INTERACTIVE" && echo "0" > /proc/sys/kernel/printk
 echo -n "${CRE}"
 }
 
+# load USB modules
+if test -n "$USE_USB"; then
+MODULES="$USB_MODULES"
+loadmodules USB $MODULES
+MODULES=""
+fi
+
 # Check for SCSI, use modules on bootfloppy first
 if test -n "$INTERACTIVE"; then
 # Let the user select interactively
@@ -205,7 +243,7 @@
 
 # Now that the right SCSI driver is (hopefully) loaded, try to find CDROM
 DEVICES="/dev/hd?"
-test -n "$FOUND_SCSI" && DEVICES="/dev/scd? /dev/scd?? $DEVICES"
+(test -n "$FOUND_SCSI" || test -n "$FOUND_USB") && DEVICES="/dev/scd? /dev/scd?? $DEVICES"
 # New: Also try parallel port CD-Roms [for Mike].
 DEVICES="$DEVICES /dev/pcd?"
 # New: also check HD partitions for a KNOPPIX/KNOPPIX image