Scrigroup - Documente si articole

Username / Parola inexistente      

Home Documente Upload Resurse Alte limbi doc  


AccessAdobe photoshopAlgoritmiAutocadBaze de dateCC sharp
CalculatoareCorel drawDot netExcelFox proFrontpageHardware
HtmlInternetJavaLinuxMatlabMs dosPascal
PhpPower pointRetele calculatoareSqlTutorialsWebdesignWindows
WordXml


Booting Windows From CD-ROM

windows

+ Font mai mare | - Font mai mic



DOCUMENTE SIMILARE

Trimite pe Messenger
Windows XP „branduit”
Optimizarea sistemului de fisiere NTFS
INSTALAREA SISTEMULUI DE OPERARE WINDOWS NT
Background personalizat la toolbar-ul din Internet Explorer
Windows 2000 Server
Realizarea conexiunii VPN pentru Microsoft Windows XP
Sistem de operare - Windows XP Live USB Edition 2008
Shutdown cu probleme
Arhivarea fisierelor
Nevoia de viteza


Booting Windows From CD-ROM

Regular backups often only offer a false feeling of security: After a system crash Windows frequently doesn't even start up anymore, and this puts the restore program out of reach, too. Therefore, a bootable and virus-proof Windows installation on CD ROM should really be found in every well-stocked emergency kit.

'To start Windows 95 or 98 in GUI mode, it must be installed on a writeable medium. You cannot start Windows from CD.' Similar statements have been published in various PC magazines, and c't has said it, too. The time has come to revise this statement.




The reason for this assumption lies in the fact that Windows spits out masses of error messages when unable to access the registry during startup. However, this is essentially only cosmetic: If you can live with it, Windows 9x can indeed be started from a CD ROM. This article will deal with how to eliminate the error messages and optimize CD ROM booting.

The advantages of starting Windows from CD sound like a list of things administrators and teachers, power users and normal users have always wanted. For one thing would there are the long file names: When there is no Windows running - be it because of a system crash or because of user thoughtlessness (format c:) - it is often very problematic to save long file names. Windows normally also needs to be up for extracting a file from a backup archive or an encoded file system. According to Murphy's Law, however, it is exactly after a system crash when there is no time for re-installing the system. In addition, a re-installation would possibly overwrite the very data you want to rescue.

Another advantage is the option to run one's own system and customized programs on someone else's computer. This may prove the last resort to rescue things on business trips. A cryptographically secure system which can only be accessed by booting one's own system on someone else's computer is a must in security sensitive areas.

In addition, bootable CDs could be advantageous for schools and Internet cafés, i.e. places where computers are subjected to games and hack-loving users. This way, computer loving students find their popular dice game of 'how to install a Trojan horse on the school computer to log password entries and then acquire admin rights' turns into a Gordian knot. It could be the silver lining stressed-out first generation computer science and maths teachers have been looking for in the land of invincible computer freaks.

Take

To make a bootable Windows CD, you need a CD ROM burner and the respective software as well as at least 500 MBytes of hard disk space and a few freeware programs from the Internet we'll tell you about later. Also, you should already have installed Windows on a computer and know a few basic DOS commands - it does get a bit tricky, you see. And time-consuming: You'll probably need at least three hours because of the numerous reboots.

What's being described will so far only work with Windows 95b upwards and Windows 98. Windows 95a gets stuck during installation. Windows NT or 2000 can - until further notice - not be put on CD due to their completely different structure.

In fact it's all down to registry write access. There are two places which make sense for starting Windows from CD. Number one would be directly on CD. A system which has its registry on a CD will work. It proves wrong to assume that Windows 95 needs a writeable medium during startup. Although Windows will constantly moan about the hard disk being full things like backups can be restored without difficulties.

The second - and more elegant - place for the registry is a RAM disk. A RAM disk is a part of main memory pretending to be a normal hard disk which doesn't retain its data beyond a reboot. The trick is that you don't have to copy all of the Windows files into RAM disk, only the registry files. This takes the RAM disk space required for the 40MB of a minimal Windows installation down to less than 4MB. All the other files which won't change after startup anyway will remain on CD. Then, Windows will run on a combination of RAM disk and CD ROM. This way, the registry has write access without a hard disk being present.

Temporary Injunction

