Showing posts with label windows xp. Show all posts
Showing posts with label windows xp. Show all posts

Wednesday, June 30, 2010

Install Windows XP on a USB flash/hard drive

I am building a new PC from old spare parts. The new PC will be used mainly for the Internet, so a hard drive won't be necessary unless there's a need to download music and movies. I'm going to put together a computer with no internal storage, but use a USB stick as the main storage. Windows XP Professional will be installed on the USB stick, and the computer will boot up from the USB stick. Here I show how to install XP onto a USB stick and boot the PC from it. You should have the following ready.





Let's begin.




  1. Get your Windows XP installation CD and copy its contents to an empty folder on the hard drive. If you don't have the CD, use utorrent or emule to download the ISO file.



    Then, use 7-zip to extract the contents of the ISO file into an empty folder.



  2. Start the Command Prompt, go to the I386 subfolder and type the following commands to uncompress the USB driver files:


    CD I386
    EXPAND -I USB.IN_
    EXPAND -I USBPORT.IN_
    EXPAND -I USBSTOR.IN_

    We'll get 3 new files: USB.INF, USBPORT.INF and USBSTOR.INF. Remove the original .IN_ files.


    ERASE USB.IN_ USBPORT.IN_ USBSTOR.IN_


  3. Edit TXTSETUP.SIF to include USB storage support at the initial stage of Windows XP installation. The highlighted entries were copied from the [InputDevicesSupport.Load] section to the [BootBusExtenders.Load] section:

    [BootBusExtenders.Load]
    pci = pci.sys
    acpi = acpi.sys
    isapnp = isapnp.sys
    acpiec = acpiec.sys
    ohci1394 = ohci1394.sys
    usbehci = usbehci.sys
    usbohci = usbohci.sys
    usbuhci = usbuhci.sys
    usbhub = usbhub.sys
    usbstor = usbstor.sys


    Likewise for [BootBusExtenders] and [InputDevicesSupport]:



    [BootBusExtenders]
    pci = "PCI Bus Driver",files.pci,pci
    acpi = "ACPI Plug & Play Bus Driver",files.acpi,acpi
    isapnp = "ISA Plug & Play Bus Driver",files.isapnp,isapnp
    acpiec = "ACPI Embedded Controller Driver",files.none,acpiec
    ohci1394 = "IEEE 1394 Bus OHCI Compliant Port Driver",files.ohci1394,ohci1394
    usbehci = "Enhanced Host Controller",files.usbehci,usbehci
    usbohci = "Open Host Controller",files.usbohci,usbohci
    usbuhci = "Universal Host Controller",files.usbuhci,usbuhci
    usbhub = "Generic USB Hub Driver",files.usbhub,usbhub
    usbstor = "USB Storage Class Driver",files.usbstor,usbstor


    Insert the following in the [HiveInfs.Fresh] section:


    [HiveInfs.Fresh]
    AddReg = hivedef.inf,AddReg
    AddReg = hivesys.inf,AddReg
    AddReg = hivesft.inf,AddReg
    AddReg = hivecls.inf,AddReg
    AddReg = hiveusd.inf,AddReg
    AddReg = dmreg.inf,DM.AddReg
    AddReg = usbboot.inf,usbservices


    Then, in the [SourceDisksFiles] section:



    [SourceDisksFiles]
    usbboot.inf = 1,,,,,,_x,3,,3
    bootvid.dll = 1,,,,,,3_,2,0,0,,1,2
    kdcom.dll = 1,,,,,,3_,2,0,0,,1,2


    Save and close TXTSETUP.SIF.



  4. Edit DOSNET.INF so that the second [Files] section looks like this:

    [Files]
    d1,usbboot.inf
    d1,_default.pif
    d1,12520437.cpx
    d1,12520850.cpx


  5. Edit USB.INF as follows:


    [StandardHub.AddService]
    DisplayName = %StandardHub.SvcDesc%
    ServiceType = 1 ; SERVICE_KERNEL_DRIVER
    StartType = 0 ; SERVICE_DEMAND_START
    ErrorControl = 1 ; SERVICE_ERROR_NORMAL
    ServiceBinary = %12%\usbhub.sys
    LoadOrderGroup = Boot Bus Extender

    [CommonClassParent.AddService]
    DisplayName = %GenericParent.SvcDesc%
    ServiceType = 1 ; SERVICE_KERNEL_DRIVER
    StartType = 0 ; SERVICE_DEMAND_START
    ErrorControl = 1 ; SERVICE_ERROR_NORMAL
    ServiceBinary = %12%\usbccgp.sys
    LoadOrderGroup = Boot Bus Extender



  6. Modify USBPORT.INF like this.


    [EHCI.AddService]
    DisplayName = %EHCIMP.SvcDesc%
    ServiceType = 1 ; SERVICE_KERNEL_DRIVER
    StartType = 0 ; SERVICE_DEMAND_START
    ErrorControl = 1 ; SERVICE_ERROR_NORMAL
    ServiceBinary = %12%\usbehci.sys
    LoadOrderGroup = Boot Bus Extender


    [OHCI.AddService]
    DisplayName = %OHCIMP.SvcDesc%
    ServiceType = 1 ; SERVICE_KERNEL_DRIVER
    StartType = 0 ; SERVICE_DEMAND_START
    ErrorControl = 1 ; SERVICE_ERROR_NORMAL
    ServiceBinary = %12%\usbohci.sys
    LoadOrderGroup = Boot Bus Extender


    [UHCI.AddService]
    DisplayName = %UHCIMP.SvcDesc%
    ServiceType = 1 ; SERVICE_KERNEL_DRIVER
    StartType = 0 ; SERVICE_DEMAND_START
    ErrorControl = 1 ; SERVICE_ERROR_NORMAL
    ServiceBinary = %12%\usbuhci.sys
    LoadOrderGroup = Boot Bus Extender


    [ROOTHUB.AddService]
    DisplayName = %ROOTHUB.SvcDesc%
    ServiceType = 1 ; SERVICE_KERNEL_DRIVER
    StartType = 0 ; SERVICE_DEMAND_START
    ErrorControl = 1 ; SERVICE_ERROR_NORMAL
    ServiceBinary = %12%\usbhub.sys
    LoadOrderGroup = Boot Bus Extender


  7. Edit USBSTOR.INF:


    [USBSTOR.AddService]
    DisplayName = %USBSTOR.SvcDesc%
    ServiceType = 1
    StartType = 0
    Tag = 3

    ErrorControl = 1
    ServiceBinary = %12%\USBSTOR.SYS
    LoadOrderGroup = Boot Bus Extender


  8. Create a new file USBBOOT.INF with the following contents:


    [usbservices]

    HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","DisplayName",0x00000000,"USB Mass Storage Driver"
    HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","ErrorControl",0x00010001,1
    HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","Group",0x00000000,"System Reserved"
    HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","ImagePath",0x00020000,"system32\DRIVERS\USBSTOR.SYS"
    HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","Start",0x00010001,0
    HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","Type",0x00010001,1

    HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","DisplayName",0x00000000,"USB 2.0 Enhanced Host Controller Miniport Driver"
    HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","ErrorControl",0x00010001,1
    HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","Group",0x00000000,"System Reserved"
    HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","ImagePath",0x00020000,"system32\DRIVERS\usbehci.sys"
    HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","Start",0x00010001,0
    HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","Type",0x00010001,1

    HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","DisplayName",0x00000000,"USB2 Enabled Hub"
    HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","ErrorControl",0x00010001,1
    HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","Group",0x00000000,"System Reserved"
    HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","ImagePath",0x00020000,"system32\DRIVERS\usbhub.sys"
    HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","Start",0x00010001,0
    HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","Type",0x00010001,1

    HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","DisplayName",0x00000000,"Microsoft USB Universal Host Controller Miniport Driver"
    HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","ErrorControl",0x00010001,1
    HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","Group",0x00000000,"System Reserved"
    HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","ImagePath",0x00020000,"system32\DRIVERS\usbuhci.sys"
    HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","Start",0x00010001,0
    HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","Type",0x00010001,1

    HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","DisplayName",0x00000000,"Microsoft USB Open Host Controller Miniport Driver"
    HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","ErrorControl",0x00010001,1
    HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","Group",0x00000000,"System Reserved"
    HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","ImagePath",0x00020000,"system32\DRIVERS\usbohci.sys"
    HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","Start",0x00010001,0
    HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","Type",0x00010001,1


  9. If you haven't erased the original .IN_ files, do so now.


    erase USB.IN_
    erase USBPORT.IN_
    erase USBSTOR.IN_

    Compress the modified files with cabarc.


    cabarc n USB.IN_ usb.inf
    cabarc n USBPORT.IN_ usbport.inf
    cabarc n USBSTOR.IN_ usbstor.inf

    You'll get 3 compressed files with IN_ extension.



  10. Put these files back into the I386 subfolder of the Windows XP installation folder.

    • DOSNET.INF
    • TXTSETUP.SIF
    • USB.IN_
    • USBBOOT.INF
    • USBPORT.IN_
    • USBSTOR.IN_


  11. You'll need this boot sector (w2ksect.bin) to make your new CD bootable. Put w2ksect.bin inside the main folder containing XP files.



  12. Now, let's burn a new CD containing Windows XP files. Start ImgBurn and select Write files/folders to disc. Click the Browser for a folder... icon and select the folder containing Windows XP files. Then, set up options as follows.










    Insert a blank CD into your optical drive and burn it.



  13. Plug in your USB flash drive or USB hard drive to your computer and run the HP USB Disk Storage Format Tool. On Windows Vista or Windows 7, run it as administrator.




  14. From the I386 folder of XP installation CD, copy the following files to the USB drive:



    • ntldr
    • ntdetect.com

    Then, create a new file boot.ini with the following contents. Put it on the USB drive.


    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect


  15. Run the Partition Table Editor (PTEDIT32.EXE) as administrator. Select your USB drive from Hard Disk pulldown menu.




    Change the type of primary partition on the USB drive from 00 to 80. Click the Save Changes button.



    Partition Information should read FAT16X, Bootable



  16. Remove your hard drive from the computer. Then, connect your USB flash drive directly to your computer.



  17. Change the boot order in the BIOS so that your computer can boot from a USB drive. Typical BIOS options are as follows:


    • USB HDD
    • USB Hard Drive


  18. Insert your new Windows XP CD your burned above and boot your computer with it. During installation, don't format the USB drive. Just leave it as is.



  19. After successfully installing Windows XP on your USB drive, install the EWF or FBWF filter.



