Samstag, 19. April 2008

Putting Windows XP on a SD-Card

I wanted to test Windows XP on my EeePC but didn't want to loose my fine-tuned Ubuntu on the internal SSD. My first try following some guides on the net wasn't successful, Windows always wanted to modify data on the SSD. So I had to mix up things I found on the net to finally get it to work. I have Windows XP booting of an SD-Card in the internal card reader now and had not to destroy any data that was already on my EeePC. The information about how I got it to work might be useful for others as well so I decided to write down what I did.

What do you need for that?

* A Windows XP installation CD and a valid key, of course.
* An external USB-Drive (can be a USB-Stick, but a USB-HDD was my "sure bet")
* For making the USB-Drive bootable you can use the HP-tool which is included in the BIOS-updater-archive from Anarethos
* Microsofts CAB-SDK
* The Hitachi Microdrove driver for pretending that the SD-Card in the Card Reader is a harddisk / fixed drive
* Drivers from the EeePC-DVD
* You may need this hotfix for support of SDHC cards with more than 4 GB capacity from Microsoft
* For changing the display resolution to for example 1000 x 600 pixels (scaled, but quite readable): AS-Tray Plus

Some of these tools stem from users that I don't know and therefore can't trust. I scanned all the executable files I used from them with Virustotal to make sure they aren't infected with a backdoor or something similar. Of course the files aren't guaranteed to be clean, but as all those virus scanners didn't find anything suspicious it made me feel a little better. Since those archives and tools are updated every so often, you should scan them as well before using them.

First, I created a partition which is a little bit smaller than my SD-Card on the USB-HDD, in my case I used a 3800 MB FAT32-partition. To make the USB-HDD bootable, I used the HPUSBF.EXE from the BIOS-Update-Tool-Archive. The syntax in my case was:

hpusbf.exe <drive-letter of my USB-HDD> -FS:FAT32 -B:<drive letter and full path to the unpacked BIOS-Update-Archive>\Boot -Y -Q

i.e.: hpusbf.exe F: -FS:FAT32 -B:D:\EeeBIOS\Boot -Y -Q

Then I copied the i386-folder from the Windows XP installation CD to my USB-HDD. There I changed the files DOSNET.INF, TXTSETUP.SIF,
USB.IN_, USBPORT.IN_ and USBSTOR.IN_ according to the description in this guide from Ngine (starting at point 4 of the guide) and created the new file USBBOOT.INF. After applying the changes I copied the modified and newly created files into the i386-folder on my USB-HDD. Some people seem to use a tool called XP3eSD which should do that patching automatically, but it didn't work for me. Although I found the correctly modified files in my users temp-directory – you might want to try that if that patching by hand is too much of a hassle for you.

Another hint I found was to put the files boot.ini, NTDETECT.COM and ntldr to root directory of the USB-HDD. The Windows-Installer will accept a drive with those files in the root-directory as installation-target. You can use an empty boot.ini, or copy the file from an existing Windows XP installation. Using this configuration will install Windows XP, but it'll take ages. So I also placed a tool which was useful back in those good old DOS times on the drive as well: smartdrv.exe.

Now you're ready for booting from the USB-HDD and to install Windows XP to it. You have to press the "ESC"-button after powering on the EeePC and get presented a boot-menu where you can choose of which device you want to boot from. Choose the USB-HDD. At the DOS prompt, enter smartdrv. To start the installation, enter i386\winnt.exe. This will start what looks like a usual Windows installation. You have to select where the source files are though and where you want to install Windows XP – both times choose the USB-HDD.

After the installation is finished, you should remove the i386- and the boot-folder. You should also convert the drive to NTFS; I didn't encounter any problems with the journaling capabilities of NTFS. Windows will complain about the missing swapfile. You should disable swapping entirely by choosing "properties" after a right-click on "My Computer". You find the settings on the advanced-tab of the Performance Options, select "virtual memory" there and make it use "no paging file".

At this point you should make a snapshot of the partition as the following changes will destroy the possibility to boot the installation of a USB-Stick or USB-HDD. Also, you can use that image to apply for example the upcoming Service Pack 3 for Windows XP. I booted into linux and made sure the Windows-partition is unmounted and used dd for the backup:

dd if=/dev/sda of=/mount/backup/eeewin-bootsector.iso bs=512 count=1
dd if=/dev/sda1 of=/mount/backup/eeewin-usb-hdd.iso

