Jump to content

Modifying Windows Cd Boot Image


HardDriv'n

Recommended Posts

Hi.

I've attempted to modify some files from a boot image I've extracted from my Windows install disc.

Everything runs as to be expected, except for the 'setup from cd' option.

Here are the setup files. Could someone tell me what I did wrong?

AUTOEXEC.BAT

@ECHO OFF
set EXPAND=YES
SET DIRCMD=/O:N
set LglDrv=27 * 26 Z 25 Y 24 X 23 W 22 V 21 U 20 T 19 S 18 R 17 Q 16 P 15
set LglDrv=%LglDrv% O 14 N 13 M 12 L 11 K 10 J 9 I 8 H 7 G 6 F 5 E 4 D 3 C
cls
call setramd.bat %LglDrv%
set temp=c:\
set tmp=c:\
path=%RAMD%:\;a:\;%CDROM%:\
copy command.com %RAMD%:\ > NUL
set comspec=%RAMD%:\command.com
copy extract.exe %RAMD%:\ > NUL
copy readme.txt %RAMD%:\ > NUL

:ERROR
IF EXIST ebd.cab GOTO EXT
echo Please insert Windows 98 Startup Disk 2
echo.
pause
GOTO ERROR

:EXT
%RAMD%:\extract /y /e /l %RAMD%: ebd.cab > NUL
echo The diagnostic tools were successfully loaded to drive %RAMD%.
echo.

IF "%config%"=="SETUP_CD" goto AUTOSETUP
IF "%config%"=="HELP" GOTO HELP
IF "%config%"=="NOCD" GOTO QUIT
LH %ramd%:\MSCDEX.EXE /D:mscd001 /L:%CDROM%
echo.
GOTO QUIT

:HELP
cls
call help.bat
echo Your computer will now restart and the startup menu will appear.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
restart.com
GOTO QUIT

:AUTOSETUP
set CDROM=FOO23
FINDCD.EXE
if "%CDROM%"=="FOO23" goto NOCDROM
path=a:\;%CDROM%\
%CDROM%
cd \WIN98
echo.
OEMSETUP.EXE /K "/IE /NF"
goto QUIT

:NOCDROM
echo.
echo The Windows 98 Setup files were not found.
echo.
goto QUIT

:QUIT
echo To get help, type HELP and press ENTER.
echo.
rem clean up environment variables
set CDROM=
set LglDrv=

SETRAMD.BAT

@echo off
set RAMD=
set CDROM=

echo.
echo Preparing to start your computer.
echo This may take a few minutes. Please wait...
echo.

a:\findramd

if errorlevel 255 goto no_ramdrive

if not errorlevel 3 goto no_ramdrive

goto do_shift

:loop
if errorlevel %1 goto no_shift

:do_shift
set cdrom=%2
shift
shift
if not %1*==* goto loop
goto no_ramdrive

:no_shift
set ramd=%2

if "%RAMD%"=="C" goto c_drive

goto success

:c_drive
echo Windows 98 has detected that drive C does not contain a valid FAT or
echo FAT32 partition. There are several possible causes.
echo.
echo 1. The drive may need to be partitioned. To create a partition on the drive,
echo run FDISK from the MS-DOS command prompt.
echo.
echo 2. You may be using third-party disk-partitioning software. If you are using
echo this type of software, remove the Emergency Boot Disk and restart your
echo computer. Then, follow the on-screen instructions to start your computer from
echo a floppy disk.
echo .
echo 3. Some viruses also cause your drive C to not register. You can use a virus
echo scanning program to check your computer for viruses.
echo.
goto success

:no_ramdrive
echo The Windows 98 startup disk could not create a temporary drive for the
echo diagnostic tools. This may be because this computer has less than the
echo minimum required extended memory.
echo.
:success

CONFIG.SYS

[menu]
menuitem=SETUP_CD, Start Windows 98 Setup from CD-ROM. (Auto)
menuitem=CD, Start PC with CD-ROM support. (Manual)
menuitem=USB, Start PC with CD-ROM and USB support.
menuitem=NOCD, Start PC without CD-ROM or USB support.
menuitem=HELP, View the Help file.
menudefault=CD,30
menucolor=7,0