Before you set out to install Windows on CD ROM you should make a bootable startup disk from a running system and copy the win95 or win98 directory from you Windows CD onto your hard disk. This will for one thing speed up installation and will in addition - trivial as it may seem - prove advantageous because you don't need any CD ROM drivers. You may find yourself in trouble when you boot from a disk which includes CD ROM drivers and then try to reboot after running the installation procedure.

Then, you must create a few hard disk directories: cw serves for preparing the CD ROM boot image, c:cdrom will store everything that will afterwards be put on CD. The data which needs to go into RAM disk will initially be saved in c:cdromramdisk, the RAM disk's 'Windows directory' will be c:cdromramdiskw. Also, you should create a c:backup directory and copy msdos.sys, io.sys, config.sys and autoexec.bat into it from c:.

The c:w directory should also hold dblbuff.sys, himen.sys, ifshlp.sys and setver.exe from your Windows directory as well as attrib.exe, keyb.com, keyboard.sys, mscdex.exe, subst.exe, xcopy.exe, xcopy32.exe and - for Windows 98 - xcopy32.mod from windowscommand. Plus the DOS driver(s) for your CD ROM drive and a RAM disk driver. Ramdrive.sys, which comes with Windows, is unsuitable because you cannot assign a drive letter. A well-tested alternative is xmsdsk.exe, a free utility you can among others download at [1]. If you want to use a different one, change the settings in autoexec.bat accordingly.

Before re-installing Windows you should delete c:config.sys and c:autoexec.bat (have you really made backups?) and then create a new autoexec.bat containing the following:

c:wsubst.exe x: c:cdrom
path c:;c:w



Because the system will later run from CD and the CD ROM drive can only be assigned a drive letter which hasn't been assigned yet, the system should be installed on a drive with a letter from the back of the alphabet. This is important to make all registry links and paths partition-independent. Instead of setting up a number of dummy partitions, you can use the subst DOS command to assign a drive letter to a hard disk directory of your choice. The first line in autoexec.bat makes the c:cdrom drive accessible as drive X: the same way the CD will be accessed after booting the system.

To avoid overwriting existing installations with the following Windows setup you should rename all win.com and system.ini files in all Windows directories on all partitions, even in the current one. Similar things apply to files called system.dat. However, to get to them you must leave Windows and reboot the computer to its command line. Then, you make the system.dats accessible by typing attrib -r -h -s and giving them a new name. This precaution has a background: When Windows can't find the registry in the place it is looking for it during startup, it will look for a system.dat file - which contains the registry - on all the other partitions and will start it from there. This may cause the wrong system.dat to be booted and might even influence other installations.

New From The Start

Then proceed to re-install Windows by starting setup.exe from the hard disk directory containing the Win9x branch you copied from your Windows CD. Setup will complain that subst.exe is loaded. Ignore this message by pressing ESC against the program's recommendation. Use X:W as the installation path.

The first installation reboot must be done from the Windows startup floppy you made previously. You should therefore ignore the instruction to remove all floppy disks from the drives. When installed on a network drive - and virtual drives created with subst belong in this category - Windows does not automatically choose the right paths for autoexec.bat and config.sys. Therefore, the first reboot must be done from the startup floppy, enabling you to correct these paths and add ifshlp.sys, a missing file which supports VFAT, to your config.sys. Use edit to load c:config.sys from the command line and make sure it contains at least the following lines with correct path instructions:

devicehigh=c:whimem.sys
devicehigh=c:wifshlp.sys
devicehigh=c:wdblbuff.sys
devicehigh=c:wsetver.exe

Then check autoexec.bat in the same way. Here, the path must be extented to include the Windows and WindowsCommand directories on our future CD. Without this information, the system won't find win.com when booted from CD, a file which initializes the GUI mode startup process. Your minimal configuration looks like this:

c:wsubst.exe x: c:cdrom
path c:w;x:w;x:wcommand;x:wsystem

Remove the startup floppy, restart your computer using ctrl-alt-del and finish your installation. Now, you should adapt this Windows setup to include your own preferences. Whatever you configure at a later date will be forgotten again as the registry will reside in a RAM disk. Therefore, you should also be sure to install all required drivers - for example sound and graphics boards drivers - and to prepare any other programs which are to be included on CD. To make the following steps a bit easier, do install the TweakUI utility. In Windows 98, you find it in the toolsreskitpowertoy directory on your Windows CD; the free Windows 95 version is available on the Internet at [2].

Separate Ways

Preparing a RAM disk for the registry again involves the DOS command subst. Add the following line as the second one to c:autoexec.bat:

