> That's what the initrd should be used for, and from the description it
> sounds like it should work.  Maybe you should post the initrd config?
ok
#!/bin/sh
# Daniel Robbins <[EMAIL PROTECTED]>
# Copyright 2003 Gentoo Technologies, Inc.
# Distributed under the GPL

PATH=/usr/sbin:/usr/bin:/sbin:/bin
BACK_UP="\033[1K\033[0G"
HILITE="\033[1m"
NORMAL="\033[0m"
WARN="\033[1m"
BAD="\033[1m"
#mount -o remount,rw /
mount /proc
INITRD="true"
SCSI="no"
CDCACHE="no"
IDEBUG="no"
FIREWIRE="no"
ATARAID="no"
PCMCIA="no"
DETECT="no"
USB="no"
KEYMAP="no"
if [ ! -e /dev/.devfsd ]
then
        #mount devfs
        mount -t devfs devfs /dev
fi

CMDLINE="`cat /proc/cmdline`"
for x in $CMDLINE
do
	if [ "$x" = "doscsi" ]
	then
		SCSI="yes"
	elif [ "$x" = "cdcache" ]
	then
		CDCACHE="yes"
	elif [ "$x" = "idebug" ]
	then
		IDEBUG="yes"
	fi
done

for x in $CMDLINE
do
	if [ "$x" = "dofirewire" ]
        then
                FIREWIRE="yes"
	fi
done
for x in $CMDLINE
do
        if [ "$x" = "nousb" ]
        then
                USB="no"
        fi
done

for x in $CMDLINE
do
	if [ "$x" = "doataraid" ]
        then
                ATARAID="yes"
	fi
done
for x in $CMDLINE
do
        if [ "$x" = "dopcmcia" ]
        then
                PCMCIA="yes"
        fi
done

for x in $CMDLINE
do
        if [ "$x" = "dokeymap" ]
        then
                KEYMAP="yes"
        fi
done

blurb() {
	echo -ne ${HILITE}${1}
}

backup() {
	echo -ne "\033[0G\033[0K"
}
if [ -e /dev/.devfsd ]
        then
                RAM_DEVICE="rd"
        else
                RAM_DEVICE="ram0"
fi


# Create the new root FS

mounted=""

initmsg() {
	echo -e "${HILITE}${*}${NORMAL}"
}

getkeymap() {
	local mykeymap
	echo -ne ${HILITE}
	cat /keymaps/key.lst
	echo -ne ${NORMAL}
	read -p "Keymap selection: " mykeymap
	if [ -e /keymaps/${mykeymap}.map ]
	then
		echo -e "${HILITE}---- Loading ${mykeymap} keymap${NORMAL}"
		loadkmap < /keymaps/${mykeymap}.map
	elif [ "$mykeymap" = "" ]
	then
		#default keymap is "us"
		echo -e "${HILITE}---- Loading default (US) keymap${NORMAL}"
		loadkmap < /keymaps/us.map
	else	
		getkeymap
	fi
}

modules_scan() {
	local type
	type=${1}; shift
	for x in "$@"
	do
		blurb "---- Scanning for ${x}..."
		insmod -f /modules/${type}/${x}.o > /dev/null 2>&1
		if [ $? -eq 0 ]
		then
			backup
			echo -e "${GOOD}---- Detected ${x} hardware${NORMAL}"
		else
			backup
			echo -ne "${NORMAL}"
		fi
	done
}
echo "${GOOD} Initial RAMDISK Loading Starting..."
# Mount the CD

if [ "$SCSI" = "yes" ]
then
DEVICE=SCSI
	echo -e "${HILITE} ---- Beginning storage detection${NORMAL}"
	# This next "## ##" gets sed tweaked:
	modules_scan storage ide-core ide-disk
fi

if [ "$FIREWIRE" = "yes" ]
then
DEVICE=FIREWIRE
        echo -e "${HILITE} ---- Beginning firewire detection${NORMAL}"
        # This next "## ##" gets sed tweaked:
        modules_scan firewire ieee1394 ohci1394 eth1394 sbp2
fi
if [ "$ATARAID" = "yes" ]
then
DEVICE=ATARAID
        echo -e "${HILITE} ---- Beginning ata detection${NORMAL}"
        # This next "## ##" gets sed tweaked:
        modules_scan ataraid ataraid pdcraid hptraid
fi

if [ "$PCMCIA" = "yes" ]
then
DEVICE=PCMCIA
        echo -e "${HILITE} ---- Beginning pcmcia detection${NORMAL}"
        # This next "## ##" gets sed tweaked:
        modules_scan ide-cs
fi
if [ "$USB" = "yes" ]
then
DEVICE=USB
        echo -e "${HILITE} ---- Beginning usb detection${NORMAL}"
        # This next "## ##" gets sed tweaked:
        modules_scan usb usbcore ehci-hcd uhci usb-ohci hid usb-storage
fi

if [ "$KEYMAP" = "yes" ]
then
getkeymap
fi
/bin/sh
exit

--
[EMAIL PROTECTED] mailing list

Reply via email to