>

How To: Windows XP Mode In...Ubuntu Linux


With Windows 7 due out later this month, many of you are no doubt counting the days until release. I've played with both the beta and RC of Microsoft's latest OS, and quite honestly, I liked what I saw. If this had come out in 2006 when 'Longhorn' was promised, I have no doubt that I would not have switched to Linux (at least not yet).
However, that's not how events played out. What really happened was 'Longhorn' became Vista, and it didn't make it out the door until 2007. It arrived late, buggy, irritating (UAC), overpriced, underwhelming, confusing (licensing), and in some cases, incompatible. Now, almost three years later, and almost five since Longhorn's initially-planned release, Microsoft is releasing the OS they should have launched several years ago. Unfortunately, Windows 7 is also overpriced (slightly less so than Vista), and even more confusing.
But first, let's go over what Microsoft did right. Windows 7 is going to launch when the company said it will launch. Because of a long beta and RC testing phase, 7 is not going to be as buggy as Vista was when it debuted. Microsoft has taken the UAC down a notch. It has also come down on the price a little. The highest edition of 7 (Ultimate) is fifty percent more expensive than the highest edition of XP (Pro). This is opposed to 100% more expensive (Vista Ultimate versus XP Pro). But fair enough, the price did drop somewhat.


Underwhelming, 7 is not. In terms of its user interface, Vista was pretty much XP with a reorganized Start Menu and a black taskbar. Flip 3D was basically nothing more than a choppy gimmick (though the thumbnail previews of windows within the taskbar are pretty sweet; Windows 7 kept them, and I use them in Linux). Windows 7 actually succeeds in terms of a being a unified vision that pays tribute to the brand. Everything is made of glass in 7. Vista began this trend with the transparent glass window borders and the overlaid faux-reflection texture. But 7 really takes the use of transparent glass and reflections to the extreme. The window borders, menus, some applications, and even the taskbar and start menu are all made of glass. New tricks include being able to make all windows transparent to see the desktop. As a total package, Windows 7 has what I consider to be the first true Windows theme.
Finally, we're left with how Microsoft figured out how to solve its backward-compatibility issues.
With the introduction of XP Mode (XPM), Windows 7 will not fall victim to the nightmare of incompatibilities suffered by early-adopters of Vista. XPM is a fully-licensed copy of Windows XP Service Pack 3 running in a VirtualPC Virtual Machine (VM). In many cases XPM is the clincher that holdouts needed in order to finally upgrade. Unfortunately, the confusion created by the Windows 7 licensing scheme has all but ruined their compatibility fix.
XPM is only included in Windows 7 Professional and Ultimate. If you want a full retail boxed copy of Windows 7 with XPM, you're going to have to fork over $300 for Professional, or $320 for Ultimate. If you already own a copy of Windows XP or Vista, you can pay $200 for the upgrade to Professional, or $220 for Ultimate. Let that sink in for a minute.


That's right, Windows 7 Home Premium (and below) does not have XPM. Most systems sold by retailers come with a version of Windows completely lacking XPM. Wait, it gets better. Thanks to Microsoft's ingenious Windows Anytime Upgrade, consumers who bought a new PC with Windows 7 Home Premium can upgrade to Professional for $90 or Ultimate for $140. If you were sold Home Basic or Starter edition, you'll have to first upgrade to Home Premium for $80. Like I said, 'ingenious.' One way or another, you are probably going to have to pay Microsoft some amount of money if you want XPM...
...or not. If you're open to using Linux , you too can have a fast and secure next-gen OS with full XP compatibility, all for free!

begins with the assumption that you've already installed Linux on your system. If you need help with the installation process, go here for a refresher. I do not assume that you have any Linux knowledge, but you should be comfortable with PCs in general.
Test System Specs:

Operating System
64-bit Ubuntu 9.04 “Jaunty Jackalope”
Processor
2.0 GHz AMD Athlon 64 X2
Motherboard
Biostar NF61S-M2 TE
Memory
4GB DDR2-800MHz
Graphics
Nvidia GeForce 6100; integrated graphics, 128MB shared
Storage
250GB SATA 3 Gb/s, 7,200 RPM

