Mar 062015
 

F6 logoThis is a problem I’ve wanted to solve for quite some time now: How to install older Windows on systems with an AHCI SATA or maybe SCSI or SAS controller, when there is no floppy drive and Windows setup won’t recognize any hard drive? Usually, you’ll have to press F6 during the early setup sequence, and then provide the drivers with either a real floppy, or a USB floppy drive that’s on the hardware compatibility list (not all USB floppies work). While adding non-supported USB floppies to any installation disc is possible when using [nLite] (see farther below), sometimes you may not want to build your own image or maybe you don’t have any floppies available, USB included.

What I always wanted to do was to find a way to just use some USB pendrive for this, like it’s possible with newer Windows systems. And yesterday, I finally found the solution. My original attempts to modify the Windows CD itself were all unsuccessful, and today I believe that it is hardly possible to just talk setup into accepting USB pendrives as floppies, unless your systems BIOS can actively mask the pendrive as such. The solution is much more weird than any such modification actually.

But this time around, I won’t dive into the technical details up front, but simply give you the solution first. If you’re interested in how this really works, just read the lower part 3.)!

1.) How to use any USB drive as a F6 floppy medium for storage driver loading during legacy Windows setup

1.a.) Let’s go step by step. You’ll need to be on Microsoft Windows for this. First we need nu2’s bfi.exe[1] plus a few additional files. I have packaged them all together for you in this file: [buildf6]. Please unpack the archive, and enter the newly created folder buildf6\. In that folder you’ll see a subfolder f6\. Put the storage drivers you wish to use to support your target system in that folder. Please keep in mind, that it has to be F6 capable drivers. Usually these are small and consist of a txtsetup.oem file plus some *.inf and *.sys, maybe *.dll files. When you’ve placed all necessary drivers in there, run the floppy image builder script: buildf6.bat. This will create a 1.44MiB image file called f6.img.

In case you put too many drivers in the f6\ folder and it’s growing too large to build the image file, you can also alter the script to have it build a larger 2.88MiB floppy image instead of the 1.44MiB one. Just open buildf6.bat with your favorite text editor, it’ll show this:

  1. @echo off
  2. cls
  3. .\bfi\bfi.exe -v -t=144 -b=boot\boot_sector.bin -f=.\f6.img -o=BCDL.BIN -o=BCDL-IDE.SYS -o=VIDE-CDD.SYS .\boot\chainload_cd .\f6
  4. pause

Simply change the -t option to -t=288 to get a larger floppy image which can hold more drivers.

1.b.) Next thing we need is [Syslinux] to prepare ourselves a bootable and extremely minimalistic Linux system. Actually, it’s not even Linux at all, it’s just a bootloader. The latest version 6.xx can be obtained directly from [here] at kernel.org. Unpack it, launch cmd.exe and enter the following subdirectory of Syslinux on the shell: bios\win32\ or maybe bios\win64\ in case you’re on a 64-bit Windows machine. Plug your desired USB key into the machine. I’ll assume drive letter F: here. Run the following command to prepare your USB drive, and beware – all data stored on it will be lost:

syslinux.exe --mbr --active --install F:

Please copy your previously created image buildf6\f6.img over to F:\, and also copy Syslinux’ bios\memdisk\memdisk file directly to F:\. Don’t create any subfolders, all files belong in the root directory. Now, create a new text file F:\syslinux.cfg, open it with an editor and enter the following:

default 1
 
label 1
kernel memdisk
append initrd=f6.img floppy

Save the file. The contents of the USB drive should now look like this:

Our F6 USB sticks content

Our bootable F6 USB sticks’ content

2.) Run it

Now, you need to put the Windows 2000/XP/2003 CD into the target machines optical drive, plug the USB drive in, and set the systems BIOS to boot from USB. If you’re on a UEFI-based machine, make sure to boot in legacy/BIOS mode. The machine will boot from the USB drive, and then go on and continue booting from the CD, as usual. When the prompt for pressing F6 comes up, please do so. When Windows setup asks you to provide a floppy for the intended drivers, confirm that you’ve already put it in, and setup will magically pick it up. See the following screenshots:

