*BSD News Article 71796


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!usenet
From: phillip@mirriwinni.cse.rmit.edu.au (Phillip Musumeci)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: HELP! IDE CD-ROM not recognized!
Date: 23 Jun 1996 21:07:48 +1000
Organization: Computer Systems Engineering Department, RMIT Australia
Lines: 358
Sender: phillip@mirriwinni.cse.rmit.edu.au
Message-ID: <87d92qvkvv.fsf@mirriwinni.cse.rmit.edu.au>
References: <4pv7nq$14c_004@mypc.neosoft.com> <4q2o29$nlj@news1.halcyon.com>
	<4q2qag$18k_006@mypc.neosoft.com> <avg.835263620@news.cwi.nl>
Reply-To: phillip@rmit.edu.au
NNTP-Posting-Host: pm.cse.rmit.edu.au
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
In-reply-to: avg@cwi.nl's message of Thu, 20 Jun 1996 09:40:20 GMT
X-Newsreader: Gnus v5.1

>>>>> "Annius" == Annius Groenink <avg@cwi.nl> writes:

    Annius> conrads@neosoft.com (Conrad Sabatier) writes:
    >>>> PCI EIDE interface (2 ports).  The CD is configured as a master on
    >>>> the 2nd IDE interface.  I have no docs on how to change it to
    >>>> slave, so that FreeBSD will recognize it.
    Annius> Sounds exactly like my configuration---and I have the same
    Annius> problems.
    >>> If you can get a minimal system installed, perhaps via a DOS
    >>> partition, it's only a one line change, if I recall correctly, to
    >>> configure a kernel to support your configuration.
    >> Yep, that's exactly what I did.  Copied a minimal install set
[[material cut here]]
    Annius> Hm.  And I thought Linux was a pain to install.  Is there
    Annius> really no way to do this without compiling a complete new
    Annius> kernel first?

    Annius> Why is there no standard boot disk image for such a typical
    Annius> setup?  The majority of IDE CDROM users will, I think, have a
    Annius> HD and CDROM on two different ports, both master.

As mentioned above, one way to install FreeBSD from CD ia via a copy of the
necessary distribution on disk.  This avoids you having to know anything
about your CD drive (so long as it works with DOS) in the install process.

File ftp://pm.cse.rmit.edu.au/210m/fbsdmove.bat (enclosed) is a DOS batch
file to copy about 35M of the distribution from a CD drive onto a DOS file
system (which I assume has 35M of space) so that you can do an install from
a DOS file system to your new BSD file system.  If DOS sees your CD drive
as D: and the DOS disk file system you want to use is C:, then you would
insert your FreeBSD-2.1.0R CD and enter command

FBSDMOVE D: C:

and wait while XCOPY does some serious file copying.  As prompted, you can
then CD into the boot area C:\DISTS\PM and, if no weird memory managers are
installed, just enter command INSTALL to boot and go.

The reason for writing this script was that I had some students wanting to
install FreeBSD from all sorts of CD drives and it seemd that the easiest
thing to do was automate their installation from a DOS file system so that
they could at least recompile the FreeBSD kernel and sort out their CD
access later.  This also maximised my chance of not learning about all of
their different CD drives...

The file fbsdmove.bat on the anonymous ftp area is a DOS text file (just
the way MS likes them).  

Hope this helps, Phillip.

p.s. Also enclosed is a copy of shell script dpa which can be used to
install packages off a DOS file system (the current pkg_add doesn't like to
install packages that have truncated file names, as would occur if you
stashed some packages onto a DOS file system enroute to getting them into
your FreeBSD system).


---------------------------------------------------------------------------

rem FBSDMOVE.BAT
rem
rem Use   FBSDMOVE src: dest:
rem
rem where
rem       src:  is the CD containing directories \DISTS and \PACKAGES
rem       dest: is the disk to which these directories' contents are copied
rem
rem phillip@rmit.edu.au  1v0 6/2/1996, 1v1 12/2/1996, 1v2 14/2/1996,
rem                      1v3 5/3/1996.

rem STILL TO DO
rem   1) make sure that the xcopy utility is available

rem A FreeBSD installation accessing  the distribution from an existing DOS
rem file system on a hard disk requires no detailed knowledge of the target
rem PC hardware.  This purpose of  this script is  to copy a minimum set of
rem the  FreeBSD distribution from  a CD  mounted  under DOS to a  DOS file
rem system  on a hard disk  so that a  user can do  a complete installation
rem using only disk.  Approximately 35M of disk space is  needed on the DOS
rem disk.
rem
rem
rem The distribution files  copied  are sufficient for   a "Kern-Developer"
rem installation i.e.  we  copy:  the system binaries;  full  documentation
rem (man pages and the  HTML material); the  sources for ONLY the operating
rem system (so  that  you can build  a kernel  for your particular hardware
rem later), plus a few basic packages that you might  want (e.g.  a tcsh or
rem bash shell like your unix account probably has, the micro-emacs editor,
rem and the mtools package for easy access to DOS floppies from FreeBSD).
rem
rem
rem Note that if you  can boot your DOS  system without any memory managers
rem or  TSRs present, then  you will be able  to  boot up  the FreeBSD unix
rem operating system directly from your DOS disk.  One way to boot up a DOS
rem system without any add-ons present is to hold down the SHIFT key during
rem the DOS  boot stage so that  the autoexec.bat and  config.sys files are
rem ignored.  Another   way might  be  to boot   using  a floppy  disk that
rem contains the basic  system and a COMMAND.COM file  (you can make such a
rem floppy by formating a floppy and using the SYS command).
rem

