home *** CD-ROM | disk | FTP | other *** search
- @echo off
- if "%config%"=="2" goto BOOT_CHK
- echo attempting to load the UDMA driver (386+). It's an experimental driver.
- echo To bypass loading this driver, select option 2 from bootdisk.
- if exist a:\driver\udma.sys a:\driver\devload a:\driver\udma.sys
- goto BOOT_CHK
-
- :BOOT_CHK
- set disksrc=A:
- set bootsrc=realdisk
- set cputype=80186
- ifmemdsk.com
- if "%errorlevel%"=="255" set cputype=80286
- for %%x in ( 254 255 ) do if "%errorlevel%"=="%%x" goto errormsg
- rem No cdrom supported on 8086/80186/80286 platforms, so don't even try..
- set cputype=80386
- getargs > temp.bat
- if exist temp.bat call temp.bat
- if exist temp.bat del temp.bat
- if not "%BOOT_IMAGE%"=="" set bootsrc=fakedisk
- goto load_ELT
-
- :load_ELT
- if exist a:\driver\eltorito.sys a:\driver\devload /H a:\driver\eltorito.sys /D:FDCD0001
- if not exist FDCD0001 goto load_IDE
- if "%bootsrc%"=="fakedisk" set bootsrc=cdrom
- goto aspi_chk
-
- :load_IDE
- if "%bootsrc%"=="fakedisk" set disksrc=B:
- set cdname=FDCD0001
- if exist FDCD0001 set cdname=FDCD0002
- set ide-list=
- for %%x in ( %disksrc%\driver\vide-cdd.sys a:\driver\vide-cdd.sys a:\driver\atapicdd.sys ) do if exist %%x set ide-list=%ide-list% %%x
- for %%x in ( %ide-list% ) do if not exist %cdname% a:\driver\devload /H %%x /D:%cdname%
- set ide-list=
- goto aspi_chk
-
- :aspi_chk
- if "%config%"=="4" goto SCSI_HBA
- for %%x in ( ASPIMGR$ SCSIMGR$ ) do if exist %%x goto SCSI_CDR
- goto loadcach
-
- :SCSI_HBA
- echo You selected loading custom driver(s). (from drive %disksrc%?)
- echo Enter complete filename and load parameters
- set /p filename=(or hit ENTER to skip)
- if "%filename%"=="" goto SCSI_CDR
- rem wish we could get 1st parameter here, and check if it exists.
- rem FOR loop risks other parameters to also exist...
- echo Attempting to load custom driver.
- a:\driver\devload %filename%
- set filename=
- goto SCSI_HBA
-
- :SCSI_CDR
- rem Here goes the SCSI CDROM driver (until ATAPICDD supports it)
- echo You selected loading custom driver(s). (from drive %disksrc%)
- echo Enter complete filename for cdrom-driver
- set /p filename=(or hit ENTER to skip)
- if "%filename%"=="" goto loadcdex
- if exist FDCD0001 set cdname=FDCD002
- if exist FDCD0002 set cdname=FDCD003
- if exist FDCD0003 set cdname=FDCD004
- if exist FDCD0004 set cdname=FDCD005
- if exist FDCD0005 set cdname=FDCD006
- if exist FDCD0006 goto loadcach
- if exist %filename% A:\DRIVER\DEVLOAD /H %filename% /D:%cdname%
- if not exist %filename% echo Invalid, missing or corrupt driver file
- goto SCSI_CDR
-
- :loadcach
- for %%x in ( 1 2 3 4 5 6 ) do set cdname%%x=FDCD000%%x
- if "%config%"=="2" goto loadcdex
- for %%x in ( 1 2 3 4 5 6 ) do if exist %cdname%%x% A:\DRIVER\DEVLOAD /H A:\DRIVER\CDRCACHE.SYS %cdname%%x% CDRCACH%%x %buffsize%
- for %%x in ( 1 2 3 4 5 6 ) do if exist CDRCACH%%x set cdname%%x=CDRCACH%%x
- set buffsize=
- goto loadcdex
-
- :loadcdex
- a:\driver\shsucdx.exe /D:?%cdname1%,X /D:?%cdname2%,W /D:?%cdname3%,V /D:?%cdname4%,U /D:?%cdname5%,T /D:?%cdname6%,S
- for %%x in ( 1 2 3 4 5 6 ) do set CDname%%x=
- for %%x in ( 1 2 3 4 5 6 ) do if exist FDCD000%%x goto findcd
- set cdrom=false
- goto errormsg
-
- :findcd
- set loadbat=
- rem CD Detection: random file in root, autorun.bat in directories isolinux and freedos
- for %%x in ( S T U V W X ) do if exist %%x:\*.* set loadbat=%%x:\
- for %%x in ( S T U V W X ) do if exist %%x:\ISOLINUX\AUTORUN.BAT set loadbat=%%x:\ISOLINUX\
- for %%x in ( S T U V W X ) do if exist %%x:\FREEDOS\SETUP\BATCH\AUTORUN.BAT set loadbat=%%x:\FREEDOS\SETUP\BATCH\
- if "%loadbat%"=="" goto errormsg
- CDD %loadbat%
- CD \
- set cdrom=%_CWD%
- goto loadmenu
-
- :loadmenu
- if not exist %loadbat%autorun.bat goto errormsg
- call %loadbat%autorun.bat
- GOTO end
-
- :errormsg
- cls
- if "%cdrom%"=="" set cdrom=fake
- if "%loadbat%"=="" set loadbat=fake
- echo The installation bootdisk encountered an error in performing a cd-rom install
- echo possible error(s):
- if exist %cdrom%*.* echo * Cd-rom disk inserted, but not FreeDOS cd-rom (but driver was loaded)
- if "%loadbat%"=="" echo * No (FreeDOS) cd-rom inserted (or no files found in root of cdrom)
- if "%cdrom%"=="false" set loadbat=
- if "%cdrom%"=="false" echo * failed to load cd-rom driver
- if "%cputype%"=="80286" echo * a 386 processor (or newer) is required for cd-rom install
- echo.
- echo What do you want to do about this (type number and press ENTER to confirm):
- echo.
- echo 1) I've inserted the FreeDOS cd-rom and want to redetect it.
- echo 2) I have FreeDOS diskettes, and want to install from these media.
- echo 3) I give up. please drop me to the commandline.
- set /p option= Your choice? [1,2,3]:
- if "%option%"=="1" goto findcd
- if "%option%"=="2" goto loaddsk1
- if "%option%"=="3" goto end
-
- :loaddsk1
- echo Determining if you have a drive C: available to install FreeDOS to . . .
- whichfat C:
- if "%errorlevel%"=="1" Fdisk /MONO
- rem disk was unpartitioned
- disk2.bat
-
- errorlevels:
-
- 1=no C: partition
- 12=FAT12 or unformatted
- 16=FAT16
- 32=FAT32
-
- *** Fdisk:
- 6=no harddisk detected.
- :END