DefinIT Because if IT were easy, everyone would do it…

14Mar/080

Installing Windows XP without a CD drive

Posted by Sam McGeown

When the Dell engineer said “they’ve asked if you can reinstall the OS” my heart sank. Not because I felt like he was weasling out of work - unusually they were very helpful. Not because installing XP is a hard task, I’ve done it over 100 times on all sorts of hardware.

No, the reason I let out a sigh was because this particular laptop, the Latitude X1, has no internal CD/DVD drive. I also did not have a spare USB one to hand. I did however, have a USB floppy drive. After 2 weeks of trying this off and on, I can tell you that there is no definitive “this will work”. I have tried countless USB flash drive methods and generally had no success (this is more to do with missing the “DOS can’t read NTFS” step below I think).

So without further ado, here’s my final and successful method for Installing Windows XP without a CD drive.

I used the following:

Set the BIOS - As obvious as it sounds, you need to set your BIOS to boot from USB, generally you need to enable that functionality AND change the boot order or you’ll get your HD boot.

Share the i386 - You can do this any way you like, personally I shared the entire CD drive of my 2nd desktop because I wanted some of the extras too, but you only need the i386 folder. Use as little security as you feel comfortable with, and remove the share once you’re finished.

Create the boot floppy - On your 2nd computer, plug in the USB Floppy and insert your first disk; format the disk using the “Create an MS-DOS startup disk” option. Once you’ve downloaded the Universal TCP/IP Boot Disk from the link above, unzip it somewhere and run the MakeDisk.bat. Follow the easy instructions to create your boot disk, label it and set it aside for now.

Create a utility floppy - Download SMARTRIVE.EXE, Aefdisk, XCOPY.EXE and XCOPY.MOD onto the second floppy. Label it and set it aside.

Boot the floppy - On the machine to be installed, boot to your Universal TCP/IP boot disk. Follow the instructions until you get to the command prompt. Switch floppies and copy SMARTRIVE.EXE, Aefdisk, XCOPY.EXE and XCOPY.MOD onto the ram drive (N:).

n:\> copy a:\*.* n:\

Create your partitions - Using Aefdisk you can now go ahead and create your partitions, I want a 1GB FAT16 partition to install from (you could at this point install from the network without copying the CD across, but next time you wanted to reinstall you’d have to go through all of this again). The rest of the hard drive is going to be NTFS ready for the install.

*WARNING THIS WILL DELETE YOUR EXISTING PARTITIONS*

n:\> Aefdisk 1 /delall /formatfat /pri:1024:6 /ext:0:7

Woah woah woah! What’s all that?! The command runs “Aefdisk” on hard disk “1″ with the “/delall” flag, which deletes any exisiting partitions, “/formatfat” which formats the next partition FAT. “/PRI” is a primary partition, “:1024″ is the partition size, “:6″ is the hex partition type which in this case is FAT16 >32mb. “/ext” is an extended partition, “:0″ tells it to use all remaining space on the drive, “:7″ is the partition type which is NTFS.

Connect to the network share - Using the “net use” command you can now connect to the share you created earlier. (I’ve shared the CD drive as D on my machine “test-xp”)

n:\> net use f: \\test-xp\d

Running SMARTDRV.EXE - You don’t *need* SmartDrive, but it will speed up your installation A LOT. I didn’t run it the first time I tried this and after 24 hours it still hadn’t got past the text based part of the install. With SmartDrive it installed in less than an hour. When you run it the first time there is no output, it’s just loaded into memory. If you run it a second time it will give you a status display.

n:\> smartdrive.exe

Copy the i386 - Now using XCOPY.EXE you can copy the i386 (or the whole CD) to your installation partition, which should now be located at c:\. I copied the entire CD because it has some extras I required.

n:\> xcopy f:\ c:\

Running setup…or not! - Finally, you’d think it was all plain sailing from here, but there is just one final gotcha - if you run “c:\setup.exe” you will get an error message because it’s a Win32 application and won’t run in DOS. Don’t worry though, the you can run c:\i386\winnt.exe to begin the process. The familiar blue setup screen launches and it’ll ask you where the setup files are, make sure it says “c:\i386″ and off you go!

n:\> c:\i386\winnt.exe

And finally… - It is possible to complete this process on a USB Flash Drive, all you need to do is make the flash drive bootable (using this HP Utility has worked for me), copy the files from a boot floppy and then carry one from there.

 Hope that helps!