rem This  batch file assumes that  your CD is mounted  as  E: and that your
rem target disk is D: (this is the case if you  are installing FreeBSD onto
rem a second hard disk  with a small DOS file   system and your  first hard
rem disk is seen by DOS as C:).  %1 and %2 can override these defaults.
rem
set SRC=%1
if "x%SRC%"=="x"  set SRC=E:
set DEST=%2
if "x%DEST%"=="x" set DEST=D:
@echo Source is %SRC%
@echo Destination is %DEST%

rem
rem
rem

@echo **********************************************
@echo Creating destination directory %DEST%\DISTS
mkdir %DEST%\dists

@echo **********************************************
@echo (1/8) Copying BIN distribution
@echo       into %DEST%\DISTS\BIN
mkdir %DEST%\dists\bin
xcopy %SRC%\dists\bin\*.* %DEST%\dists\bin /e

@echo **********************************************
@echo (2/8) Copying MANPAGES distribution
@echo       into %DEST%\DISTS\MANPAGES
mkdir %DEST%\dists\manpages
xcopy %SRC%\dists\manpages\*.* %DEST%\dists\manpages /e

@echo **********************************************
@echo (3/8) Copying PROFLIBS distribution
@echo       into %DEST%\DISTS\PROFLIBS
mkdir %DEST%\dists\proflibs
xcopy %SRC%\dists\proflibs\*.* %DEST%\dists\proflibs /e

@echo **********************************************
@echo (4/8) Copying DICT distribution
@echo       into %DEST%\DISTS\DICT
mkdir %DEST%\dists\dict
xcopy %SRC%\dists\dict\*.* %DEST%\dists\dict /e

@echo **********************************************
@echo (5/8) Copying INFO (HTML) distribution
@echo       into %DEST%\DISTS\INFO
mkdir %DEST%\dists\info
xcopy %SRC%\dists\info\*.* %DEST%\dists\info /e

@echo **********************************************
@echo (6/8) Copying floppy images
@echo       into %DEST%\DISTS\FLOPPIES
mkdir %DEST%\dists\floppies
copy %SRC%\floppies\boot.flp %DEST%\dists\floppies
copy %SRC%\floppies\root.flp %DEST%\dists\floppies
rem Copy only what we really need here..............
rem copy %SRC%\floppies\atapi.flp %DEST%\dists\floppies
rem copy %SRC%\floppies\fixit.flp %DEST%\dists\floppies

@echo **********************************************
@echo (7/8) Copying KERNEL and documentation files
@echo       into %DEST%\DISTS\PM
mkdir %DEST%\dists\pm
copy %SRC%\kernel. %DEST%\dists\pm\kernel. /v
rem copy %SRC%\kernel. %DEST%\dists\pm\kernel. /v
copy %SRC%\fbsdboot.exe %DEST%\dists\pm /v
copy %SRC%\*.bat %DEST%\dists\pm /v
copy %SRC%\*.txt %DEST%\dists\pm
copy %SRC%\00*.* %DEST%\dists\pm

@echo **********************************************
@echo (8/8) Copying SRC distribution (kernel only)
@echo       into %DEST%\DISTS\SRC
mkdir %DEST%\dists\src
copy %SRC%\dists\src\ssys.* %DEST%\dists\src
copy %SRC%\dists\src\install.sh %DEST%\dists\src
copy %SRC%\dists\src\00*.* %DEST%\dists\src

echo **********************************************
@echo Almost finished.
@echo (9/8 :-) Copying a few useful packages...
@echo          into %DEST%\PACKAGES\ALL
@echo If you Mount your DOS file system as /dos in
@echo the installation, these files will appear in
@echo directory     /dos/packages/all
@echo and you can enter the unix command
@echo               sh /dos/packages/dpa
@echo to install the packages later.
mkdir %DEST%\packages
copy  %SRC%\packages\INDEX        %DEST%\packages
copy  %SRC%\packages\INDEX.TXT    %DEST%\packages
copy  %SRC%\packages\README       %DEST%\packages
mkdir %DEST%\packages\all
copy  %SRC%\packages\all\bash*.*  %DEST%\packages\all
copy  %SRC%\packages\all\tcsh*.*  %DEST%\packages\all
copy  %SRC%\packages\all\uemac*.* %DEST%\packages\all
copy  %SRC%\packages\all\mtool*.* %DEST%\packages\all
copy  %SRC%\packages\all\zip*.*   %DEST%\packages\all
copy  %SRC%\packages\all\unzip*.* %DEST%\packages\all
copy  %SRC%\packages\all\lynx*.*  %DEST%\packages\all
rem
rem Copy and rename the name translation table across
COPY  %SRC%\PACKAGES\ALL\00_TRANS.TBL %DEST%\PACKAGES\00ALL.TBL
rem
rem Copy a script to install these packages
COPY  C:dpa %DEST%\PACKAGES