Then I went fetching a coffee and watched an episode of The Simpsons – creating that image of the partition may take a while. After that, you can boot into Windows again. Now you need that Hitachi Microdrive driver. The download can take a while even if the driver is extremely small. Extract the driver.

Run regedit and go to "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\USBSTOR\". There should be a subtree called "Disk&Ven_USB2.0&Prod_CardReader_SD0&Rev_0100". Double click the key "Hardware ID" on the right pane and select the first line and copy it. Now open the file cfadisk.inf from directory where you extracted the Hitachi Microdrive driver to. Remove all entries in the section "[cfadisk_device]". Add a new line which starts "%MicroDrive_devdesc% = cfadisk_install," and paste the copied line from the registry in there. Save the file.

Now you have to open the device manager. In the "disk drives" section you should see the SSD as SiliconMotion and the USB2.0 Card Reader. Right-click on the Card-Reader-entry and choose to update the driver. You have to select a manual installation and force the installation of the .inf-File that you just changed. Now the driver gets installed.

If you reboot now, you could run into the problem that Windows won't start from the USB-HDD anymore. So now boot into linux again and copy the Windows partition from USB-HDD to the SD-Card. I used GParted which I installed from the Ubuntu repositories. You can copy the whole partition with that to the SD-Card and after that resize the partition to completely use all space on the card.

The SD-Card might not boot yet. So it's time to copy the boot-sector over to it:

dd if=/mount/backup/eeewin-bootsector.iso of=/dev/sdc

Make sure that the SD-Card really is /dev/sdc. You can do that by checking the system messages with the command dmesg at the console. If you have done all that you can unmount and unplug the USB-HDD and boot from the SD-Card and fine-tune your fresh installation. You might want to run Windows Update for example. After applying all updates you should delete the directory \Windows\SoftwareDistribution\Download. You may remove all those $NtUninstall-folders in \Windows\ as well. That'll save about a whole GB of space on the SD-Card.


V hat gesagt…

As far as I know flash cards have a much shorter life time - the number of rewrites is drasticaly limited as compared to a HDD.
And Windows is constantly writing stuff to the disk, so yes, Windows can run from the card, but how long before Windows trashes the card? Several weeks I guess.

Steph hat gesagt…


Thank you for your tutorial. I am trying to follow your instructions to install WinXP on the SDHC card, using a USB Key (instead of a USB HD).

I have a question on this part : "After the installation is finished, you should remove the i386- and the boot-folder" : what do you mean by "the boot folder" ? I don't find any "boot" folder on my USB Key.


Wesley hat gesagt…

If you do try this you need to disable the disk catch because you will kill kill kill your SD card as well as drastically reduce the speed of your install,

Use TinyXp as it will allow you to install directly to the card and has a reduced foot print so it will require less ram, making up for the lost disk catch.

I have it running dual boot on my NC10 (320gb Mac / 16gb SDHC Win TinyXp)

first resume hat gesagt…

I had a boot folder on my USB flash drive.. I'm not sure what it means that you don't have it

Christina Gomes hat gesagt…

A valid key is necessary and drive for Eeepc as well.
student loan

Split Testing hat gesagt…

This is a really good read for me, Must admit that you are one of the best blogger I ever saw.Thanks for posting this informative article.

gym marketing ideas hat gesagt…

HI Koepi. This is so cool. I now learn another innovation from you. Thanks so much. I will try installing Windows XP on my SD card.

Virtual Assistant Services hat gesagt…

You really make it seem so easy with your presentation but I find this matter to be really something that I think I would never understand. It seems too complicated and extremely broad for me. I’m looking forward for your next post, I will try to get the hang of it!

How to get Rid of Allergies hat gesagt…

Great post, very informative. I think a lot of people will find this very useful.Keep post in coming future as well!!!

Biotin Hair Growth hat gesagt…

Good day! I never thought this is going to be possible. We are really in a world of miniaturization.

hair and beauty supplies hat gesagt…

Hi. Miniaturization is also applicable to Windows programs huh? Truly cool.

mischy hat gesagt…

fitness centers minnesota

Hi Koepi. With this in mind, the time will come when USBs will soon be not available on the market. What an improvement.

ngft hat gesagt…

It really necessary to learn from your mistakes, if you don’t it means that you will not survive longer.