Wednesday, October 28, 2009

Ethernet File Transfer between Windows XP and Windows Vista

I found it hard to set up file transfer between Windows XP and Windows Vista using direct Ethernet connection. Sometimes, Windows Vista can see a Windows XP machine, but Windows XP somehow can't see a Windows Vista machine. I connected a PC running Windows XP and a PC running Windows Vista with a Ethernet crossover cable.



Setting Up Windows XP for direct Ethernet connection


  1. Make sure that the following items are enabled in the Local Area Connection Properties dialog.

    • Client for Microsoft Networks
    • File and Printer Sharing for Microsoft Networks
    • Internet Protocol (TCP/IP)

    LAN Properties

    You can open the Local Area Connection Properties dialog by opening Control Panel, Choosing Network and Internet Connections category, clicking Network Connections icon, right-clicking the icon for your Ethernet connection and choosing Properties from the right-click menu.


  2. Select Internet Protocol (TCP/IP) and click Properties. Internet Protocol (TCP/IP) Properties dialog will show up. Click Use the following IP address and specify IP address and subnet mask. Then, click OK to close the Internet Protocol Properties dialog.

    Windows XP TCP/IP Properties
  3. Open the Advanced tab and click the Settings button in Windows Firewall area.

    LAN Advanced Properties
  4. Windows Firewall window will show up. Open the Exceptions tab and make sure that File and Printer Sharing is enabled. Click OK to close Windows Firewall window. Then, click the Close button in the Local Area Network Properties window.
  5. Now connect the PC running Windows XP to a PC running Windows Vista with a Ethernet crossover cable.
  6. In the Network Connections window, click and select the icon for your Ethernet connection. In the left pane of the Network Connections window, click Set up a home or small office network. Keep clicking the Next button until you reach the Select a connection method step. Choose Other. Then choose "This computer belongs to a network that does not have an Internet connection" and click Next.
  7. Make sure that your Computer name is unique. Click Next.
  8. Type a Workgroup name that will be shared with a PC running Windows Vista. Click Next.
  9. Turn on the file and printer sharing. Click Next.
  10. Review your network settings and click Next.
  11. Select "Just finish the wizard." Click the Finish button to close the wizard.


