|
From: Heiko Z. <smi...@us...> - 2004-12-20 02:28:23
|
Update of /cvsroot/devil-linux/build/config/etc/initrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22044/config/etc/initrd Modified Files: linuxrc mount_cdrom Log Message: more changes to get udev working removed devfsd and support for its device names Index: linuxrc =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/initrd/linuxrc,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- linuxrc 18 Dec 2004 23:32:00 -0000 1.71 +++ linuxrc 20 Dec 2004 02:28:13 -0000 1.72 @@ -163,31 +163,40 @@ # get version info DLVERSION=$(cat VERSION) +echo "Mounting required file systems" + # mount proc mount -n -t proc none /proc +# mount proc +mount -n -t sysfs none /sys + # mount usb mount -n -t usbdevfs none /proc/bus/usb echo Kernel $(uname -r) # mount shared memory filesystem with a limit of 40GB (for now) -echo "Mounting SHM FS on /shm" mount -n -t shm shmfs /shm 2> /dev/null || mount -n -t tmpfs none /shm # get rid of modprobe warnings mkdir -p /shm/etc -echo "waiting until usb-storage driver has initialized all devices ..." -sleep 15 - -#grep usb-storage /proc/bus/usb/devices - echo -e "Loading loop-AES module"; modprobe loop 2> /dev/null +echo -e "Unpacking udev configuration" +tar -xzf /udev-cfg.tar.gz -C /shm + +echo -e "Creating devices in /dev" +/sbin/udevstart +echo "/sbin/udev" > /proc/sys/kernel/hotplug + /bin/sh +#echo "waiting until usb-storage driver has initialized all devices ..." +#sleep 10 + # save loaded config DL_CONFIG_SOURCE="" DL_CONFIG_FILE="" @@ -207,15 +216,15 @@ fi # generate the device list we need to search for the configuration information -CDROM_IDE=`find /dev/ide/ -name "cd*" 2> /dev/null` -CDROM_SCSI=`find /dev/scsi/ -name "cd*" 2> /dev/null` -PARTITIONS_IDE=`find /dev/ide/ -name "part*" 2> /dev/null` -PARTITIONS_SCSI=`find /dev/scsi/ -name "part*" 2> /dev/null` -DISCS_SCSI=`find /dev/scsi/ -name "disc" 2> /dev/null` -FLOPPIES=`find /dev/floppy/ -name "?" 2> /dev/null` -CONFIG_SRC_LIST="$PARTITIONS_SCSI $PARTITIONS_IDE $DISCS_SCSI $CDROM_IDE $CDROM_SCSI $FLOPPIES" +DEVICES_IDE=`find /dev -name "hd*" 2> /dev/null` +CDROM_SCSI=`find /dev -name "sr*" 2> /dev/null` +DISCS_SCSI=`find /dev -name "sd*" 2> /dev/null` +FLOPPIES=`find /dev -name "fd*" 2> /dev/null` +CONFIG_SRC_LIST="$DEVICES_IDE $DISCS_SCSI $CDROM_SCSI $FLOPPIES" CONFIG_FILE="etc.tar.bz2" +CDROMS=$(grep -i "drive name" /proc/sys/dev/cdrom/info) + until [ "$DL_CONFIG_SOURCE" != "" ] ; do if [ "$CONFIG_USER" != "" ]; then parse_config_cmdline $CONFIG_USER && continue @@ -232,7 +241,8 @@ if mount -n -t auto $CFG_SRC /floppy >/dev/null 2>&1 ; then umount /floppy # in case user swaps floppy when we are accepting input # offer to copy the configuration file if device is not a CD - if [ ! "${CFG_SRC##/*/}" = "cd" ];then + IS_CDROM=$(echo $CDROMS | grep "${CFG_SRC##/*/}" ) + if [ -z "$IS_CDROM" ];then beep; $YELLOW echo -e "\n*** Found empty configuration media. ***" @@ -261,6 +271,8 @@ fi done + /bin/sh + beep; sleep 1; beep; sleep 1; beep; $RED echo -e "Please insert Configuration Media and press 'ENTER'" Index: mount_cdrom =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/initrd/mount_cdrom,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- mount_cdrom 17 May 2004 23:05:35 -0000 1.25 +++ mount_cdrom 20 Dec 2004 02:28:13 -0000 1.26 @@ -22,15 +22,9 @@ fi # generate list of cdroms from devfs -CDROM_IDE=`find /dev/ide/ -name "cd*" 2> /dev/null` -CDROM_SCSI=`find /dev/scsi/ -name "cd*" 2> /dev/null` -CDROMS="$CDROM_IDE $CDROM_SCSI" - -if [ "$3" != "silent" ]; then - $GREEN - echo "Search list: $CDROMS" - $NORMAL -fi +DEVICES_IDE=`find /dev -name "hd*" 2> /dev/null` +CDROM_SCSI=`find /dev -name "sr*" 2> /dev/null` +CDROMS="$DEVICES_IDE $CDROM_SCSI" for disk in $CDROMS do @@ -58,10 +52,10 @@ done # ok let's check all partitions if we find the bootcd.iso & the file DEVIL-LINUX -PARTITIONS_IDE=`find /dev/ide/ -name "part*" 2> /dev/null` -PARTITIONS_SCSI=`find /dev/scsi/ -name "part*" 2> /dev/null` -PARTITIONS="$PARTITIONS_IDE $PARTITIONS_SCSI" -for disk in $PARTITIONS +DEVICES_IDE=`find /dev -name "hd*" 2> /dev/null` +DISCS_SCSI=`find /dev -name "sd*" 2> /dev/null` +DISCS="$DEVICES_IDE $DISCS_SCSI" +for disk in $DISCS do echo -n "checking $disk " if mount -n -t auto -o rw,noatime $disk /mnt 2> /dev/null; then |