weight loss programs mn hat gesagt…

To err is human to forgive is divine. I really like that phrase. This is in response to the above comment.

Business Plan Writers hat gesagt…
Dieser Kommentar wurde vom Autor entfernt.
Business Plan Writers hat gesagt…

Wow! That’s quite a read. I really appreciate this post, because it’s really an impressive work. You provide useful information.

Business Plan Writer

Marry Jones hat gesagt…

I never read such beautiful article before. This article is very unique and full of surprise. I nver read this kind of article that is straighforward when regarding to the topic. Very intense kind of writing. Keep up the good and unique article writing.

business plan writing service | business plan writers

Marry Jones hat gesagt…

hey buddy,this is one of the best posts that I’ve ever seen; you may include some more ideas in the same theme. I’m still waiting for some interesting thoughts from your side in your next post.

business plan service

Interactive Presentation hat gesagt…

I just wanted to throw you a big thanks you cleared up some things for me!
Great post, very informative. I think a lot of people will find this very useful.

Audience Response System hat gesagt…

I do agree with all the ideas you have presented in your post. They are very convincing and will definitely work. Still, the posts are too short for novices. Could you please extend them a little from next time? Thanks for the post.

website hosting australia hat gesagt…

Overall an end user friendly site, several great points! It is a well crafted article, I’m going to make an effort to read others. With Respect

Eagan Fitness Center hat gesagt…

This is now definitely what I have been searching for and I have bookmarked this blog page as well, I’ll be back soon to look at with the new post.

casino online hat gesagt…

I always thought inquisitive, as a consequence of the writer for one web page, that he or she limitations fine, That we thought from a what kind body So i'm pretty pleased.

J Gateway Condo hat gesagt…

Amazing items, as a consequence of the writer approximately their own attempt, for just a significance of their t shirt but additionally having the capability to satisfaction your ex visitor approximately year min in any case, an enormous as a result of him. J Gateway Duo Residences

Anonym hat gesagt…

Id really love to stay around this website and be a part of where I can get a lot of valuable and beneficial advice from other experienced people that share this information. Thanks for helpful guidelines and basically excellent info Corals at keppel bay Duo Residences

Anonym hat gesagt…

Excellent information on your blog, thank you for taking the time to share with us. Amazing insight you have on this, it's nice to find a website that details so much information about different artists. The Skywoods Kensington Square

Anonym hat gesagt…

It shows how well you understand this subject. Bookmarked this page, will come back for more. The Glades Tanah Merah hat gesagt…

Magnificent website page, the girl's tshirt ended up being pointed out rather systematically or even totally. Nonetheless some motives Appraisal but still discussion belonging to the blogger, and being a statements already have it subjected now - it is a rarity, the writer, consequently ended up being designed to chat and in many cases that they becomes aware of to them, and also my own, personal conversation this time are usually ineffective.

Betty Hall hat gesagt…

This can be a great sound judgment post. Worthwhile one who is merely seeking the means relating to this element. It's going to undoubtedly help teach me personally. Betty Hall

Anonym hat gesagt…

It shows how well you understand this subject. Bookmarked this page, will come back for more. The Panorama

论文网站 hat gesagt…

Fine website page, Let me notify your pet friends and neighbors, and perhaps this will help to all of us have learned to additional manufacture the create as well as the easiest way to show the litigant. I always even so savored the woman opening from the destination as well as I am sure to test out the girl's firms from the net specialit.

Pass bee Media wallet hat gesagt…

Identity love to be with this website and be a part of wherever I could find many beneficial and effective advice Pass bee Media wallet coming from additional knowledgeable folks that reveal these records. Thanks with regard to helpful rules and in essence fantastic details.

Pest Control Houston hat gesagt…

Nice blog site! I discovered the item whilst surfing around with Yahoo Reports. Have you got virtually any tips on how to get shown inside Yahoo Reports? I've been attempting for a short time although My partner and i in no way manage to get there! Be thankful.Pest Control Houston

Incontri Ticino hat gesagt…

This post reflects what many are thinking but are have no platform from which to voice. You allow us to do that collectively. Great post. Incontri Ticino

Watercolor Paintings for sale hat gesagt…

I would have to get one of the many from my TBR list so the next in line is Sweet Evil by Wendy Higgins. The list is extremely long!Watercolor Paintings for sale