Thursday, December 13, 2007

How To Boot XP On The XO Laptop


Okay, this is usually a little beyond the depth I'd go into on this site, but given that the window for buying/giving an XO laptop within the U.S. and Canada is closing December 31st, I think any attention I can help bring to this little wonder is worthwhile. And everyone else is busy interviewing Nicholas Negroponte, so I thought I'd try something a little different.

Now, that initial waiver out of the way, here's another: I don't actually have one of these little marvels (although if anyone wants to send me one, I'd be very happy to set my kids on it). This tutorial will be entirely theoretical, and will depend largely on how Windows-compatible the laptop actually is. Since most hardware was designed with Windows in mind, this shouldn't be much of an issue, right?

Step 1
The very first thing we're going to need for this project is an SD card large enough to hold XP and your applications. About 4GB should be enough for basic functionality. Here in Canada, that goes for about $80 or so, but when the price drops to the right point, this may be feasible for the OLPC requirements.

Step 2
How do you get XP onto a laptop that has no CD/DVD drive? External USB CD-ROM drive sounds about right: another $80 and we're off to the races (okay, I'm not trying very hard to find the best price, here; just trying to make a point).

Step 3
Run your favourite virtualization software on the laptop (qemu is free and works fairly easily; VMware player is another option) and use the SD card as your hard drive.

Step 4
Boot the CD in the virtual environment, with settings to match the actual hardware as closely as you can; pay particular attention to the ACPI, APIC and APM settings. A default install should get things going initially.

Step 5
A long time after, you'll have an OS on an SD card. With the processing power of these guys, it may take a while to get the right configuration just to finish the install. When you've got the OS shoehorned in there, it's time to play with the bootloader: GRUB. Assuming you can set the unit to boot from SD, the unit should appear as one of the bootable hard drives in the BIOS. If so, add in a new stanza to your GRUB configuration to include:
title Windows XP
rootnoverify (hd1,0)

makeactive

chainloader +1


That should do it. Now, here are a few reasons why this will fail.

  1. Not all SD cards are created equally. Some cards will be recognized and boot without issue. Some won't. And then there are the ones that work sometimes and with specific configurations.
  2. XP booting from a "normal" PC using an SD card as the boot device is reportedly slow. So slow that boot times on this low-end PC would be intolerable, especially for a 6 year old.
  3. By running XP on these devices, things like remote control, mesh networking and the built-in sharing mechanisms would need to be entirely recreated and made to work with a product Microsoft is in the process of abandoning.
  4. XP would have to be made to work seamlessly with the existing Sugar interface to ensure interoperability with units running the default setup. While the open source nature of the operating system and applications provided on the XO laptop enable this, Microsoft would have to accept working with a true open source environment in order to make this happen.
  5. As noted above, the additional costs required to support this configuration from the user's perspective almost double the price of the laptop. And then you're probably going to want to bump up the RAM, too.
What's your take? Is it really worth the effort to put XP on the XO laptop?

[Note: This piece was written well before Microsoft achieved shoehorning XP onto any XO laptops. It was written mostly to attract attention to the XO, which is still a fabulous little device that shows great promise for lowering the costs of computing in underdeveloped nations. I strongly believe XP on an XO laptop is a bad idea. As some of the comments point out, there are further reasons this particular method will not work; basically, Windows XP is not as flexible as Linux. The XO does not use LILO or GRUB and requires a custom Linux kernel to boot. I've seen Ubuntu booted from an SD card on an XO laptop, and it was quite a nice experience. Ordinary users can't just "recompile" XP to fit.]

13 comments:

Anonymous said...

being totally theoretical i really don't see the point. untested therefore worthless. sorry.

Webmaster said...

The unit has 1GB of Flash RAM and 256 MB RAM. I really don't think XP is a good option for this device, whether it currently ships with an SD slot or not. This article, if you read it carefully, actually tries to point that out. This laptop is for the underprivileged children of third world nations; not folks who can run out, grab a huge SD card and USB CD-ROM and fiddle with that machine.

Even Microsoft's field trials will amount to the same result: without using the "native" OS of the device, the whole point is lost! No matter how much additional RAM, storage or processing power you throw at the problem. XP is not suited to this task, no matter how slimmed down.

Anonymous said...