XP x64 accessing the virtual F6 floppy

XP x64 accessing the virtual F6 floppy

XP x64 will now load the Areca SAS controller driver - no real floppies involved

XP x64 will now load the Areca SAS controller driver – no real floppies involved

As said, this even works with Windows 2000. Possibly even with Windows NT 4.0 and older systems capable of booting from a CD, but I haven’t tested systems that old. I tried it with Windows 2000 Professional though, and it just works:

Windows 2000 accessing the virtual floppy drive

Windows 2000 accessing the virtual floppy drive (German)

Windows 2000 will load a Mylex AcceleRAID 352 driver for installation

Windows 2000 will load a Mylex AcceleRAID 352 driver for installation (German)

Just keep booting from the USB stick until setup is complete, so that the virtual floppy drive is present throughout all stages of the installation process. As soon as Windows is completely installed, shut down the machine, remove USB drive and CD, and you’re good to go!

Now, for the addendum…

3.) What’s really going on here

I mentioned that I believe that Windows can’t be tricked into accepting any arbitrary USB drive as a F6 floppy. If possible at all, it’d require a low-level binary hack, as Windows setup is calling the hardware interrupt 13hex to access the floppy drive, which is about as low-level as it gets. And that’s hardcoded… somewhere. For the USB floppy part, well, you can widen the field of supported drives (see even [further below]), but according to my attempts you can’t tell Windows to treat a USB device of class 08, subclass 06 and interface 80 – like a USB pendrive – just like a class 08, subclass 04 and interface 00 device – like a real USB floppy. For more information please refer to the [USB mass storage specifications].

So what we’re doing instead is something much more freakish. The exact process that this solution goes through looks like this:

  1. The system BIOS executes the boot code within the boot sector of the USB drive.
  2. The boot code boots Syslinux’ ldlinux.sys loader.
  3. Syslinux continues to higher stages by loading the Syslinux core module, ldlinux.c32.
  4. Syslinux now pulls our floppy image f6.img into a ramdisk, and executes it as if it was an operating system kernel as specified in syslinux.cfg, effectively chainloading it (It also redirects INT13hex to the virtual floppy, so when any code calls the interrupt, it’ll get to the Ramdisk instead of any real floppy!).
  5. This works, because the floppy image itself has a boot sector that the x86 host processor can execute directly as it’s x86 machine code!
  6. Instead of a real operating system, the virtual floppies’ boot sector now executes BCDL.BIN, a pure machine code executable, which was embedded into the image by buildf6.bat from buildf6\boot\chainload_cd\ together with its CD drivers BCDL-IDE.SYS and VIDE-CDD.SYS which support real IDE as well as SATA optical drives.
  7. BCDL.BIN loads its drivers and chainloads the CD by employing standard El Torito optical drive booting.
  8. The Ramdisk stays where it is, posing as a real A: INT13hex floppy drive until reboot.
  9. Windows setup boots from CD.
  10. Besides BCDL, we also have our required storage drivers on that floppy image. Windows 2000/XP/2003 may now load them by locating and reading txtsetup.oem just as it always did.

It may sound complicated, but once you know what to do and how, it’s a pretty easy and fast process. With nothing but your USB key, the drivers and the installation CD you can set up ancient Windows pretty much anywhere, as long as you still have an optical drive at least. I’d imagine this to be specifically useful for notebooks.

4.) The USB floppy thing – How to add non-supported drives

This is just for completeness’ sake. Should you wish to just keep using a USB floppy, but unfortunately have a newer unsupported one, you can add it to your setup CDs HCL. This requires copying the entire CD off to another Windows machine, modifying a small file and rebuilding a new ISO using [nLite] though.