The first step to getting your very own XP Mode in Linux is to install virtual machine software. Since the point of this article is saving money, we're going with Sun Microsystem's free VirtualBox as our virtualization software. Click here and choose the appropriate .deb or .rpm file for your Linux distribution. I am using the 64-bit version of Ubuntu 9.04, so I'll need to click the AMD64 link next to Ubuntu 9.04 (“Jaunty Jackeloupe”). You can choose to either run or save the file.
Though it is free, this app is not open-source. This is the version of VirtualBox that contains proprietary code. If you only want open-source software on your system, you can use VirtualBox OSE (Open-Source Edition) instead. You can get VirtualBox OSE from Add/Remove in the Applications menu. Click here if you need a refresher on installing software in Ubuntu via a package manager. You can follow this guide to setup the OSE version, for the most part. Some of the steps will deviate slightly. Also, the screenshots may not represent exactly what is on your screen.


If you chose to save the file, double-click it when downloading completes. Click Install Package, then enter your password when prompted. When the Debconf window opens, just click Forward to continue installation. After the application finishes installing, click Close, and then exit the installer by closing the window. If you wish, you can now delete the .deb or .rpm by right-clicking on it and selecting Move to Trash.






Remember the Debconfig window? Now we have to add you to the list of authorized users in the “vboxusers” group so that any USB devices will work in the Windows XP VM. It's not just your Windows apps that you'll be able to use in the VM; devices too! Now, go to System/Administration/UsersandGroups.


In the user list highlight your user name by clicking on it, then click Unlock. In the screenshot, my user name is Adam Overa.


When prompted, enter your password and then click Authenticate. Now click Manage Groups. Scroll down until you see the group vboxusers, click it, then click Properties.


You should see the user list with check-boxes next to the user name of each user on your system. Check the box next to your user name and click OK. Now click Close, and then Close again. Now we need to log out, or restart for these changes to take effect. Click on your user name on the far right of the upper panel. Select Log Out to go to the Ubuntu login screen, or Restart to reboot.


When you get back to the Ubuntu desktop you can now open VirtualBox viaApplications/SystemTools/SunVirtualBox. Since we are using the free version of Sun VirtualBox, and not the free and open-source version, we need to agree to the license agreement. To do this, scroll all the way down and then click I Agree.


Next, the VirtualBox Registration Dialog window should open. If you already have a Sun Online account, enter your email and password and click Register. If not, you can enter your information and click Register. Alternatively, you can also just click Cancel to continue. Once VirtualBox opens, click on the New button in the navigation bar. This opens the Create New Virtual Machine wizard. Click Next.


In the Name field, enter a name for your new virtual machine. If you plan on having several VMs, name each VM descriptively to avoid confusion (such as “Windows XP SP3 32-bit”). You could also name the VM for its intended purpose, such as “Gaming,” “MS Office,” or “Compatibility Testing.” Under OS Type, you can choose the operating system and version. Since VirtualBox defaults to Microsoft Windows in the OperatingSystem field and Windows XP in the Version field, we can leave it alone and click Next.


Now we must decide how much system memory we want to allocate to the virtual machine. In this respect, the VM is much like a real system; the more memory, the better. You can allocate up to half of your system's RAM to the VM. My test system has 4GB, so I'm going to give 1GB to the Windows XP VM. This will leave the host OS (Ubuntu) with 3GB when XP is running. After you have decided how much RAM to give to your VM, click Next.


Since this is the first time you're running VirtualBox, there won't be any virtual hard disks to chose from. Therefore, we must select Create new hard disk, and then click Next. This opens the Create New Virtual Disk wizard. Click Next again.


On this screen, we are presented with the choice between Dynamically expanding storage and Fixed-size storage. The difference is that Dynamically expanding storage will only take up the amount of space usedby data in the VM. Fixed-size storage immediately takes up the entire size of the virtual disk. With either option, you will need to specify the size of the virtual disk after clicking Next.