@echo **********************************************
@echo Restart DOS with no memory managers present by
@echo holding the SHIFT key down during boot up,  CD
@echo to the target drive:\DISTS\PM, and enter
@echo     install
@echo to start the installation.  If the system will
@echo not boot, you will have to use a boot floppy.
@echo **********************************************



---------------------------------------------------------------------------



#! /bin/sh
#
# Script dpa
#	URL = ftp://pm.cse.rmit.edu.au/ftp/pub/FreeBSD/misc/dpa
#
# The current pkg_add command cannot process packages in files that have
# incorrect names e.g. packages that are being read off a DOS file system
# where a shortened name is required.  Shell script dpa (Dos Package Add)
# figures out the real name of a package so it can be temporarily copied
# across to $DEST (with its original name) and have pkg_add run on it.
#
# The user is prompted to have all packages available in the source
# directory installed.
#
# Parameter 1 is taken as the directory holding the 8+3 named packages,
# otherwise we look for a directory named /dos/packages or /dosc/packages
# or /dosd/packages,
# otherwise we ask where the hell these packages are supposed to be.
#
# Note: if you had chosen to mount a dos partition as /dos during the
#       installation, and used the DOS batch file fbsdmove.bat to copy some
#       initial packages into area \PACKAGES on the DOS disk, then this
#       script will figure out where your packages are hiding.
#
# Use:		dpa		(assumes packages in /dos/packages etc.)
#		dpa SRCDIR
#
# phillip@rmit.edu.au  1v0 15-feb-1996


DEST=/root

# if a /home is present, we store temporary package copies there
# (we assume that a large file system is available at /home)
if [ -d /home ] ; then

  if [ ! -d /home/tmp ] ; then
    mkdir /home/tmp
  fi
  export PKG_TMPDIR=/home/tmp		# pkg_add needs lots of space sometimes
  DEST=$PKG_TMPDIR

fi

###########################################################################

# take parameter 1 as the source directory containing the packages

if [ "x$1" != x ] ; then
  SRC=$1

# otherwise, attempt to guess where the DOS file system is that contains
# the FreeBSD packages

else
  SRC=
  echo
  if [ x$SRC = x -a -d /dos/packages/all ] ; then
    SRC=/dos/packages/all
  fi
  if [ x$SRC = x -a -d /dosc/packages/all ] ; then
    SRC=/dosc/packages/all
  fi
  if [ x$SRC = x -a -d /dosd/packages/all ] ; then
    SRC=/dosd/packages/all
  fi

# otherwise we just ask where the FreeBSD packages are
  
  if [ "x$SRC" = x ] ; then
    echo "Please enter the directory where the packages are kept"
    read x
    if [ -d $x ] ; then
      SRC=$x
    else
      echo That does not seem to be a directory...
      exit
    fi
  fi

fi
echo "Using packages in $SRC"

###########################################################################

# Procedure:
#
# a) examine each file to see if it is a gzip compressed file
# b) if it is, we assume it is a .tgz package file and extract the +CONTENTS
#    file in which a line commencing with the string "@name" is used to give
#    us the original package's name
# c) the user is then prompted to see if this package should be copied and
#    installed.

cd $SRC
for x in * ; do
  if [ -n "`file $x | grep gzip`" ] ; then    # non-empty string --> GZIP data
    echo
    y=`tar xzOf $x +CONTENTS | grep @name | cut -d' ' -f2`.tgz	# get real name
    echo "File $x is really $y; install (n/y)? "
    read a
    case $a in

      y*|Y*)						# we install
        cp $x $DEST/$y					# copy to eal name
        echo "Executing: pkg_add $DEST/$y"
        pkg_add $DEST/$y				# and install
        /bin/rm $DEST/$y				# then delete tmp copy
        ;;

      q*|Q*) exit 0 ;;					# quit

      *) echo "Ignoring: $y" ;;

    esac
  fi
done

###########################################################################


-- 
---------------------------------------------------------------------------
Dr Phillip Musumeci       __  /\  Postal Address:
Telephone:               /  \/  \     Dept. of Computer Systems Engineering 
 ++61 3 96605317(w1)    /        \    RMIT, GPO Box 2476V
 ++61 3 96605383(w2)   /         /    Melbourne 3001
 ++61 3 96605340(fax)  \   __   /     AUSTRALIA
RMIT Building 87.2.15,  `-'  \*/    WWW: http://pm.cse.rmit.edu.au/~phillip
410 Elizabeth Street.         .   EMAIL: phillip@rmit.edu.au
---------------------------------------------------------------------------
National Australian gun control laws were agreed to on May 10, 1996.
      Score update:              Loud minority of 50,000 "shooters" ..... 0
                             Less vocal other 18,000,000 Australians .... 1