From: Alex de L. <ale...@us...> - 2004-07-27 23:50:21
|
Update of /cvsroot/morphix/scripts-base/miniroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20335/miniroot Modified Files: linuxrc Log Message: * minor cleanups, minor fixes for 2.6.7-v2 base iso release Index: linuxrc =================================================================== RCS file: /cvsroot/morphix/scripts-base/miniroot/linuxrc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** linuxrc 17 Jul 2004 13:36:10 -0000 1.3 --- linuxrc 27 Jul 2004 23:50:09 -0000 1.4 *************** *** 29,50 **** # Removed 53c7,8xx -> crashes if no device attached. # Removed AM53C974 -> crashes tmscsim if adapter found ! SCSI_MODULES="aic7xxx.o BusLogic.o \ ! ncr53c8xx.o NCR53c406a.o \ ! ata_piix.o \ ! advansys.o aha1740.o aha1542.o aha152x.o \ ! atp870u.o dtc.o eata.o fdomain.o gdth.o \ ! megaraid.o pas16.o pci2220i.o pci2000.o psi240i.o \ ! qlogicfas.o qlogicfc.o qlogicisp.o \ ! seagate.o t128.o tmscsim.o u14-34f.o ultrastor.o wd7000.o \ ! a100u2w.o 3w-xxxx.o" # Misc functions INSMOD="insmod" ! [ -x /static/insmod ] && INSMOD="/static/insmod" RMMOD="rmmod" ! [ -x /static/rmmod ] && RMMOD="/static/rmmod" ! BUILTIN_FS="iso9660 ext2 vfat" mountit(){ --- 29,53 ---- # Removed 53c7,8xx -> crashes if no device attached. # Removed AM53C974 -> crashes tmscsim if adapter found ! # Possible segfault with 2.6 ?? ! # aha1740.ko, atp870u.ko, megaraid.ko, qlogicfc.ko, a100u2w.ko ! KEXT=".ko" ! SCSI_MODULES="aic7xxx$KEXT BusLogic$KEXT \ ! ncr53c8xx$KEXT NCR53c406a$KEXT \ ! ata_piix$KEXT \ ! advansys$KEXT aha1740$KEXT aha1542$KEXT aha152x$KEXT \ ! atp870u$KEXT dtc$KEXT eata$KEXT fdomain$KEXT gdth$KEXT \ ! megaraid$KEXT pas16$KEXT pci2220i$KEXT pci2000$KEXT psi240i$KEXT \ ! qlogicfas$KEXT qlogicfc$KEXT qlogicisp$KEXT \ ! seagate$KEXT t128$KEXT tmscsim$KEXT u14-34f$KEXT ultrastor$KEXT wd7000$KEXT \ ! a100u2w$KEXT 3w-xxxx$KEXT" # Misc functions INSMOD="insmod" ! /static/[ -x /static/insmod ] && INSMOD="/static/insmod" RMMOD="rmmod" ! /static/[ -x /static/rmmod ] && RMMOD="/static/rmmod" ! BUILTIN_FS="iso9660 ext2 vfat ntfs" mountit(){ *************** *** 52,56 **** # Uses builtin mount of ash.knoppix # Builin filesystems ! BUILTIN_FS="iso9660 ext2 vfat" for fs in $BUILTIN_FS; do test -b $1 && mount -t $fs $3 $1 $2 >/dev/null 2>&1 && return 0 --- 55,59 ---- # Uses builtin mount of ash.knoppix # Builin filesystems ! BUILTIN_FS="iso9660 ext2 vfat ntfs" for fs in $BUILTIN_FS; do test -b $1 && mount -t $fs $3 $1 $2 >/dev/null 2>&1 && return 0 *************** *** 95,103 **** # Just go to the top of the screen # echo -n "[H[J" ! echo "" # Be verbose ! echo "${WHITE}Welcome to the ${YELLOW}MORPHIX${WHITE} liveCD!${NORMAL}" ! echo "" ! echo "" # We only need the builtin commands and /static at this point --- 98,106 ---- # Just go to the top of the screen # echo -n "[H[J" ! /static/echo "" # Be verbose ! /static/echo "${WHITE}Welcome to the ${YELLOW}MORPHIX${WHITE} liveCD!${NORMAL}" ! /static/echo "" ! /static/echo "" # We only need the builtin commands and /static at this point *************** *** 115,119 **** CMDLINE="$(cat /proc/cmdline)" - case "$CMDLINE" in *nodma*) NODMA="yes"; ;; esac # Check if we are in interactive startup mode case "$CMDLINE" in *BOOT_IMAGE=expert\ *) INTERACTIVE="yes"; :>/interactive; ;; esac --- 118,121 ---- *************** *** 121,125 **** --- 123,130 ---- case "$CMDLINE" in *modules-disk*) INTERACTIVE="yes"; ;; esac NOCD="" + case "$CMDLINE" in *dma*) DMA="yes"; ;; esac case "$CMDLINE" in *fromhd*) NOCD="yes"; ;; esac + case "$CMDLINE" in *fromdirectory*) NOCD="yes"; HD_DIRECTORY="Yes"; ;; esac + case "$CMDLINE" in *fromnfs*) NOCD="yes"; NFS_SERVER="Yes"; ;; esac # Does the user want to skip scsi detection? NOSCSI="" *************** *** 136,139 **** --- 141,149 ---- echo "0" > /proc/sys/kernel/printk + # Check for IDE-SCSI capable CD-Rom(s) first + $INSMOD /modules/scsi/ide-scsi.ko >/dev/null 2>&1 + # Use ide-cd for ATAPI-only CD-Rom(s) + $INSMOD /modules/scsi/ide-cd.ko >/dev/null 2>&1 + # Mount module disk mountmodules(){ *************** *** 199,214 **** # load usb-modules first (so that memory-stick becomes /dev/sda1) echo "6" > /proc/sys/kernel/printk ! $INSMOD -f /modules/usb/usbcore.o # uncomment for USB 2.0 support (experimental) if test -n "$USBBOOT2" then ! $INSMOD -f /modules/usb/ehci-hcd.o fi if test -n "$USBBOOT1" then ! $INSMOD -f /modules/usb/uhci-hcd.o ! $INSMOD -f /modules/usb/ohci-hcd.o fi ! $INSMOD -f /modules/usb/usb-storage.o # wait 4 seconds for usb device to be registered sleep 4 --- 209,224 ---- # load usb-modules first (so that memory-stick becomes /dev/sda1) echo "6" > /proc/sys/kernel/printk ! $INSMOD -f /modules/usb/usbcore$KEXT # uncomment for USB 2.0 support (experimental) if test -n "$USBBOOT2" then ! $INSMOD -f /modules/usb/ehci-hcd$KEXT fi if test -n "$USBBOOT1" then ! $INSMOD -f /modules/usb/uhci-hcd$KEXT ! $INSMOD -f /modules/usb/ohci-hcd$KEXT fi ! $INSMOD -f /modules/usb/usb-storage$KEXT # wait 4 seconds for usb device to be registered sleep 4 *************** *** 219,223 **** if test -n "$INTERACTIVE"; then # Let the user select interactively ! askmodules SCSI $(cd /modules/scsi; echo *.o) else # these are the autoprobe-safe modules --- 229,233 ---- if test -n "$INTERACTIVE"; then # Let the user select interactively ! askmodules SCSI $(cd /modules/scsi; echo *$KEXT) else # these are the autoprobe-safe modules *************** *** 236,240 **** case "$answer" in n*|N*) break; ;; esac if mountmodules new; then ! askmodules new $(cd /modules/scsi; echo *.o) test -n "$MODULES" && loadmodules new $MODULES umountmodules current --- 246,250 ---- case "$answer" in n*|N*) break; ;; esac if mountmodules new; then ! askmodules new $(cd /modules/scsi; echo *$KEXT) test -n "$MODULES" && loadmodules new $MODULES umountmodules current *************** *** 250,253 **** --- 260,271 ---- echo "0" > /proc/sys/kernel/printk + + if test -n "$NFS_SERVER" -a -f /nfsrc; then + . /nfsrc + else + if test -n "$NFS_SERVER"; then + echo "couldn't find nfsrc, booting from CDROM" + fi + # Now that the right SCSI driver is (hopefully) loaded, try to find CDROM DEVICES="/dev/hd?" *************** *** 274,290 **** done ! if test -z "$NODMA" ; then ! echo "" ! for d in $(cd /proc/ide 2>/dev/null && echo hd[a-z]); do ! if test -d /proc/ide/$d; then ! MODEL="$(cat /proc/ide/$d/model 2>/dev/null)" ! test -z "$MODEL" && MODEL="[GENERIC IDE DEVICE]" ! echo "${BLUE}Enabling DMA acceleration for: ${MAGENTA}$d ${YELLOW}[${MODEL}]${NORMAL}" ! echo "using_dma:1" >/proc/ide/$d/settings ! fi ! done fi ! # Harddisk-installed script part version has been removed # (MORPHIX can be booted directly from HD now). --- 292,310 ---- done ! # We now enable DMA right here, for faster reading/writing from/to IDE devices ! # in NOCD mode ! if test -n "$DMA" ; then ! echo "" ! for d in $(cd /proc/ide 2>/dev/null && echo hd[a-z]); do ! if test -d /proc/ide/$d; then ! MODEL="$(cat /proc/ide/$d/model 2>/dev/null)" ! test -z "$MODEL" && MODEL="[GENERIC IDE DEVICE]" ! echo "${BLUE}Enabling DMA acceleration for: ${MAGENTA}$d ${YELLOW}[${MODEL}]${NORMAL}" ! echo "using_dma:1" >/proc/ide/$d/settings ! fi ! done fi ! fi # Harddisk-installed script part version has been removed # (MORPHIX can be booted directly from HD now). *************** *** 293,298 **** # DEBUG # echo "6" > /proc/sys/kernel/printk ! $INSMOD -f /modules/cloop.o file=/cdrom/base/morphix ! mountit /dev/cloop /MorphixCD "-o ro" || FOUND_MORPHIX="" fi --- 313,318 ---- # DEBUG # echo "6" > /proc/sys/kernel/printk ! $INSMOD -f /modules/cloop$KEXT file=/cdrom/base/morphix 2> /dev/null ! mountit /dev/cloop /MorphixCD "-o ro" || FOUND_MORPHIX="" 2> /dev/null fi *************** *** 338,342 **** umount /cdrom # unmount CD if test -f /cdrom2/base/morphix; then ! $INSMOD -f /modules/cloop.o file=/cdrom2/base/morphix mountit /dev/cloop /MorphixCD "-o ro" || FOUND_MORPHIX="" # if everything else did suceeded so far, this will hopefully succeed too else --- 358,362 ---- umount /cdrom # unmount CD if test -f /cdrom2/base/morphix; then ! $INSMOD -f /modules/cloop$KEXT file=/cdrom2/base/morphix mountit /dev/cloop /MorphixCD "-o ro" || FOUND_MORPHIX="" # if everything else did suceeded so far, this will hopefully succeed too else *************** *** 362,366 **** export PATH ! # Debian weirdness /bin/cp -a /MorphixCD/etc/alternatives /etc/ 2>/dev/null --- 382,386 ---- export PATH ! # Debian weirdness (is this necessary for Morphix?) /bin/cp -a /MorphixCD/etc/alternatives /etc/ 2>/dev/null *************** *** 375,380 **** fi ! # Clean up / ! rm -rf /modules #/static # New in Kernel 2.4.x: tempfs with variable ramdisk size. --- 395,400 ---- fi ! # Clean up / (saves a meg) ! rm -rf /modules /static & # New in Kernel 2.4.x: tempfs with variable ramdisk size. *************** *** 416,424 **** echo -n "${CRE}${BLUE}Creating directories and symlinks on ramdisk...${NORMAL}" # Create common WRITABLE (empty) dirs ! mkdir -p /var/run /var/backups /var/local /var/lock/news \ ! /var/nis /var/preserve /var/state/misc /var/tmp /var/lib \ ! /var/spool/cups/tmp \ /mnt/cdrom /mnt/floppy /mnt/hd /mnt/test \ ! /home/morph /home/root /etc/sysconfig /etc/X11 chown morph.morph /home/morph # Create empty utmp and wtmp --- 436,448 ---- echo -n "${CRE}${BLUE}Creating directories and symlinks on ramdisk...${NORMAL}" # Create common WRITABLE (empty) dirs ! ! # We only need directories writeable that are used in the base module for ! # hardware detection. Some of these might be removeable ! mkdir -p /var/run /var/backups /var/local \ ! /var/tmp /var/lib /var/state/misc \ /mnt/cdrom /mnt/floppy /mnt/hd /mnt/test \ ! /home/morph /home/root /etc/sysconfig /etc/X11 ! # /var/nis /var/preserve ! # /var/spool/cups/tmp \ chown morph.morph /home/morph # Create empty utmp and wtmp *************** *** 427,440 **** # All files in here should be size zero after Morphix.clean was run cp -a /MorphixCD/var/local /MorphixCD/var/log \ ! /MorphixCD/var/spool /var/ 2>/dev/null ! cp -a /MorphixCD/var/lib/nfs /MorphixCD/var/lib/xkb /MorphixCD/var/lib/isdn \ ! /MorphixCD/var/lib/pcmcia \ ! /var/lib/ 2>/dev/null # Problematic directories in /var/lib (lots and lots of inodes) ! ln -s /MorphixCD/var/lib/dpkg /MorphixCD/var/lib/apt \ ! /MorphixCD/var/lib/scrollkeeper \ ! /var/lib/ 2>/dev/null # Debian-apt ! ln -s /MorphixCD/var/cache/apt /var/cache/ 2>/dev/null ln -s /MorphixCD/etc/skel /etc/dhcpc/resolv.conf \ /etc/ 2>/dev/null --- 451,465 ---- # All files in here should be size zero after Morphix.clean was run cp -a /MorphixCD/var/local /MorphixCD/var/log \ ! /var/ 2>/dev/null ! # /MorphixCD/var/spool ! # cp -a /MorphixCD/var/lib/nfs /MorphixCD/var/lib/xkb /MorphixCD/var/lib/isdn \ ! # /MorphixCD/var/lib/pcmcia /var/lib/ 2>/dev/null # Problematic directories in /var/lib (lots and lots of inodes) ! # ln -s ! #/MorphixCD/var/lib/dpkg /MorphixCD/var/lib/apt \ ! # /MorphixCD/var/lib/scrollkeeper \ ! # ln -s /var/lib/ 2>/dev/null # Debian-apt ! # ln -s /MorphixCD/var/cache/apt /var/cache/ 2>/dev/null ln -s /MorphixCD/etc/skel /etc/dhcpc/resolv.conf \ /etc/ 2>/dev/null *************** *** 474,484 **** else echo "${CRE}${RED}Can't find Morphix filesystem, sorry${NORMAL}" ! echo "${RED}Dropping you to a (very limited) shell${NORMAL}" ! echo "${RED}Make sure you have a Morphix Base image on your CD-ROM" echo "${RED}Press reset button to quit.${NORMAL}" echo "" echo "Additional builtin commands avaliable:" ! echo " cat mount umount" ! echo " insmod rmmod lsmod" echo "" PS1="morphix# " --- 499,508 ---- else echo "${CRE}${RED}Can't find Morphix filesystem, sorry${NORMAL}" ! echo "${RED}Dropping you to a busybox shell${NORMAL}" ! echo "${RED}Make sure you have a Morphix Base image on your CD-ROM/HDD/NETWORK devices" echo "${RED}Press reset button to quit.${NORMAL}" echo "" echo "Additional builtin commands avaliable:" ! echo "busybox --help" echo "" PS1="morphix# " |