NET commands
i am going to try to clone virtual
pc hard drive or copy all the files
let see how that works.
The virtual hard drive image for
microsoft's virtual pc is a .vhd
file they are by default located in
C:\Documents and Settings\\My Documents\My Virtual Machines\New Virtual Machine.vhd
ok there is supposed to be tool
called winimage that will view vhd
files:
http://www.winimage.com/
downloaed beta 8.0 version
and installed
i was indead able to open vhd
file and examine the contents.
are there other tools?
that do this (specifically command
line tools?) lets see.
used the winimage tool
to extract what vitual pc vhd
file has.
there are not many files.
boot.ini
ntldr
ntdetect.com
boot.ini:
http://www.winguides.com/registry/display.php/1268/
Using BOOT.INI Startup Switches (Windows NT/2000/XP) Popular
Windows NT, 2000 and XP use a configuration file called BOOT.INI to control how the operating system is booted and any startup options. By modifying the startup switches you can manage the boot process including booting Windows in Safe mode, creating a log file, or disabling the splash screen.
Open you the root partition of your hard drive (normally C:\) and find the file called "BOOT.INI". You may need to enable hidden files under Folder > Options.
Right-click on the file, select Properties and uncheck "Read-only" then click OK. You may like to make a backup of the file at this point to allow you to restore if you experience problems.
Open the file in Notepad and under the [operating systems] section you will find a list of all the installed operating systems. For example:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect
To enable or disable startup options simply change or add any of the switches listed below to the default command-line. For example you could add "/SOS" to the command-line above to display the splash screen and view the drivers being loaded.
# /3GB - New to Service Pack 3. This causes the split between user and system portions of the Windows NT map to become 3GB for user applications, 1GB for System. To take advantage of this the system must be part of the NT Enterprise suite and the application must be flagged as a 3GB aware application.
# /BASEVIDEO - The computer starts up using the standard VGA video driver. Use this if you have installed a graphics driver that is not working.
# /BAUDRATE - Specifies the baud rate to be used for debugging. If you do not set the baud rate, the default baud rate is 9600 if a modem is attached, and 19200 for a null-modem cable.
# /BOOTLOG - Makes 2000 write a log of the boot to the file %SystemRoot%\NTBTLOG.TXT Windows 2000/XP Only.
# /BURNMEMORY=x - Makes NT forget about the given amount of memory in MB. If /burnmemory=64 was given then 64MB of memory would be unavailable.
# /CRASHDEBUG - The debugger is loaded when you start Windows NT, but remains inactive unless a Kernel error occurs. This mode is useful if you are experiencing random, unpredictable Kernel errors.
# /DEBUG - The debugger is loaded when you start Windows NT, and can be activated at any time by a host debugger connected to the computer. This is the mode to use when you are debugging problems that are regularly reproducible.
# /DEBUGPORT=comx - Specifies the com port to use for debugging, where x is the communications port that you want to use.
# /FASTDETECT - Specifying FASTDETECT causes NTDETECT to skip parallel and serial device enumeration for a boot into Win2K, whereas omitting the switch has NTDETECT perform enumeration for a boot into NT 4.0. Win2K setup automatically recognizes dual-boot configurations and sets this switch for BOOT.INI lines that specify a Win2K boot. Windows 2000/XP Only.
# /HAL= - Allows you to override the HAL used, for example using a checked version.
# /INTAFFINITY - Sets the multiprocessor HAL (HALMPS.DLL) to set interrupt affinities such that only the highest numbered processor in an SMP will receive interrupts. Without the switch the HAL defaults to its normal behavior of letting all processors receive interrupts. Windows 2000/XP Only.
# /KERNEL= - Same as above but for the kernel.
# /MAXMEM:n - Specifies the maximum amount of RAM that Windows NT can use. This switch is useful if you suspect a memory chip is bad.
# /NODEBUG - No debugging information is being used.
# /NOGUIBOOT - When this option is specified the VGA video driver responsible for presenting bit mapped graphics during Win2K's boot process is not initialized. The driver is used to display boot progress information, as well as to print the Blue Screen crash screen, so disabling it will disable Win2K's ability to do those things as well. Windows 2000/XP only.
# /NOSERIALMICE=[COMx | COMx,y,z...] - Disables serial mouse detection of the specified COM port(s). Use this switch if you have a component other than a mouse attached to a serial port during the startup sequence. If you use /NOSERIALMICE without specifying a COM port, serial mouse detection is disabled on all COM ports.
# /NUMPROC=n - Only enables the first n processors on a multiple processor system.
# /ONECPU - Only use the first CPU in a multiple processor system.
# /PCILOCK - Stops Windows NT from dynamically assigning IO/IRQ resources to PCI devices and leaves the devices configured by the BIOS.
# /SAFEBOOT - This is an automatic switch which NTLDR should complete for you when you use the F8 menu to perform a safe boot. Following the colon in the option you must specify one of three additional switches: MINIMAL, NETWORK, or DSREPAIR. The MINIMAL and NETWORK flags correspond to safe boot with no network and safe boot with network support. The safe boot is a boot where Windows 2000/XP only loads drivers and services that are specified by name or group in the Minimal or Network Registry keys under HKLM\System\CurrentControlSet\Control\SafeBoot. The DSREPAIR (Directory Services Repair) switch causes NT to boot into a mode where it restores the Active Directory from a backup medium you present. An additional option that you can append is "(ALTERNATESHELL)". This tells NT to use the program specified by HKLM\System\CurrentControlSet\SafeBoot\AlternateShell as the graphical shell, rather than to use the default which is Explorer. Windows 2000/XP only.
# /SOS - Displays the driver names while they are being loaded. Use this switch if Windows NT won’t start up and you think a driver is missing. This option is configured by default on the [VGA] option on the boot menu.
# /WIN95 - This switch is only pertinent on a triple-boot system that has DOS, Win9x and Windows NT installed. Specifying the /WIN95 switch directs NTLDR to boot the Win9x boot sector stored in BOOTSECT.W40. See Microsoft KB Article Q157992 for more information.
# /WIN95DOS - This switch is only pertinent on a triple-boot system that has DOS, Win9x and Windows NT installed. Specifying the /WIN95DOS switch directs NTLDR to boot the DOS boot sector stored in BOOTSECT.DOS. See Microsoft KB Article Q157992 for more information.
# /YEAR= - Specifying this value causes NT/Windows 2000 core time function to ignore the year that the computer's real-time clock reports and instead use the one indicated. Thus, the year used in the switch affects every piece of software on the system, including the NT kernel. Example: /YEAR=2005. Note: this option is only available on NT 4.0 Service Pack 4 and Windows 2000/XP.
Save the file and restart Windows for the change to take effect.
ntdldr:
When a system is configured with Windows NT, the NT boot sector loads and executes NTLDR.
so there is a boot sector then the boot
loader.
ntdetect.com:
http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/ntdetect-o.asp
Here is what microsoft says about boot process:
Ntldr contains the program code that Windows XP Professional needs to read and write to disks formatted by using the NTFS or file allocation table (FAT16 or FAT32) file systems.
Reads the Boot.ini file
Ntldr parses the Boot.ini file to determine the location of the operating system boot partition. For systems that use a single-boot configuration, Ntldr initiates the hardware detection phase by starting Ntdetect.com. For multiple-boot configurations that include Windows XP Professional, Windows 2000, Windows NT 4.0, Windows 95, Windows 98, Windows Me, or MS-DOS, you receive a menu of operating system choices at startup.
Note
* Computers running Windows NT 4.0 require Service Pack 4 or later to access NTFS volumes previously mounted by Windows 2000 or Windows XP Professional. For more information about NTFS interoperability, see "File Systems" in this book.
If you choose Windows XP Professional, Windows 2000, or Windows NT 4.0, Ntldr proceeds with the hardware detection phase. If you do not select Windows XP Professional, Windows 2000, or Windows NT 4.0, control is passed to the boot sector for the other operating system. For example, if you select Windows 95, Windows 98, Windows Me, or MS-DOS, Ntldr passes control to Bootsect.dos by reading MBR code that Bootsect.dos contains. This action causes the MBR code in Bootsect.dos to execute as if the instructions were read from the disk. For more information about Boot.ini, see "Reviewing and Correcting Boot.ini Settings on x86-based Systems" later in this chapter.
Detects hardware and hardware profiles
For x86-based systems, Ntldr starts Ntdetect.com, a program that performs basic device detection. Ntldr then passes Boot.ini information, as well as hardware and software data in the registry, to Ntoskrnl.exe. Ntdetect.com detects hardware profile information (for example, docked and undocked configurations for portable computers) and also checks for information stored in Advanced Configuration and Power Interface (ACPI) tables. ACPI compliant firmware enables Windows XP Professional to detect device power management features and determine device resource requirements.
pc hard drive or copy all the files
let see how that works.
The virtual hard drive image for
microsoft's virtual pc is a .vhd
file they are by default located in
C:\Documents and Settings\
ok there is supposed to be tool
called winimage that will view vhd
files:
http://www.winimage.com/
downloaed beta 8.0 version
and installed
i was indead able to open vhd
file and examine the contents.
are there other tools?
that do this (specifically command
line tools?) lets see.
used the winimage tool
to extract what vitual pc vhd
file has.
there are not many files.
boot.ini
ntldr
ntdetect.com
boot.ini:
http://www.winguides.com/registry/display.php/1268/
Using BOOT.INI Startup Switches (Windows NT/2000/XP) Popular
Windows NT, 2000 and XP use a configuration file called BOOT.INI to control how the operating system is booted and any startup options. By modifying the startup switches you can manage the boot process including booting Windows in Safe mode, creating a log file, or disabling the splash screen.
Open you the root partition of your hard drive (normally C:\) and find the file called "BOOT.INI". You may need to enable hidden files under Folder > Options.
Right-click on the file, select Properties and uncheck "Read-only" then click OK. You may like to make a backup of the file at this point to allow you to restore if you experience problems.
Open the file in Notepad and under the [operating systems] section you will find a list of all the installed operating systems. For example:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect
To enable or disable startup options simply change or add any of the switches listed below to the default command-line. For example you could add "/SOS" to the command-line above to display the splash screen and view the drivers being loaded.
# /3GB - New to Service Pack 3. This causes the split between user and system portions of the Windows NT map to become 3GB for user applications, 1GB for System. To take advantage of this the system must be part of the NT Enterprise suite and the application must be flagged as a 3GB aware application.
# /BASEVIDEO - The computer starts up using the standard VGA video driver. Use this if you have installed a graphics driver that is not working.
# /BAUDRATE - Specifies the baud rate to be used for debugging. If you do not set the baud rate, the default baud rate is 9600 if a modem is attached, and 19200 for a null-modem cable.
# /BOOTLOG - Makes 2000 write a log of the boot to the file %SystemRoot%\NTBTLOG.TXT Windows 2000/XP Only.
# /BURNMEMORY=x - Makes NT forget about the given amount of memory in MB. If /burnmemory=64 was given then 64MB of memory would be unavailable.
# /CRASHDEBUG - The debugger is loaded when you start Windows NT, but remains inactive unless a Kernel error occurs. This mode is useful if you are experiencing random, unpredictable Kernel errors.
# /DEBUG - The debugger is loaded when you start Windows NT, and can be activated at any time by a host debugger connected to the computer. This is the mode to use when you are debugging problems that are regularly reproducible.
# /DEBUGPORT=comx - Specifies the com port to use for debugging, where x is the communications port that you want to use.
# /FASTDETECT - Specifying FASTDETECT causes NTDETECT to skip parallel and serial device enumeration for a boot into Win2K, whereas omitting the switch has NTDETECT perform enumeration for a boot into NT 4.0. Win2K setup automatically recognizes dual-boot configurations and sets this switch for BOOT.INI lines that specify a Win2K boot. Windows 2000/XP Only.
# /HAL=
# /INTAFFINITY - Sets the multiprocessor HAL (HALMPS.DLL) to set interrupt affinities such that only the highest numbered processor in an SMP will receive interrupts. Without the switch the HAL defaults to its normal behavior of letting all processors receive interrupts. Windows 2000/XP Only.
# /KERNEL=
# /MAXMEM:n - Specifies the maximum amount of RAM that Windows NT can use. This switch is useful if you suspect a memory chip is bad.
# /NODEBUG - No debugging information is being used.
# /NOGUIBOOT - When this option is specified the VGA video driver responsible for presenting bit mapped graphics during Win2K's boot process is not initialized. The driver is used to display boot progress information, as well as to print the Blue Screen crash screen, so disabling it will disable Win2K's ability to do those things as well. Windows 2000/XP only.
# /NOSERIALMICE=[COMx | COMx,y,z...] - Disables serial mouse detection of the specified COM port(s). Use this switch if you have a component other than a mouse attached to a serial port during the startup sequence. If you use /NOSERIALMICE without specifying a COM port, serial mouse detection is disabled on all COM ports.
# /NUMPROC=n - Only enables the first n processors on a multiple processor system.
# /ONECPU - Only use the first CPU in a multiple processor system.
# /PCILOCK - Stops Windows NT from dynamically assigning IO/IRQ resources to PCI devices and leaves the devices configured by the BIOS.
# /SAFEBOOT - This is an automatic switch which NTLDR should complete for you when you use the F8 menu to perform a safe boot. Following the colon in the option you must specify one of three additional switches: MINIMAL, NETWORK, or DSREPAIR. The MINIMAL and NETWORK flags correspond to safe boot with no network and safe boot with network support. The safe boot is a boot where Windows 2000/XP only loads drivers and services that are specified by name or group in the Minimal or Network Registry keys under HKLM\System\CurrentControlSet\Control\SafeBoot. The DSREPAIR (Directory Services Repair) switch causes NT to boot into a mode where it restores the Active Directory from a backup medium you present. An additional option that you can append is "(ALTERNATESHELL)". This tells NT to use the program specified by HKLM\System\CurrentControlSet\SafeBoot\AlternateShell as the graphical shell, rather than to use the default which is Explorer. Windows 2000/XP only.
# /SOS - Displays the driver names while they are being loaded. Use this switch if Windows NT won’t start up and you think a driver is missing. This option is configured by default on the [VGA] option on the boot menu.
# /WIN95 - This switch is only pertinent on a triple-boot system that has DOS, Win9x and Windows NT installed. Specifying the /WIN95 switch directs NTLDR to boot the Win9x boot sector stored in BOOTSECT.W40. See Microsoft KB Article Q157992 for more information.
# /WIN95DOS - This switch is only pertinent on a triple-boot system that has DOS, Win9x and Windows NT installed. Specifying the /WIN95DOS switch directs NTLDR to boot the DOS boot sector stored in BOOTSECT.DOS. See Microsoft KB Article Q157992 for more information.
# /YEAR= - Specifying this value causes NT/Windows 2000 core time function to ignore the year that the computer's real-time clock reports and instead use the one indicated. Thus, the year used in the switch affects every piece of software on the system, including the NT kernel. Example: /YEAR=2005. Note: this option is only available on NT 4.0 Service Pack 4 and Windows 2000/XP.
Save the file and restart Windows for the change to take effect.
ntdldr:
When a system is configured with Windows NT, the NT boot sector loads and executes NTLDR.
so there is a boot sector then the boot
loader.
ntdetect.com:
http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/ntdetect-o.asp
Here is what microsoft says about boot process:
Ntldr contains the program code that Windows XP Professional needs to read and write to disks formatted by using the NTFS or file allocation table (FAT16 or FAT32) file systems.
Reads the Boot.ini file
Ntldr parses the Boot.ini file to determine the location of the operating system boot partition. For systems that use a single-boot configuration, Ntldr initiates the hardware detection phase by starting Ntdetect.com. For multiple-boot configurations that include Windows XP Professional, Windows 2000, Windows NT 4.0, Windows 95, Windows 98, Windows Me, or MS-DOS, you receive a menu of operating system choices at startup.
Note
* Computers running Windows NT 4.0 require Service Pack 4 or later to access NTFS volumes previously mounted by Windows 2000 or Windows XP Professional. For more information about NTFS interoperability, see "File Systems" in this book.
If you choose Windows XP Professional, Windows 2000, or Windows NT 4.0, Ntldr proceeds with the hardware detection phase. If you do not select Windows XP Professional, Windows 2000, or Windows NT 4.0, control is passed to the boot sector for the other operating system. For example, if you select Windows 95, Windows 98, Windows Me, or MS-DOS, Ntldr passes control to Bootsect.dos by reading MBR code that Bootsect.dos contains. This action causes the MBR code in Bootsect.dos to execute as if the instructions were read from the disk. For more information about Boot.ini, see "Reviewing and Correcting Boot.ini Settings on x86-based Systems" later in this chapter.
Detects hardware and hardware profiles
For x86-based systems, Ntldr starts Ntdetect.com, a program that performs basic device detection. Ntldr then passes Boot.ini information, as well as hardware and software data in the registry, to Ntoskrnl.exe. Ntdetect.com detects hardware profile information (for example, docked and undocked configurations for portable computers) and also checks for information stored in Advanced Configuration and Power Interface (ACPI) tables. ACPI compliant firmware enables Windows XP Professional to detect device power management features and determine device resource requirements.

0 Comments:
Post a Comment
<< Home