c:wsubst.exe w: c:cdromramdisk

Windows expects to find the registry files in msdos.sys on the startup volume. To edit it, you must first make it accessible with attrib -s -h -r. Then, you can adapt the path instructions in the first four lines:

[Paths] WinDir=w w
WinBootDir=w:w
HostWinBootDrv=w

While you're editing msdos.sys, you should add a line at the end of the last text section with

DisableLog

If there's already a DisableLog=0, don't add another entry for this, but just change it to 1.

To prevent the system from using a hard disk system.dat when booted from CD, causing the side effects described, the registry should be renamed. Its name is noted in c:io.sys. To patch it, you must again render it visible. Then, edit it in a hex editor - failing that use edit /70 c:io.sys in a DOS window -, search for the character sequence system.dat and change it to system.tat. This little operation makes sure only files named system.tat will be recognized as registry files, any system.dat files will be ignored.



This patch is very recommendable for Windows 95, but for Windows 98 there are more things to consider: Here, the registry name is not only wired into the io.sys file but also in the program files responsible for automatically checking the registry during startup. If you make the change, you face a registry error message every time you boot. In addition, scanregw.exe must be prevented form being loaded, for example by deactivating it with msconfig.exe in its autostart folder.

For the next Windows reboot to work smoothly, copy the start menu folder from c:cdromw to c:cdromramdiskw now.

To fill your temporary RAM disk substitute, close Windows and start a command prompt only. Copy system.dat, system.ini, user.dat and win.ini from c:cdromw to c:cdromramdiskw after having made them accessible with attrib. In case you included the io.sys patch, rename the system.dat file in the target directory to system.tat.

Restarting Windows will now make the program use the drive W: registry. However, the system needs write access not only to the registry but also to the Windows directory. Therefore, this directory should be put into RAM disk after booting from CD. Its position is noted in the registry at the HKLMSoftwareMicrosoftWindowsCurrentVersion key. Use regedit.exe to change the value systemroot to 'w w'.

At present, the start menu resides in the RAM disk simulated with subst, but it only uses up unneccessary space there. You should therefore move it back to the CD: Start TweakUI from the system controls folder, choose 'General' and readjust the 'Special Folders' entries for 'Programs', 'Start Menu' and 'Startup' to read 'x:wstartmenu or the respective subdirectories. For Windows 98, you should also readjust the 'Desktop' entry to read 'x wDesktop'. After rebooting, the w:wStartmenu and w:wDesktop folders can be deleted.

Casual Aquaintance

Setting up a real RAM disk requires rebooting to DOS again. The command attrib -s -h -r c:cdromramdisk*.* /s removes 'bad' flags in the files which are to go into the RAM disk. Now, use edit in c:autoexec.bat to delete or disable the line subst w: c:cdromramdisk per REM. In its place, add the following lines:

c:wxmsdsk 4000 w: /y
copy c:command.com w:
set COMSPEC=w command.com
c:wxcopy c:cdromramdisk*.* w: /s

During startup, this sets up a 4000KByte RAM disk instead of a subst drive. The copy commands fill it with a command line interpreter which has been designated current shell via COMSPEC, and with the contents of the directory containing the registry.

If everything runs smoothly after rebooting, you can delete all files in c:cdromramdiskw except system.ini, user.dat, win.ini, control.ini and system.tat or system.dat respectively.

Burnt Out

To create a bootable CD, you need a startup disk or - varying with burner software - an image of it. Should your software not be capable of burning bootable CDs you can still make a normal CD and start it with this (write protected) disk. With computer BIOSs which don't support booting from CD, a disk is again the only way of breathing life into you CD.

Therefore, create a normal startup disk using format a:/s or sys a:. Copy the patched io.sys and msdos.sys files as well as the config.sys and autoexec.bat you just made from c:, replacing existing files. In addition, put the entire c:w directory onto your disk.

Now, a:config.sys must be amended to include the right paths and any CD ROM driver(s). The result should look something like this:

devicehigh=a:whimem.sys
devicehigh=a:wifshlp.sys
devicehigh=a:wdblbuff.sys
devicehigh=a:wsetver.exe
device=a:waspi8dos.sys
device=a:waspicd.sys /D:CD001

Again, paths must also be changed in a:autoexec.bat; in addition, the subst command must be replaced with mscdex.exe. The finished file should read like this:

