Booting Windows From CD-ROM
The reason Windows cannot boot from CD-ROM is that at startup Windows reports that it cannot access the registry. This article will explain how to eliminate these errors and optimize CD booting.
To make a bootable Windows CD, you need at least 500 MB of disk space, some freeware, and some knowledge of DOS commands.
The method introduced here can only be used for systems from Windows 95b and later, and Windows 98. It cannot be used for boot CDs of NT or 2000.
Actually, the whole problem is handling Windows's write access to the disk. Consider two points: first, a system whose registry is located on the CD can boot and run normally. Second, place the registry on a RAM disk. A RAM disk is a part of main memory emulated as a hard disk. The trick here is that you only need to copy the registry files to the RAM disk, so this RAM disk only needs about 4 MB of memory. All files that do not need write access at startup remain on the CD. With this method, the registry can still be written even when there is no hard disk.
Before starting to install Windows, you need to make a boot disk and copy the Win98 installation directory to the hard disk, which will speed up the installation process.
Then you need to create some directories:
c:\w will be used for the CD boot image
c:\cdrom will serve as the CD directory
c:\cdrom\ramdisk is for files that will be copied to the RAM disk when booting from CD
c:\cdrom\ramdisk\w will serve as the Windows directory on the RAM disk
c:\backup copy msdos.sys, io.sys, config.sys, autoexec.bat into it as a backup of the current system
Copy the following files into c:\w
dblbuff.sys, himen.sys, ifshlp.sys, setver.exe (located in the windows directory)
attrib.exe, keyb.com, keyboard.sys, mscdex.exe, subst.exe, xcopy.exe, xcopy32.exe, xcopy32.mod
(located in the windows\command directory)
A DOS CD-ROM driver, and a RAM disk driver (ramdrive.sys is unsuitable because you cannot assign a drive letter to it; you can use xmsdsk.exe, which can be downloaded free from . If you use a different driver, you need to modify the settings in autoexec.bat)
Before reinstalling windows, you must delete c:\config.sys and c:\autoexec.bat, and create a new autoexec.bat with the following:
c:\w\subst.exe x: c:\cdrom
path c:\;c:\w
Because the system is going to run from CD-ROM, and the CD-ROM can only be assigned an unused drive letter, the system must be installed on a later drive letter. This is important to make the registry independent of drive letters. So use the subst command to map the directory where you install windows to a virtual drive letter; the first line in autoexec.bat maps c:\cdrom to drive x:.
To prevent the existing system from being overwritten, you need to rename all win.com and system.ini files on the hard disk, and also system.dat. Because when windows starts, if it cannot find these files in the system directory, it will automatically search all partitions for system.dat, which may affect other systems.
Now begin installing windows. Run setup.exe, and it will report that subst.exe has already been loaded. Ignore this message, press esc to refuse the program's suggestion and continue the installation. Use x:\w as the installation path. The first restart during installation must boot from the floppy disk made earlier; ignore the prompt telling you to remove the floppy. After booting from the floppy, edit c:\config.sys and add the following, where ifshlp.sys is used to support the VFAT file system:
devicehigh=c:\w\himem.sys
devicehigh=c:\w\ifshlp.sys
devicehigh=c:\w\dblbuff.sys
devicehigh=c:\w\setver.exe
Also edit c:\autoexec.bat and add the following:
c:\w\subst.exe x: c:\cdrom
path c:\w;x:\w;x:\w\command;x:\w\system
Remove the floppy, press ctrl-alt-del to reboot, and complete the installation. At this point, you can install some necessary drivers and applications on this system, which will eventually all go onto the CD, such as sound card and video card drivers. To make the later setup easier, you need to install the TweadUI tool. In windows98 you can find it in the \tools\reskit\powertoy directory; the windows95 version can be downloaded free from .
Now prepare a RAM disk for the registry. Still using the subst command, add the following line to c:\autoexec.bat:
c:\w\subst.exe w: c:\cdrom\ramdisk
windows will look in \msdos.sys on the boot partition for the location of the registry files, so you need to modify it. This file has the system attribute; use the command attrib msdos.sys -s -h -r to remove its system, hidden, and read-only attributes. Then its first four lines can be changed to the following:
WinDir=w:\w
WinBootDir=w:\w
HostWinBootDrv=w
When editing msdos.sys, you need to add the following line:
DisableLog=1
Note that if it already contains a line DisableLog=0, then just change the 0 to 1.
As mentioned above, to prevent the system from reading system.dat on the hard disk when booting from CD-ROM, the registry file must be renamed. Its name is contained in c:\io.sys; use a hex editor to modify it, search for all system.dat strings, and change them to system.tat. This change will ensure that only system.tat is regarded as the system registry file, while system.dat will be ignored.
On windows95 systems this modification is recommended, but on windows98 more issues must be considered: the registry filename is not only specified in io.sys, some applications run at startup will also automatically detect this registry file. If you make this change, you may face registry error messages on every startup. Also, scanregw.exe must be disabled at startup, and you can use msconfig.exe to disable it.
To make the next reboot safer, copy the start menu from c:\cdrom\w to c:\cdrom\ramdisk\w
Then shut down windows to command-line mode, and copy system.dat, system.ini, user.dat, win.ini from c:\cdrom\w to c:\cdrom\ramdisk\w. If you modified io.sys as described above, you need to rename system.dat to system.tat at this point.
When windows is restarted again, it will use the registry on drive w:. However, at startup the system not only needs write access to the registry files, it also needs write access to the system directory. Therefore after booting the system from CD-ROM, the system directory must be changed to the RAM disk path. This location is indicated in the registry by the following key; use regedit.exe to change this key to 'w:\w':
HKLM\Software\Microsoft\Windows\CurrentVersion
At present the start menu resides on the RAM disk (simulated by the subst command), but it takes up unnecessary space, so you need to move it back to the CD: launch TweakUI from the system controls directory, select 'General' and adjust the 'Special Folders' entry, changing 'Programs', 'Start Menu', and 'Startup' to 'x:\w\startmenu' and their respective subdirectories. In windows98 you also need to adjust the 'Desktop' directory entry to 'x:\w\Desktop'. After rebooting, the w:\w\Start Menu directory and w:\w\Desktop directory can be deleted.
Next, configure a real RAM disk. Reboot to DOS again, and use attrib c:\cdrom\ramdisk\*.* -s -h -r /s to remove the system, hidden, and read-only attributes from all files under c:\cdrom\ramdisk. Edit c:\autoexec.bat and delete the following line:
subst w: c:\cdrom\ramdisk
and add the following lines:
c:\w\xmsdsk 4000 w: /y
copy c:\command.com w:\
set COMSPEC=w:\command.com
c:\w\xcopy c:\cdrom\ramdisk\*.* w:\ /s
During boot, these settings allocate 4000K of memory as a RAM disk, replacing the RAM disk previously virtualized by the subst command. The copy command copies the command interpreter and the registry files in the system directory to the RAM disk, and the COMSPEC parameter specifies the location of the command interpreter.
If everything runs normally after rebooting, you can now delete all files under c:\cdrom\ramdisk\w except system.ini, user.dat, win.ini, control.ini, system.dat (or system.tat, if you modified io.sys).
Burning:
To burn a bootable CD, you need either a boot disk or a boot disk image file, depending on the burning software you use.
So, you need to make a normal boot disk using format a:/s or sys a:, copy the previously modified io.sys, msdos.sys, config.sys, autoexec.bat from c:\ to that boot disk, overwriting the original files, and copy the entire c:\w directory to the floppy.
Now you must modify a:\config.sys to include the correct paths. The modified result is as follows:
devicehigh=a:\w\himem.sys
devicehigh=a:\w\ifshlp.sys
devicehigh=a:\w\dblbuff.sys
devicehigh=a:\w\setver.exe
device=a:\w\aspi8dos.sys
device=a:\w\aspicd.sys /D:CD001
Likewise, the paths in a:\autoexec.bat must also be modified, and the subst command must be replaced with mscdex.exe. The final version is as follows:
a:\w\mscdex.exe /D:CD001 /L:X /M:50
a:\w\xmsdsk 4000 w: /y
copy a:\command.com w:\
set COMSPEC=w:\command.com
a:\w\xcopy x:\ramdisk\*.* w:\ /S
path w:\;x:\w;x:\w\command; x:\w\system
x:
Make sure the data buffer of mscdex.exe is not too small; with the /M:12 parameter and a fast CD-ROM drive, windows may hang during startup because the CD-ROM cannot supply data quickly enough. The /L:X parameter specifies drive x: as the CD-ROM drive letter.
Before restoring the original system, you can back up io.sys, msdos.sys, config.sys, autoexec.bat from c:\ to some unrelated directory for later use. Then copy the original system backup from c:\backup back to c:\ and change the previously renamed system.dat, system.ini, win.com back to their original names. Then you can boot the original system to do the burning.
The CD must contain a Joliet file system and use c:\cdrom as its root directory.
Before, I made one following this method. As soon as the system started,
it tried to write data to the cdrom, and then blue screen.
I thought maybe the cause was virtual memory,
but no matter how I set the location of virtual memory, or disabled
virtual memory, the system always tried to access the win386.swp file under my windows directory.
On other machines, though, I could easily change the location of virtual memory,
so my cdwin98 never succeeded, and I gave up.
These past two days I saw that winpe had come out, so I wanted to solve this problem again.
I carefully examined the win98 system on my new disk
and found that the wininit.ini file was always there. I found it very strange.
I opened the file and saw that it was actually a command to delete my win386.swp:
null=x:cdwin98\win386.swp
This shows that this command had never been executed.
So it suddenly dawned on me, and I copied the 4 registry files under the ramwin98 directory under ramdisk, and
the wininit.ini file, to the original cdwin98 directory,
then restart, and as a result everything was ok, and the original win386.swp file was gone.
I think maybe when win98 has just started running, it still looks for some system files in the original directory,
for example system.ini (the virtual memory settings are controlled by this file)
Another thing is that you don't have to install twui,
Even if you do install it, you still have to adjust the registry manually.
The adjustments made by twui are all placed under the following registry subkey
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
The defaults are under
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
Directly modifying the contents of the default subkey is useless
You need to add items under User Shell Folders to override the default values
Brother! Looks like you forgot to mention MSdos.sys!!!???
Last March I spent more than a week making a CD-based Win98, and it was exactly because of the
Msdos.sys problem that I had to stop! What you said is not bad, and most of it works, but you forgot Msdos.sys.
That file configures the Windows98 boot disk and directory. If there is no hard disk, then everything above is pointless!
I'm testing it now, don't know whether it will work. Besides, the article doesn't take into account IE cache\temporary directories\
virtual memory and other issues, so it needs more detailed study.
--------------------------------------------------------------------------------
As described in the article, at the final step, after restarting, an IE browser error appears. I don't know how to solve it!
Could uninstalling IE and using another browser be considered?
Install the standard SVGA driver, and disable automatic detection of new hardware by the system. I think using such a CD
is only for occasional needs. Especially if it's made shared, there is no need to install so many drivers. This is also for
the sake of its operating efficiency, so there is no need to install any special drivers, unless it is only for use on your own
machine.
You can go to http://www.qualystem.com/en/download.html
to download a tool for making WIN98 run from CD-ROM. You need to fill out a form,
Product to be tried : select Qualystem Rescue for Win9X/ME
One minute later you will receive an email containing the download address.
Another minute later you will receive an email containing the installation password (extraction password).
The trial version has a one-month usage limit, and the finished CD can only be used on the same machine.
The reason Windows cannot boot from CD-ROM is that at startup Windows reports that it cannot access the registry. This article will explain how to eliminate these errors and optimize CD booting.
To make a bootable Windows CD, you need at least 500 MB of disk space, some freeware, and some knowledge of DOS commands.
The method introduced here can only be used for systems from Windows 95b and later, and Windows 98. It cannot be used for boot CDs of NT or 2000.
Actually, the whole problem is handling Windows's write access to the disk. Consider two points: first, a system whose registry is located on the CD can boot and run normally. Second, place the registry on a RAM disk. A RAM disk is a part of main memory emulated as a hard disk. The trick here is that you only need to copy the registry files to the RAM disk, so this RAM disk only needs about 4 MB of memory. All files that do not need write access at startup remain on the CD. With this method, the registry can still be written even when there is no hard disk.
Before starting to install Windows, you need to make a boot disk and copy the Win98 installation directory to the hard disk, which will speed up the installation process.
Then you need to create some directories:
c:\w will be used for the CD boot image
c:\cdrom will serve as the CD directory
c:\cdrom\ramdisk is for files that will be copied to the RAM disk when booting from CD
c:\cdrom\ramdisk\w will serve as the Windows directory on the RAM disk
c:\backup copy msdos.sys, io.sys, config.sys, autoexec.bat into it as a backup of the current system
Copy the following files into c:\w
dblbuff.sys, himen.sys, ifshlp.sys, setver.exe (located in the windows directory)
attrib.exe, keyb.com, keyboard.sys, mscdex.exe, subst.exe, xcopy.exe, xcopy32.exe, xcopy32.mod
(located in the windows\command directory)
A DOS CD-ROM driver, and a RAM disk driver (ramdrive.sys is unsuitable because you cannot assign a drive letter to it; you can use xmsdsk.exe, which can be downloaded free from . If you use a different driver, you need to modify the settings in autoexec.bat)
Before reinstalling windows, you must delete c:\config.sys and c:\autoexec.bat, and create a new autoexec.bat with the following:
c:\w\subst.exe x: c:\cdrom
path c:\;c:\w
Because the system is going to run from CD-ROM, and the CD-ROM can only be assigned an unused drive letter, the system must be installed on a later drive letter. This is important to make the registry independent of drive letters. So use the subst command to map the directory where you install windows to a virtual drive letter; the first line in autoexec.bat maps c:\cdrom to drive x:.
To prevent the existing system from being overwritten, you need to rename all win.com and system.ini files on the hard disk, and also system.dat. Because when windows starts, if it cannot find these files in the system directory, it will automatically search all partitions for system.dat, which may affect other systems.
Now begin installing windows. Run setup.exe, and it will report that subst.exe has already been loaded. Ignore this message, press esc to refuse the program's suggestion and continue the installation. Use x:\w as the installation path. The first restart during installation must boot from the floppy disk made earlier; ignore the prompt telling you to remove the floppy. After booting from the floppy, edit c:\config.sys and add the following, where ifshlp.sys is used to support the VFAT file system:
devicehigh=c:\w\himem.sys
devicehigh=c:\w\ifshlp.sys
devicehigh=c:\w\dblbuff.sys
devicehigh=c:\w\setver.exe
Also edit c:\autoexec.bat and add the following:
c:\w\subst.exe x: c:\cdrom
path c:\w;x:\w;x:\w\command;x:\w\system
Remove the floppy, press ctrl-alt-del to reboot, and complete the installation. At this point, you can install some necessary drivers and applications on this system, which will eventually all go onto the CD, such as sound card and video card drivers. To make the later setup easier, you need to install the TweadUI tool. In windows98 you can find it in the \tools\reskit\powertoy directory; the windows95 version can be downloaded free from .
Now prepare a RAM disk for the registry. Still using the subst command, add the following line to c:\autoexec.bat:
c:\w\subst.exe w: c:\cdrom\ramdisk
windows will look in \msdos.sys on the boot partition for the location of the registry files, so you need to modify it. This file has the system attribute; use the command attrib msdos.sys -s -h -r to remove its system, hidden, and read-only attributes. Then its first four lines can be changed to the following:
WinDir=w:\w
WinBootDir=w:\w
HostWinBootDrv=w
When editing msdos.sys, you need to add the following line:
DisableLog=1
Note that if it already contains a line DisableLog=0, then just change the 0 to 1.
As mentioned above, to prevent the system from reading system.dat on the hard disk when booting from CD-ROM, the registry file must be renamed. Its name is contained in c:\io.sys; use a hex editor to modify it, search for all system.dat strings, and change them to system.tat. This change will ensure that only system.tat is regarded as the system registry file, while system.dat will be ignored.
On windows95 systems this modification is recommended, but on windows98 more issues must be considered: the registry filename is not only specified in io.sys, some applications run at startup will also automatically detect this registry file. If you make this change, you may face registry error messages on every startup. Also, scanregw.exe must be disabled at startup, and you can use msconfig.exe to disable it.
To make the next reboot safer, copy the start menu from c:\cdrom\w to c:\cdrom\ramdisk\w
Then shut down windows to command-line mode, and copy system.dat, system.ini, user.dat, win.ini from c:\cdrom\w to c:\cdrom\ramdisk\w. If you modified io.sys as described above, you need to rename system.dat to system.tat at this point.
When windows is restarted again, it will use the registry on drive w:. However, at startup the system not only needs write access to the registry files, it also needs write access to the system directory. Therefore after booting the system from CD-ROM, the system directory must be changed to the RAM disk path. This location is indicated in the registry by the following key; use regedit.exe to change this key to 'w:\w':
HKLM\Software\Microsoft\Windows\CurrentVersion
At present the start menu resides on the RAM disk (simulated by the subst command), but it takes up unnecessary space, so you need to move it back to the CD: launch TweakUI from the system controls directory, select 'General' and adjust the 'Special Folders' entry, changing 'Programs', 'Start Menu', and 'Startup' to 'x:\w\startmenu' and their respective subdirectories. In windows98 you also need to adjust the 'Desktop' directory entry to 'x:\w\Desktop'. After rebooting, the w:\w\Start Menu directory and w:\w\Desktop directory can be deleted.
Next, configure a real RAM disk. Reboot to DOS again, and use attrib c:\cdrom\ramdisk\*.* -s -h -r /s to remove the system, hidden, and read-only attributes from all files under c:\cdrom\ramdisk. Edit c:\autoexec.bat and delete the following line:
subst w: c:\cdrom\ramdisk
and add the following lines:
c:\w\xmsdsk 4000 w: /y
copy c:\command.com w:\
set COMSPEC=w:\command.com
c:\w\xcopy c:\cdrom\ramdisk\*.* w:\ /s
During boot, these settings allocate 4000K of memory as a RAM disk, replacing the RAM disk previously virtualized by the subst command. The copy command copies the command interpreter and the registry files in the system directory to the RAM disk, and the COMSPEC parameter specifies the location of the command interpreter.
If everything runs normally after rebooting, you can now delete all files under c:\cdrom\ramdisk\w except system.ini, user.dat, win.ini, control.ini, system.dat (or system.tat, if you modified io.sys).
Burning:
To burn a bootable CD, you need either a boot disk or a boot disk image file, depending on the burning software you use.
So, you need to make a normal boot disk using format a:/s or sys a:, copy the previously modified io.sys, msdos.sys, config.sys, autoexec.bat from c:\ to that boot disk, overwriting the original files, and copy the entire c:\w directory to the floppy.
Now you must modify a:\config.sys to include the correct paths. The modified result is as follows:
devicehigh=a:\w\himem.sys
devicehigh=a:\w\ifshlp.sys
devicehigh=a:\w\dblbuff.sys
devicehigh=a:\w\setver.exe
device=a:\w\aspi8dos.sys
device=a:\w\aspicd.sys /D:CD001
Likewise, the paths in a:\autoexec.bat must also be modified, and the subst command must be replaced with mscdex.exe. The final version is as follows:
a:\w\mscdex.exe /D:CD001 /L:X /M:50
a:\w\xmsdsk 4000 w: /y
copy a:\command.com w:\
set COMSPEC=w:\command.com
a:\w\xcopy x:\ramdisk\*.* w:\ /S
path w:\;x:\w;x:\w\command; x:\w\system
x:
Make sure the data buffer of mscdex.exe is not too small; with the /M:12 parameter and a fast CD-ROM drive, windows may hang during startup because the CD-ROM cannot supply data quickly enough. The /L:X parameter specifies drive x: as the CD-ROM drive letter.
Before restoring the original system, you can back up io.sys, msdos.sys, config.sys, autoexec.bat from c:\ to some unrelated directory for later use. Then copy the original system backup from c:\backup back to c:\ and change the previously renamed system.dat, system.ini, win.com back to their original names. Then you can boot the original system to do the burning.
The CD must contain a Joliet file system and use c:\cdrom as its root directory.
Before, I made one following this method. As soon as the system started,
it tried to write data to the cdrom, and then blue screen.
I thought maybe the cause was virtual memory,
but no matter how I set the location of virtual memory, or disabled
virtual memory, the system always tried to access the win386.swp file under my windows directory.
On other machines, though, I could easily change the location of virtual memory,
so my cdwin98 never succeeded, and I gave up.
These past two days I saw that winpe had come out, so I wanted to solve this problem again.
I carefully examined the win98 system on my new disk
and found that the wininit.ini file was always there. I found it very strange.
I opened the file and saw that it was actually a command to delete my win386.swp:
null=x:cdwin98\win386.swp
This shows that this command had never been executed.
So it suddenly dawned on me, and I copied the 4 registry files under the ramwin98 directory under ramdisk, and
the wininit.ini file, to the original cdwin98 directory,
then restart, and as a result everything was ok, and the original win386.swp file was gone.
I think maybe when win98 has just started running, it still looks for some system files in the original directory,
for example system.ini (the virtual memory settings are controlled by this file)
Another thing is that you don't have to install twui,
Even if you do install it, you still have to adjust the registry manually.
The adjustments made by twui are all placed under the following registry subkey
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
The defaults are under
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
Directly modifying the contents of the default subkey is useless
You need to add items under User Shell Folders to override the default values
Brother! Looks like you forgot to mention MSdos.sys!!!???
Last March I spent more than a week making a CD-based Win98, and it was exactly because of the
Msdos.sys problem that I had to stop! What you said is not bad, and most of it works, but you forgot Msdos.sys.
That file configures the Windows98 boot disk and directory. If there is no hard disk, then everything above is pointless!
I'm testing it now, don't know whether it will work. Besides, the article doesn't take into account IE cache\temporary directories\
virtual memory and other issues, so it needs more detailed study.
--------------------------------------------------------------------------------
As described in the article, at the final step, after restarting, an IE browser error appears. I don't know how to solve it!
Could uninstalling IE and using another browser be considered?
Install the standard SVGA driver, and disable automatic detection of new hardware by the system. I think using such a CD
is only for occasional needs. Especially if it's made shared, there is no need to install so many drivers. This is also for
the sake of its operating efficiency, so there is no need to install any special drivers, unless it is only for use on your own
machine.
You can go to http://www.qualystem.com/en/download.html
to download a tool for making WIN98 run from CD-ROM. You need to fill out a form,
Product to be tried : select Qualystem Rescue for Win9X/ME
One minute later you will receive an email containing the download address.
Another minute later you will receive an email containing the installation password (extraction password).
The trial version has a one-month usage limit, and the finished CD can only be used on the same machine.
┃ \\\\//// ┃通缉:杨小邪 特点:贼丑
┃ (-●●-) ┃年龄:刚成年 性别:男
┃ \ / ┃罪名:长的丑/总想见网友
┃ \︶/ ┃犯罪事实:吓死一片~
┃ (-●●-) ┃年龄:刚成年 性别:男
┃ \ / ┃罪名:长的丑/总想见网友
┃ \︶/ ┃犯罪事实:吓死一片~