Setting Up Windows Vista for direct Ethernet Connection



  1. Open the Control Panel. Under the Network and Internet category, select View network status and tasks. In the left pane, click Manage network connections. Right-click the icon for your Ethernet connection and choose Properties.
  2. In the Local Area Connection Properties dialog, make sure the following items are enabled.
    • Client for Microsoft Networks
    • File and Printer Sharing for Microsoft Networks
    • Internet Protocol Version 4 (TCP/IPv4)
    • Link-Layer Topology Discovery Responder
    • Link-Layer Topology Discovery Mapper I/O Driver

  3. Select Internet Protocol Version 4 (TCP/IPv4) and click Properties. Click Use the following IP address and enter unique values for IP address and Subnet mask.

    Windows Vista TCP/IPv4 Properties
  4. Go back to the Network and Sharing Center. Unidentified network will be shown. Click Customize and choose Private.
  5. In the Sharing and Discovery area, make sure that you have the following settings.

    • Network discovery: On

      Expand the Network discovery section and verify that the workgroup is the same as with Windows XP.
    • File Sharing: On
    • Public folder sharing: On

      Expand this section and enable Turn on sharing so anyone with network access can open, change, and create files
    • Printer sharing: On or Off
    • Password protected sharing: Off

      To avoid unnecessary problems, check it off.
    • Media sharing: On