a:wmscdex.exe /D:CD001 /L:X /M:50
a:wxmsdsk 4000 w: /y
copy a:command.com w:
set COMSPEC=w:command.com
a:wxcopy x:ramdisk*.* w: /S
path w:;x:w;x:wcommand; x:wsystem
x:



Make sure the mscdex.exe data buffer isn't too small. With the usual /M:12 and a fast drive, Windows might get stuck during startup when the drive doesn't provide the data fast enough. The parameter /L:X states that the CD ROM drive is to be given the drive letter X:. The reasoning behind the last line can be found in the box called 'bull fight'.

Before reactivating your old hard disk system it might be advisable to copy io.sys, msdos.sys, config.sys and autoexec.bat from c: to a separate directory so you don't have to start from scratch if the CD doesn't work or you want to create a different version. Then, copy the files from c:backup back to c: and change the altered system.dat, system.ini and win.com back to their original names.

If your burner software can't read a bootable disk, use a free command line tool like getbtimg [3] or the Windows shareware program WinImage [4] to create an image of the disk you just made. What happens next varies strongly with the respective burner software. Make sure you use attrib -s -h c:cdrom*.* /s to remove unwanted flags from the directory contents to be copied before burning your CD. The CD is to have a Joliet file system and contain all of c:cdrom in its root directory.

In [3], you will also find instructions on how to create a bootable CD without the burner software being equipped for it.

Should reading this article have left you with the impression that creating a bootable Windows CD is quite a strenuous task you can put your mind at ease: It may seem complicated, but actually doing it will be more of a stroll than anything else. (hos)

Bibliography
[1] Free Software For DOS, https://www.geocities.com/SiliconValley/Lakes/1401/softlib1.htm
[2] Windows 95 Power Toys Set, https://www.microsoft.com/windows95/downloads/contents/wutoys/w95pwrtoysset/
[3] How to make a PC-bootable CD, https://www.os.rim.or.jp/~gigo/bootcd/index_e.html
[4] WinImage, https://www.winimage.com/
[5] Klaus Ditze, Booten von CD, Neues Feature neue Fragen, c't 12/95, S. 72
[6] Curtis E. Stevens, Stan Merkin, `El Torito´ Bootable CD-ROM Format Specification, PDF-Dokument at https://www.ptltd.com/techs/specs.html
[7] Ahead Software GmbH, Nero Burning ROM, https://www.ahead.de

Top of page

Bull Fight

CD ROM booting was set out in IBM and Phoenix's 'El Torito' spec. This is an extension to the possibility of furnishing a CD with a boot sector, which is already included in the ISO-9660 standard. Among other things, El Torito controls the interactions between bootable CD and computer BIOS and is intended to enable CD booting both through ATAPI and SCSI interfaces.

Bootable CDs can present themselves to the computer in various 'emulation modes'. In this article, we used what's called a floppy emulation. It involves giving the CD the image of a startup floppy disk which the BIOS will mount as drive A: during the startup procedure. The real drive A: can be accessed as drive B:. If you want to read the data within the CD's ISO standard sector, the startup sequence must load a normal CD ROM driver.

All in all, it is two entirely different programs which access the CD. In our experience, this frequently creates conflicts: Immediately after the first access via CD ROM driver and MSCDEX, any read access to drive A: should diligently be avoided. Erroneous reactions with different drive and BIOS combinations ranged from unfound files to total system crashes leaving only the reset button as a last resort. It's impossible to say whether this is essentially down to sloppy BIOS programming or to unclean drive firmware. But taking a look at the El Torito spec could certainly do the manufacturers of both products no harm.

Things are rounded off by a Windows peculiarity: When loading win.com, Windows memorizes the current drive. It will want to access this drive again and again during operation. This defect is at the root of the COMSPEC effort and the autoexec.bat current drive change.

Therefore, if a Windows CD ROM installation crashes time after time this may be due to one of the programs installed trying to access drive A:. You can easily find out about this by putting the CD in its drive but booting from the floppy. During operation, all you have to do is make sure that the floppy drive's LED doesn't flash.






Politica de confidentialitate



DISTRIBUIE DOCUMENTUL

Comentarii


Vizualizari: 1136
Importanta: rank

Comenteaza documentul:

Te rugam sa te autentifici sau sa iti faci cont pentru a putea comenta

Creaza cont nou

Termeni si conditii de utilizare | Contact
© SCRIGROUP 2021 . All rights reserved

Distribuie URL

Adauga cod HTML in site