You can find the file on your installation CD in \I386\ for 32-bit Windows (2000/XP/2003) and in \AMD64\ for 64-bit Windows (XP x64/2003 x64), it’s called TXTSETUP.SIF. Open it with your favorite text editor and locate the following part in the Section [HardwareIdsDatabase]:

txtsetup.sif, USB part of the [HardwareIdsDatabase] section

TXTSETUP.SIF, USB part of the [HardwareIdsDatabase] section

Depending on your operating system, this may be found on totally different line numbers. Now you need to determine the USB vendor ID and device ID of your USB floppy drive. I usually do this on Linux or BSD UNIX by running lsusb (FreeBSD needs the usbutils package for that, # pkg install usbutils). Here is an example with some USB device, not a floppy, but just so you know what to look for, it’s the two 4-letter hexadecimal codes separated by a colon, the first is the vendor ID, the second the device ID:

lsusb showing USB devices on FreeBSD

lsusb showing USB devices on FreeBSD (click to enlarge)

You can also get it on Windows though, just go to “Start\Settings\Control Panel”, and then “System\Hardware\Device Manager”. Locate your USB drive by exploding the USB part of the device tree on the very bottom, right click the correct device and choose “Properties”, then “Details”. Et voilà:

Getting a USB devices vendor ID (VID) and device ID (PID) on Windows

Getting a USB devices vendor ID (VID_****) and device ID (PID_****) on Windows

Patching it in is a simple process of adding an according line to TXTSETUP.SIF, like this:

Adding an unsupported USB floppy device in TXTSETUP.SIF (shown with an invalid non-floppy device here, but it works like that with any unsupported real USB floppy drive).

Adding an unsupported USB floppy device in TXTSETUP.SIF (shown with an invalid non-floppy device here, but it works exactly like that with any unsupported real USB floppy drive).

As said, you’ll have to build yourself a new ISO from that using nLite and burn it to CD. But with that, you can now use any previously unsupported USB floppy drive for F6 driver installations.

5.) Profit

So that’s how it can be achieved after all, and I always thought it to be impossible. It’s quite the obscure method, and its gain in usefulness over nLite driver embedding is maybe debatable, but I believe this can be faster and more flexible. That may be especially true if you have to deal with lots of different machines with different SATA AHCI driver requirements or other storage controllers. Building new ISOs using nLite over and over again can be time consuming after all.

[1] Lagerweij, B. BFI is © 2000-2015 Nu2 productions. All rights reserved.