This article seems to be riding of the assumption that the limited computing power of these low power laptops could support the power hogging ability of a fully version of Windows XP. I find it doubtful that the ideas expressed would work out int the end because Microsoft can't get a stripped down version of WinXP to run on this laptop. And, if anyone could do it would it be worth it? Could you actually run anything but the OS? Would there be enough ram and CPU horsepower to adequately run any useful applications?

Anonymous said...

the xo laptop won't boot from SD. thats why M$ has 40 engineers working on it - they have to change the bios!

aristos_achaion said...

It seems silly...the XO has ground-breaking security and power-management features; why would anyone throw that away for an insecure OS that doesn't work particularly well in the best of times? There's not much of a point to the little thing if the mesh networking doesn't work, anyhow.

Anonymous said...

Now where are all those kids in third world countries going to get Windows XP? Oh, yea from pirate CDs, so you sir are advocating software piracy.

Anonymous said...

thought m$ was relentlessly promoting vista... good to see them spend resources due to the fact they didn't adopt open standards in the first place!

they only want to say that OLPC is "windows-capable". they know they can't render this little thing usable by using windows. reminds me of "vista-capable" campaign! another brick in the wall!!!

Webmaster said...

I would never advocate piracy. [sarcasm]When Microsoft begins to sell $10 Windows XP SE (super-slim edition?) CDs to these poor children who would probably rather eat than buy a bloated OS for their slim, functional laptops, this will be a helpful tutorial for them[/sarcasm]. And I would truly hate to see a "Windows Capable" sticker deface any part of one of these laptops. I'd much rather see Tux, a Ubuntu logo, a Fedora, etc.

Freedom said...

congrats on getting the page hits you desired, but, we won't be returning here, as any site with a title of "Good Computing", well it just seems it should be "Stupid Computin'" or "Stupid Computing" or "We are indirectly funded by Microsoft and are testing the potential arguments that will be presented once the MS engineers figure out how to run XP on the XO" or ... .

Well, it's time for British Comedies here in the US on a Saturday evening, that, although after a hideous number of reruns, will provide more enjoyment than this drivel...

Cheers!

Anonymous said...

Why does everyone want to be jerks? Just because YOU don't want XP on your XO doesn't mean someone else won't be interested in the novelty. I just got my XO laptop and I would like to run everything I possibly can on it. It doesn't matter who made the OS, I like toys and I want to see my toy do more than what it was designed to do. It's like OS X on a Dell pc, or perhaps on a Mac SE/30. There's a novelty to it for us geeky types.

FYI, the plan is to get Windows XP Embedded Edition (or whatever it's called) onto these laptops eventually.

If you don't like geeky things or to push the limits of your toys, stfu, kthx.

Webmaster said...

Just a final note on this post (which I will probably remove soon, due to it's irrelevance): since the unit is not presently designed to boot from SD Cards, using it to bootstrap any OS just won't work; you'd need to find a way to put at least part of the Windows XP loader into the Flash RAM. Something like a reverse "lilo" perhaps?

The point still remains, though. Loading XP on this marvel will cripple it's usefulness.

saskboy said...

Wow the hostility in these comments is really shocking for such a blog post.

Denver Gingerich said...

These instructions will not work at all on any OLPC XO-1s in the wild. Windows does not run on the XO-1 without modifying the XO's default firmware.

By default, the XO ships with Open Firmware and does not include ACPI support or a VGA BIOS. These functions are provided by a modified Linux kernel instead. As a result, by default the XO cannot boot Windows or even a normal Linux kernel for that matter. It will only boot a Linux kernel specifically built for the XO.

Microsoft did get Windows XP running on the XO, but only by creating a legacy BIOS for it with the help of Insyde Software (discussed 24 seconds into this video). As far as I know, this BIOS is not publicly available. Thus, you cannot run Windows on a stock OLPC XO-1.

Incidentally, the XO-1's lack of a BIOS is also why installing a mainstream Linux distribution involves extra steps. You need to copy an XO-specific kernel to your installation and create /boot/olpc.fth to show Open Firmware where the kernel is. The XO does not use GRUB or LILO; it boots the Linux kernel directly from Open Firmware.

Please add a large note to your post explaining that your instructions will not work (and perhaps why) or do something else to ensure that people are not misled into believing that they can install Windows on their XO-1.