[SETUP_CD]
device=himem.sys /testmem:off
device=oakcdrom.sys /D:oemcd001
device=btdosm.sys
device=flashpt.sys
device=btcdrom.sys /D:oemcd001
device=aspi2dos.sys
device=aspi8dos.sys
device=aspi4dos.sys
device=aspi8u2.sys
device=aspicd.sys /D:oemcd001

[CD]
device=himem.sys /testmem:off
device=oakcdrom.sys /D:mscd001
device=btdosm.sys
device=flashpt.sys
device=btcdrom.sys /D:mscd001
device=aspi2dos.sys
device=aspi8dos.sys
device=aspi4dos.sys
device=aspi8u2.sys
device=aspicd.sys /D:mscd001
devicehigh=ramdrive.sys /E 2048

[USB]
device=himem.sys /testmem:off
device=oakcdrom.sys /D:mscd001
device=btdosm.sys
device=flashpt.sys
device=btcdrom.sys /D:mscd001
device=aspi2dos.sys
device=aspi8dos.sys
device=aspi4dos.sys
device=aspi8u2.sys
device=aspicd.sys /D:mscd001
device=USBASPI.SYS /W /R
device=DI1000DD.SYS
devicehigh=ramdrive.sys /E 2048

[NOCD]
device=himem.sys /testmem:off
devicehigh=ramdrive.sys /E 2048

[HELP]
device=himem.sys /testmem:off

[COMMON]
files=10
buffers=10
dos=high,umb
stacks=9,256
lastdrive=z

My main attempts here were to add a ram-drive option, and also include USB drivers support.

-EDIT-

All of this code is a 'copy & paste' hack from multiple sources, so I actually don't understand some of it.

I just want an easy way to reinstall quickly, with everything in one place in case I have to restart...... again.

Also, not having a floppy drive on my other PCs is a motivator to include the floppy tools ram-drive, so I can run everything from the cd.

Edited by HardDriv'n
Link to comment
Share on other sites


Nevermind. I figured something out.

1. Extracted the boot image from my orginal Windows 98 SE install disc, using the final 'ISObuster' freeware edition.

2. Used the trial version of 'WinImage' to resize the 1440kb floppy image to a 2880kb floppy image.

3. Used 'WinImage' to add the files extracted from 'EBD.CAB' into the floppy image, and then deleted the cab.

4. I used the command line tool 'MKBT' to extract a bootsector from my Windows 98 emergency boot floppy.

5. I used the same 'MKBT' to add that bootsector into the resized floppy image.

6. Rebuilt the untouched Windows disc structure with the freeware 'IMGBurn', after selecting the floppy boot image in emulation settings. (Added UDF support while at it)

Done.

Edited by HardDriv'n
Link to comment
Share on other sites

  • 2 weeks later...

"a ram-drive option, and also include USB drivers support."

Windows 98 SE come with USB drivers support!

we need to know the make of your Computer so we can tell you how to get to your Setup Utility on your Computer BIOS!

for you need to go to Computer Setup Utility

And Enable the USB controller

And windows 98SE will see the usb ram-drive afterwords!

Remainder Windows 98FE don't come with USB drivers support!

Edited by hottext
Link to comment
Share on other sites

  • 1 month later...

A wee bit late for posting, but...

@HardDriv'n - It's possible (provided you understand the BAT files) to combine the EBD method with the CD Boot method for RamDrive. Search MSFN for more alternatives to Ramdrive.sys as well (better freeware methods). One place to look is the "more than 1gb memory"(?) thread. Also, the EBD.CAB can be "re-cabbed" with only the programs you actually want and then extracted to the created RamDrive thus saving space in the IMG file.

@hottext - re-read the first post. The Boot is Pure DOS-mode and not Win32-98SE, so DOS-mode USB drivers are necessary (as has already been incorporated). :;

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...