Monday, February 11, 2008

Creating a Windows XP bootable CD

Always it is a good idea to keep Windows XP bootable CD/DVD, if you are a user of XP operating system. Becuase most of the problems happening in XP system can be solved using recovery console in the XP boot disk.

If you have a installation CD (not bootable), it is very easy.

Open Nero image burner. Select the option bootbale data Disc. It will ask for the bootable image. You can download the XP bootable image from here. It will ask to enter some parameters there. Enter Bootable CD type as "No Emulation", Load Segment as 0x7c0 and sector count as 4. In the project properties select file system as "ISO9660", physical format of CD as "CD ROM". Now, add all the contents of installation CD, burn the image. You got a bootable XP disc..!!

If you dont' have a installation CD also, you can create bootable disc. Understanding the boot process of XP (or any other NT based OS) will help for that.
  • The first thing that happens when you power on your PC is Power On Self Test. Hardware such as Memory is tested as well as all other hardware on the system being verified.
  • Once POST completes, the PC will attempt to locate a bootable device configured via the system BIOS/CMOS.
  • Once the bootable device is found, the MBR (Master Boot Record) is loaded into memory.
  • The MBR locates the active partition and loads the boot sector into memory.
  • The boot sector contains the code that starts Ntldr which is the boot strap loader for Windows XP. Ntldr must be located in root folder of the active partition along with Ntdetect.com, boot.ini, bootsect.dos (for dual booting) and Ntbootdd.sys (needed with some SCSI adapters)
  • The operating system is selected by NTLDR.
  • NTLDR will use the Ntdetect.com, boot.ini, and bootsect.dos files to get the proper OS selected and loaded.
  • The system starts in 16-bit real mode, then moves to protected mode at 32-bit.
  • Once NTLDR switches into 32-bit mode, the file system is loaded (NTFS, FAT32, etc) so that the boot.ini can be read and then checked.
  • Once the boot.ini is checked, you select the OS you would like to load.
  • Selecting XP from the boot menu causes Ntldr to run Ntdetect.com to get information about installed hardware.
  • Ntldr then uses the path specified in the boot.ini to find the boot partition.
  • Ntdetect.com can start to gather information about your systems hardware.
  • Once Ntdetect.com collects the needed information, NTLDR loads Ntoskrnl and passes control to it.
  • Ntoskrnl.exe and hal.dll are loaded. Ntoskrnl.exe and Hal.dll must be located in the %SystemRoot%\System32 folder.
  • Next, the Registry is loaded and a hardware profile is selected. If you have multiple hardware profiles created, you may be asked to select from one to load.
  • After you have selected the proper hardware profile (or if the default one just loads), then you will next be greeted by the login prompt.
  • Ntoskrnl.exe starts Winlogon.exe which starts Lsass.exe (Local Security Administration), this is the program that displays the Welcome screen and allows a user to log on with their credentials (user name and password).
So, the required files for booting are Ntldr, Ntdetect.com, and the boot.ini. Copy them from a system running Windows XP to a floppy or CD. Edit the boot.ini to point to the correct partition of OS. Then you can boot from that floppy or CD. But to create a bootable CD with recovery console, we need to copy all the files and folders found in installation CD from the XP system and burn the CD with XP bootable image. These files and folders include I386 folder, Device Drivers folder, WIN51.RC1, WIN51IP.RC1 and setup.exe .

1 comment:

Anonymous said...

You write very well.