CC BY-NC-SA 4.0 Installing Windows 2000/XP/2003 without a floppy: How to use any generic USB pendrive as a “F6” medium by The GAT at XIN.at is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

  7 Responses to “Installing Windows 2000/XP/2003 without a floppy: How to use any generic USB pendrive as a “F6” medium”

  1. Hello I find this guide and it may be the solution for my old mb without an useful floppy and an yet xp modded iso, so I should do a great time needing work to begin from zero to insert a new textsetup.inf in iso to make further floppy usb drives working…. your guide may be a solution with the usb pendrive, but even if it not needed I have to insert the drivers of TWO sata controllers, so to not using a second usb pendrive, may you know how to do this that is to say how to differ from textsetup.oem and file disk1 of each of the two drivers (silicon and image and uti)?
    Thank you very much for the attention
    Best Regards

    • Hello Sebastiano,

      While I do not have a solution for you (other than writing your own txtsetup.oem), I would suggest to install only the controller you need during the setup phase of Windows. You’d install to a hard drive / SSD on either the SiI or the ULi controller, but not both. So you only need one of the two. When Windows is set up, you can install the other one normally.

      Is that an option? And if not, why is that, if I may ask?

    • Thrawn, hello. Thank you VERY much for your answer.

      Well: the reason for installing sata controller(s) (SImage or Uli, in my case) during XP install (AHCI mode) is that I always read that (so) there are better performances VS installing XP in emulated PATA mode (I usually did the first option before my floppydrives and usb one were broken), in the second option there is a switching to AHCI mode-install the sata driver(s) after xp install, but I truly sense some lack of performance… so, because I would prepare an optimized XP for the years to come (no problem I have a newer os+pc even for virtualizing, but that XP is for some old hw and software (outlook express, some games…) and for some XP iso tuning-to-preserve, one time for the future… I prefer to optimize as much as possible… and to have ALL ready and working…
      however it is true, as you say, that only one controller is needed, but in case of problem (since the hw is a little old) I want to change the hd (SSHD, in truth) to the other controller for os booting and I do NOT want to meet lack of performances in the tuned XP…

      … This step needs the correct syntax for a single txtsetup.oem for both controllers:
      sum of the lines-renaming something of each one OR how I do not know (…).
      it should be (near) sure about this missing steps, since the same XP install procedure asks different floppy disks to install different controllers and so it is an existing chance (more than one controller to install in F6)…
      Obviously it is a great time wasting to try syntax variations errors… and honestly I am surprised no one was interested about this… (on my little google search…)

      However soon I will have time to format that SSHD and keep your usb method for one controller… or if I keep working another pendrive I may try for the second controller..
      For now, Thank You Very much for the F6 USB option and even for the attention
      At later…
      My regards
      Sebastiano (from Italy)

      • Hello again, Sebastiano,

        Hm, actually, installing a secondary controller via F6 or after Windows is set up should not make a difference at all. I mean, people install lots of storage controllers just like this all the time (SATA/SAS expansion controllers, RAID controllers etc.)

        It’s true however that AHCI is usually the better choice. For regular SATA HDDs you get added features like the ATA NCQ queuing command which helps with lots of parallel I/O. Far more importantly though, you get the ATA TRIM command for storage controllers which support them, so you can TRIM your SSDs (not sure about SiI/ULi on XP, Intel ICH10+ controllers support it if your SSD has a TRIM toolbox that also works on XP, for me it worked with the Corsair SSD Toolbox, the Intel SSD Toolbox, the ADATA SSD Toolbox and Samsungs’ SSD Magician software, all on ICH10R@AHCI). It may also make S.M.A.R.T. monitoring easier.

        So picking AHCI is usually the correct choice.

        Please note that once both controllers are correctly set up and have been provided with drivers within a complete Windows installation, you can swap the boot drive between them without issues. It doesn’t matter if the driver has been installed at a later time (I have done this myself quite a few times, on Windows 2000 and XP).

        But, you know what? Small, slow USB pen drives are cheaper than a single lunch (!). So, just get a second one, and walk the easiest route out of that problem! ;)

  2. With reference to your nice F6 floppy page:
    http://wp.xin.at/archives/date/2015/03
    just wanted to let you know how very similar methods (though using grub4dos instead of syslinux+BCDL) have been used since years, see here:
    http://www.msfn.org/board/topic/154071-f6-without-a-floppy-drive/

    jaclaz

    • Hi Jaclaz,

      I took the liberty of moving your comment over to the actual F6 floppy / USB article, because I think it fits better here, contextually, especially considering the information provided by you. I hope you don’t mind!

      It’s interesting that a very similar approach exists, based on grub4dos. It really seems to be quite the same thing, having the boot loader emulate an INT13hex FDD. Just weird that I didn’t find this solution when searching the web, but sometimes I do just suck at using search engines properly. :roll:

      In any case, thanks for the link! :)

      It’s good to have more than one way to get things done. Also, I’ve lost all hope of finding the DeLock 91671 combo drive, which is an all-USB internal FDD+card reader. That’d also solve the problem decently, maybe with some TXTSETUP.SIF editing.

      There is also another way, one could disassemble a regular USB FDD and pull the USB controller board out of it, then hook it up to the internal connection of say a Teac FD-CR8, as shown here:

      The filming is terrible, but you get the idea. With the correct USB controller board, software modifications might not be necessary at all, at least for XP/XP x64/2003.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">

(required)

(required)