#!/bin/bash #set -x #set -e #***************************************************************************** # * # Copyright (c) 1995 by Simon Shapiro * # * # This is an unpublished, proprietary source code. * # * # This file contains trade secrets and intelectual property of Simon Shapiro * # * # Permission is granted to anyone to copy, modify or duplicate or use in * # any way or by any means as long as this use is not for profit, this * # copyright message is left intact and unseparated from this product and * # the Free Software Foundation GNU Software License is observed. * # * # This permission to copy & use is not, in any way a waver of intelectual * # property, copyrights or any legal rights whatsoever. * # * # For permission to make commercial use of this property please contact * # Simon shapiro (Shimon@i-Connect.Net) 503.677.2911 * # * #*****************************************************************************/ #***************************************************************************** # * # Name: make-floppies * # Purpose: Produce Debian Floppies * # Arguments: 5.25 | 3.5 * # dir/where/images/are * # device/where/images/are/written/to * # Caveats: Very simplistic * # Assumes the floppies to be written are in /dev/fd0 * # Assumes the program starts from where the images are * # History: $Log: make-floppies,v $ # History: Revision 1.3 1996/07/22 20:35:00 ShimonR # History: Added special kernels 5,6 in 2.0.7 # History: # History: Revision 1.2 1996/07/13 05:32:04 SourceR # History: Moved our special kernels out of here. # History: # History: Revision 1.1 1996/07/13 03:27:39 ShimonR # History: Initial revision # History: # * #*****************************************************************************/ # $Header: /home/Debian/ftp/debian/buzz/disks-i386/RCS/make-floppies,v 1.3 1996/07/22 20:35:00 ShimonR Exp $: */ echo "iConnect Corp. is not responsible for any damages resulting from using" echo "Software" echo "" echo -e "I completely agree (yes/no) \c" read yes case ${yes:-no} in yes|YES|Yes) echo "Great! Now that our lawyer is happy, lets Debianize" ;; *) echo "Sorry. If you do not agree, we cannot play :-(" exit 1 ;; esac case ${1:-x} in 5.25) echo "You want \"5.25\" disks made. Please have handy 7 blank disks" format=5.25 ;; 3.5) echo "You want \"3.5\" floppies made. Please have handy 6 blank disks" format=3.5 ;; *) echo "I have no clue which disks to make!" echo "Run ${0} as \"${0} 5.25\" or \"${0} 3.5\"" exit 1 ;; esac case ${2:-here} in here) source=`pwd` ;; *) there=${2} source=`(cd ${there};pwd)` ;; esac if [ -d ${source} ] then echo "Images will be taken from ${source}" else echo "Ooops! \"${source}\" is not a directory" exit 1 fi case ${3:-nothing} in nothing) dest=/dev/fd0 ;; *) dest=${3} ;; esac if [ -b ${dest} ] then echo "Images will be put on ${dest}" else echo "Oops! \"${dest}\" is not a proper device" fi echo "We can make a standard kernel, or a special (custom) kernel." echo "Standard kernel is made for i386, no FPU and gazillion devices." echo "It is big, less efficient on most machines, but is the standard." echo "Custom kernels are smaller, optimized for Pentium, run great on 486" echo "and on Pentium-Pro and may have hardware support the standard kernel" echo "does not have. All special kernels support booting from IDE disk." echo "ALL kernels need kerneld and modules 2.0.0 to work properly." echo echo "Kernels come in 6 types:" echo echo " 0 - Almost standard distribution Kernel" echo " 1 - All Adaptec SCSI + AdvanSys + Always + AM5379c974 + BusLogic" echo " 2 - DTC + eata_dma (DPT), eata_pio (OLD DPT) + Future Domain" echo " 3 - NCR5380/53c400 + NCR53c406a + NCR53c7/8xx" echo " 4 - Iomega Parallel + PAS16 + Qlogic + Seagate + Trantor + UltraStor" echo " 5 - Special NCR53c400 only Kernel" echo " 6 - Special NCR53c8xx only Kernel" echo " 7 - This is what we use at iConnect (Pentium, DPT+BusLogic+AHA2940)" echo " 8 - This is a PentiumPro DPT+BusLogic+AHA2940+IProuter" echo " 9 - AHA2940 only" echo echo " S - Standard Debian boot kernel" echo echo -e "Which boot disk to make (0-9,S)? \c" read boot case ${boot:-x} in 0|1|2|3|4|5|6|7|8|9) if [ ${format} != 3.5 ] then echo "Sorry, special kernels are available only in 3.5\" format" exit 2 fi echo "Special kernel, type ${boot} will be made" ;; S|s) boot=S echo "Standard boot kernel will be made" ;; *) echo "Ooops: \"${boot:-blank}\" is not a valid disk type." exit 1 ;; esac echo "The blank disks must be formatted and with a clean label on them." echo -e "Are we ready (y/n)? \c" read yes echo case ${yes:-x} in y|Y) echo "Good. We will start making disks now" ;; *) echo "OK. Fix what needs fixing and try again" exit 0 ;; esac if [ ${format} = 5.25 ] then size=12 set=4 else size=14 set=3 fi for disk in boot root base1 base2 base3 base4 do case ${disk} in boot) label=Boot if [ ${format} = 5.25 ] then image=${source}/current/boot1200.bin else case ${boot} in S) image=${source}/current/boot1440.bin ;; 0|1|2|3|4|5|6|7|8|9) image=${source}/../../LastMinute/SpecialKernels/special_boot-${boot}.bin ;; esac fi ;; root) label=Root image=${source}/current/root.bin ;; base1) label="Base System 1st of ${set}" image=${source}/current/base${size}-1.bin ;; base2) label="Base System 2nd of ${set}" image=${source}/current/base${size}-2.bin ;; base3) label="Base System 3rd of ${set}" image=${source}/current/base${size}-3.bin ;; base4) label="Base System 4th of ${set}" image=${source}/current/base${size}-4.bin ;; esac if [ ${disk} = base4 -a ${format} = 3.5 ] then echo "Skipping base disk 4. no need for it on 3.5\" floppies" else if [ ! -r ${image} ] then echo "Ooops! Image \"${image}\" is not readable" exit 1 fi echo "Put a blank floppy, labeled \"${label}\" in the drive ${dest}" echo -e "Press ENTER when ready \c" read yes echo "Transferring image \"${image}\" to \"${dest}\"" set -e dd if=${image} of=${dest} bs=18k set +e fi done