The Location field on this page should already be indicating the name that you gave the VM earlier. Using either the text box or the slider, you can specify the size that you want your virtual hard disk to be. Remember, if you chose Fixed-size storage, your real hard disk will lose whatever amount you decide here. If you chose Dynamically expanding storage, this is the maximum amount of space your virtual hard disk will be allowed to consume. I'm happy with the default size of 10.00GB, but you can specify any size that works for you. Click Next.


The Summary Screen will display the type and size of your virtual hard disk as well as it's location on your real hard drive. Verify that the options are correct, and perhaps make note of the virtual disk's location. This is a good idea in case you want to backup, or even take your virtual hard disks with you. When satisfied, click Finish. The more space you've given to Fixed-size storage, the longer this will take. After your virtual hard disk is created, that wizard will close and another summary screen will display the Name,OS Type, Base Memory, and Boot Hard Disk that you selected for your new virtual machine. Verify the information and then click Finish.


Now that we have created a VM (including the virtual hard disk) for Windows XP, we need to tweak some settings. You should be back to the main VirtualBox window with your new VM highlighted. Click the Settingsbutton in the navigation bar to open the settings window for the XP VM.
You'll now see the Basic tab of the General page. Here, you can change the Name, Operating System, andVersion. We just set those options when we created the VM, so ignore this page and open the System page in the left pane.
Now we're on the Motherboard tab, which houses options for adjusting the VM's Base Memory, Boot Order, and Extended Features. We do not need to change any of these options, so click the Processor tab. If you're lucky enough to have a sickening amount of system RAM (enough to give your VM 4GB or more), you will need to check the box next to Enable PAE/NX in order for a 32-bit OS on your VM to address that much. Click on the Acceleration tab to continue.

If your CPU has hardware-accelerated virtualization capabilities, you will want to check the box next toEnable VT-x/AMD-V so that the VM can utilize them to boost performance. If your CPU has nested paging capabilities, check the box next to Enable Nested Paging for another performance boost. If your CPU doesn't have either of these, the selections will be grayed out.



Click the Display option so that we can adjust the Video Memory Size. My PC has up to 128MB of video memory that I can allocate to the VM. You can choose whatever size that you think you'll need. A good rule of thumb is that the more high-resolution gaming you do, the more video memory you'll want to allocate. Also click on the checkbox next to Enable 3D Acceleration if you anticipate any gaming.


Next, click on the CD/DVD-ROM page in the left pane. We need to check the box next to Mount CD/DVD-ROM. Now, check the box next to Host CD/DVD Drive. If you have multiple optical drives, select the one you will use to install Windows XP from the drop-down menu. If you have your Windows XP disc handy, insert it into your optical drive of choice. If your file manager automatically opens after inserting the disc, simply close it.


Before we're ready to install XP, we need to set up a folder to share files between the Linux host OS and the XP guest OS. Click the Shared Folders page in the left pane. First, click on the Add button on the far right (blue folder with green plus sign) to open the Add Share window. Next, click on the drop-down menu next to the Folder Path field, then choose Other. Now, find or create a folder in your Ubuntu file tree where you want data to be shared with your XP installation. I chose the Public folder in my Home directory located at /home/adam/Public. Click Open, and then OK. Wherever you create that shared folder, make sure you remember where it is. Click OK to finish tweaking the Windows XP VM's settings.








Now that we are done configuring the VM's settings and the XP CD is in your optical drive, we can boot the VM for the first time. We are back to the VirtualBox main window and your Windows XP VM should be highlighted. Click the Start button in the navigation bar. A new window will open for the XP virtual machine. After a few seconds of nothing, and maybe a window resize or two, the familiar blue screen of Windows' pre-installation will appear. When you first press a key with the VM window selected or click the mouse inside of it, a Keyboard/Mouse capture pop-up window may appear. You can decide to read it or not before you close it; in a few pages, you won't need to use the Host key anyway.


From here, you can install Windows XP as you normally would. In a nutshell: Enter, F8, Enter, Enter, Restart. As long as the XP VM window is the currently selected window, any keystrokes will register in the VM and not in your host OS. When the VM reboots, you should be in the XP graphical installation that we all know and love.