Thursday, September 17, 2009

Using GRUB To Boot Windows XP with a Floppy Image

I had trouble booting Windows XP installed in a logical partition. I guess the boot sector of the logical partition was damaged. I had to boot this installation of Windows XP by chainloading from another Windows XP on a primary partition. But without another Windows XP partition, I can boot Windows XP from a floppy diskette although floppy diskettes are not in much use nowadays.



I created a Windows XP boot floppy by following instruciton on this article on the Microsoft site. Then, I booted Linux and made an image file of the boot floppy.


dd if=/dev/fd0 of=ntboot.bin bs=512

Save the image file somewhere in your hard drive. Then, when you start the computer, use the following GRUB commands to boot Windows XP.


kernel (hd0,6)/boot/grub/memdisk bigraw
initrd (hd0,6)/boot/grub/ntboot.bin

memdisk is a part of the syslinux package.


Here's my XP boot image to be used with GRUB or syslinux: ntboot.bin. Before actually using it, make sure to edit BOOT.INI in it.

Wednesday, September 16, 2009

GRUB and NTFS boot sector

After messing with the hard disk partitions, Windows XP installations in logical partitions failed to bootstrap directly. However, I finally managed to boot Windows XP on a logical partition by chainloading from another XP on a primary partition. This required me to edit the file BOOT.INI on the primary XP partition.


I suppose the boot sector of the logical partition is broken. I booted Linux and extracted the boot sector from the primary partition containing Windows XP.


dd if=/dev/sda2 of=xpboot.bin bs=512 count=1

I experimented with this boot sector and GRUB. At boot time, I typed the following GRUB command.


chainloader (hd0,5)/xpboot.bin
boot

This allowed me to boot Windows XP. However, the XP boot sector apparently reads BOOT.INI from the primary partition. I will analyze the boot sector file with an Hexadecimal editor. By studying the NTFS boot sector, I will be able to solve Windows XP boot problems.

Saturday, September 12, 2009

Installing and Booting Windows XP on a Logical Partition

WARNING: Although this post is about Windows, the instruction involves the use of Linux software, such as GParted partitioning tool and GRUB boot loader. If you are not familiar with these Linux tools, please be careful when following the instructions below. I'll add non-Linux instructions to this post later.


You can download Live CD's containing GParted from the following locations:




Copying Windows XP to a Logical Partition using GParted



It is possible to boot Windows XP from a logical partition. First, install Windows XP to a primary partition. Boot your PC with Parted Magic or SystemRescueCD. Start GParted and copy the Windows XP partition to an empty space in the extended partition. You may have to create an extended partition first and then reserve a space inside the extended partition large enough for the new logical partition.



Fixing BOOT.INI for the Windows XP logical partition


Don't reboot yet. Mount the new logical partition containing a copy of Windows XP. To do so, start an Xterm and type something like:


mount -t ntfs-3g /dev/sda5 /mnt
vim /mnt/boot.ini

The BOOT.INI file should be modified so that it points to the new logical partition. Read this article to learn about its format.


[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(0)partition(5)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(5)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /noexecute=optin

Save the BOOT.INI file and reboot.



Changing the Drive Letters with Windows Registry


Reboot with the Parted Magic or SystemResueCD again. When you're at the GRUB boot menu, press C to exit the menu and manually enter GRUB commands. You need to boot to the XP logical partition:


root (hd0,4)
chainloader +1
boot

Right after entering the boot commands, press and hold the F8 key. You'll be shown the Windows XP boot menu. Choose "Safe Mode" to boot to the Windows safe mode. Once inside the safe mode, change the drive letters with the Windows registry editor (regedt32.exe). Reboot to the XP logical partition using GRUB, this time in the normal mode. Check if Windows XP works normally. You can make sure that you're really using the logical partition by reading the C:\BOOT.INI file.

About This Blog

KBlog logo This blog is about current events and issues concerning general population. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

icon
Powered By Blogger