When the loading stops, the Regional and Language Options need to be dealt with. To use your mouse in the VM, left-click once anywhere inside of the VM window. The mouse is now being used by the VM and not the host OS. Also, its movements are restricted to inside the VM window. The little mouse icon directly to the left of Right Ctrl has been filled with color to indicate the mouse is bound to the VM. Press the right Ctrlkey (that is, the Ctrl key on the right-hand side of your keyboard) in order to unbind the mouse and return it to the host OS.


Now that you know how the keyboard and mouse interact with the VM, go ahead and finish the graphical installation of XP. Basically: Next, enter name, Next, enter product key, Next, Next, time zone, Next, Next,workgroup name, Next. After another pause, the graphical installer will perform another reboot. Do Not"press any key..." to boot from CD-ROM if prompted. That will only result in going back to the beginning of the installation.


The familiar Windows XP loading screen should be showing up. If you are asked to resize the screen, clickOK and then Yes. If all went well, the VM's window should become larger. If not, don't worry, we'll be changing it later anyway.


Depending on your edition of Windows XP and how old the CD is, another phase of the graphical installer may appear. Follow it until you get to a working desktop. There should be some music, and the little help icon in the lower-right should also be making sounds. Note: If you don't hear any sound, or if the sound comes out garbled, you'll need to tweak your VM audio settings later. Finish the graphical installation first.


Whenever you do get to your first working desktop screen, as with any other Windows installation, update the operating system before proceeding!


Installing Guest Additions
With Windows XP updated and booted, it's time to install some VirtualBox optimizations. Unbind the mouse from the VM by pressing the right Ctrl key. Click on Devices in the menubar of XP's VM window, then clickInstall Guest Additions.


The Sun VirtualBox Guest Additions setup screen should open. Rebind the mouse to the VM by left-clicking anywhere on the Windows desktop. Click Next, I Agree, and then Next again. Check the box next toDirect3D Support (Experimental) if you plan on utilizing DirectX 3D graphics. Click Install to begin copying the Guest Additions files to your VM. When Guest Additions is done installing, click Finish to reboot.


After Windows has rebooted and you're back to a workable desktop, a VirtualBox icon will be in the notification area of the taskbar. If you had previously resized the desktop's resolution, it may have reverted back. Also notice that your mouse is now able to move between the VM and host OS without clicking or using the Ctrl key. This is called Mouse Integration and is part of Guest Additions. It can be turned on and off from Machine in the menubar, or by pressing right-Ctrl+I.


Sharing Files
Remember the shared folder we designated when we tweaked XP's VM settings? You're going to need it now. Navigate to the shared folder in your Linux file manager (mine was the Public folder in my Home directory, /home/adam/Public). This is where you'll put files from Linux (the host OS) that you want to share with Windows XP (the guest OS). This is also where you go to receive files from XP to Linux.


To make files from Windows XP available to the Linux host, or to receive files from Linux in XP, you need to first boot up the XP VM. In this step, the sequence must be followed to the letter. This is very easy to get wrong, and a misstep will result in you starting over.
Follow the mouse pointer in the screenshot below for easy reference. From the Start Menu, open My Computer, then click My Network Places in the Other Places sidebar. Next, click View workgroup computersin the Network Tasks sidebar. Now, click on Microsoft Windows Network in the Other Places sidebar. Click on Entire Network again, in the Other Places sidebar. Now, there should be an entry for VirtualBox Shared Folders in the window. Double-click it.


Your shared folder should be there, listed as \\VBOXSVR\"folder name.” For example, mine is\\VBOXSVR\Public. Since it's such a hassle to go through the XP file manager's sidebar to get here, it's a good idea to put the shared folder in your Favorites. Just click Favorites/Add to Favorites when you're inVirtualBox Shared Folders. From now on, you can get to the VirtualBox Shared Folders directory fromFavorites in Windows Explorer.
Now you'll be able to easily transfer files between the Linux host OS and the XP guest OS.

0 comments:

Post a Comment