Get the best of both worlds: How to convert your systems to Linux, yet still run Windows applications.

InformationWeek Staff, Contributor

September 30, 2004

12 Min Read

System Setup

To give you an idea of what you'll need, here's the hardware configuration I tested for this Recipe. You don't need the same gear, but you should have something fairly equivalent.

  • CPU: AMD Duron 900 Motherboard: PC Chips 810LR SiS630/730 chip set. This is a last-generation motherboard; it uses 168-pin DRAM, not DDR. Hard Drives: Samsung 40 MB (existing Windows drive), Maxtor Diamond Star Plus 9 160 MB (new Linux drive++ duplicate for backup) Printer: Lexmark Z605 (USB) Scanner: Canon LIDE30 (USB)

And here's the software configuration I used:

  • Linux distribution: Fedora Core 2. Windows emulation environment: Win4Lin. Windows version: Windows 98SE

Where to Find Windows 9.x

The cheapest legal way to do this is borrow a friend's or business install CD, burn a copy, and buy a no-media license, which is basically a official MS license with an unlock code. I strongly recommend you stay legal with this. While the following are packages with CD media included, the no-media licenses are easy enough to find:

When you search for 9.x, most of what you'll find are going to be these licenses. Using Windows ME, OEM, and add to shopping cart as keywords, I turned up:

Microsoft Windows 98 2nd Edition SE 2.0 OEM Full Version Windows 98 - for install on New PC: $91.00 on Trustprice.com.

Microsoft Windows ME Millennium Edition DSP OEM Single Pak: $92.00, also on Trustprice.com.

Microsoft Windows 98 SE Second Edition Operating System (Retail CD & Keycode): $56.70 at ComputerSystems2Go.

Microsoft Windows Millennium Edition Compaq OEM CD: $42.88 here.

I've never done business with any of the above vendors personally, so check them out the same way you check out any other online vendor before buying. Also, other keywords might turn up better prices.

Choosing a Linux Distribution

For this Recipe, I used Red Hat Fedora Core 2, which can be considered Red Hat 11. I picked it for three reasons: I had video problems with Red Hat 9 (couldn't get past 800x600); I knew that USB support is improving rapidly in the Linux environment; and I wanted my scanner and printer supported. So I actually looked for something with a more recent version of the Linux kernel, which will be properly supported in Win4Lin shortly after this article appears.

As for which distributions you should use, some are available with pre-installed Win4Lin-enabled Linux kernels. FC2 is not one of them, and some of the problems I had when installing Win4Lin is based on my use of a distribution that wasn't prepared in advance to support it.

Distributions with preinstalled Win4Lin kernels include Linspire, Xandros, and Gentoo. Netraverse customer support also mentioned that they've had good experience with Mandrake, too. Check the latest information on supported distributions at the Netraverse site.

I do not recommend Linspire, however, despite its ease of use. Linspire's default setup replicates a major security mistake Microsoft made with its Windows 9.x operating systems: It has the user running as root (equivalent of System Administrator level in Windows 2000/XP/2003) at all times.

Installing Linux

The most important thing you can do to ensure an easy, trouble-free installation is to make absolutely certain that your hardware and peripherals are compatible with the Linux distribution you intend to use.

To be sure, check the "hardware compatibility" lists at the Web sites of each distribution. NEVER take the hardware vendor's word for Linux compatibility! The main problem is drivers. The supplied or downloadable Linux driver may be for either a Linux distribution no longer in use or one that is incompatible with yours.

Before you install Linux, note that I recommend the KDE desktop. Its applications appear to be easier to use and more functional than the Gnome desktop. So when your distribution gives you a choice during install, pick KDE. If you're using Red Hat/Fedora, have already installed the Gnome desktop, and would like to change to KDE, view this LinuxQuestions.org page. Otherwise, google or check your Linux distribution's vendor site.

To install Linux:

  1. Obtain a CD/DVD copy of whatever Linux distribution you decide to get shut down your computer, set your BIOS to tell the computer to boot from your CD/DVD drive. insert Disk 1 of the multi-CD / DVD set which contains the Linux OS and applications, and boot. Do whatever it tells you to do.

The main thing to remember with respect to installing Linux in a dual-boot setup is this: When you get to the disk formatting/partitioning screen, make sure you tell the computer not to reformat your Windows drive. Other than that, use the default installation parameters except when you know they are not practical for the setup you intend to have. For more information, go to the website maintained by the developers of your distribution and read their installation information. Print it out if you feel the need. Having an experienced Linux user for handholding is a good idea for your first installation attempt.

If your video doesn't quite fill the screen, try adjusting the refresh rate using Start > System Tools > Resize & Rotate.

If this completely blows up in your face and you can't boot to your Windows drive, get your 9.x Windows boot disk and run: fdisk /mbr on your C: drive. This will blow off the Linux bootloader and should restore your hard drive to normal access.

The following instructions are for a KDE desktop environment after you have successfully installing Linux and enabled KDE.

  1. Go to Start > System Tools > Terminal. Click-drag the icon onto the desktop. After getting your Linux setup successfully installed install a copy of Adobe Acrobat for Linux. (You will be doing a lot of copying and pasting from PDF documentation, since this is the easiest way to make sure that you're entering an unfamiliar command correctly. The standard Open Source PDF applications don't support copy/paste operations. Look up how to install rpm files (a special type of application file archive intended for installation purposes) in the Linux commands document referred to earlier for how. Get a text editor that works from the command line. While there are those who swear by vi, I use a much easier application called nano. It's a lot like the BBS text editors for writing message posts/e-mail; there's no GUI, just a couple of rows of control-letter commands. Nano is part of most Linux distributions.

The following tells nano to open a file in the nano text editor:

Enter: nano filename

To mount (make accessible to the Linux OS) your Windows drive:

cd /mnt/

mkdir directoryname

Choose a directory name for your Windows drive, it will look like a directory in Linux -- mkdir works just like it does in DOS.

nano /etc/fstab

fstab is the file that tells Linux which drives are installed and what kinds of filesystems they used, in the example below, Linux is being told that the windows drive is connected to the primary channel of the primary drive controller.

hda - primary drive controller, master channel (usually = C: in Windows)

hdb -primary drive controller, slave channel

hdc -secondary drive controller, master channel

hdd -secondary drive controller, slave channel

Add the following:

/dev/hda1 /mnt/directoryname vfat defaults 0 0

Substitute the directory name you chose for your Windows drive for directoryname.

USB Scanners

My USB scanner, a Canon LIDE30, was recognized immediately by the SANE (equivalent to TWAIN in Windows) scanner access applicaton. Unfortunately, the only way I could access it via the xsane SANE scanner front end was by opening a "super user" session via terminal and entering xsane at the command line, as shown in the screen shot below.


If you have a USB scanner that won't work with the regular Linux GUI scanner interfaces, try this (su makes you a superuser with admin privileges):

[alizard@terrarium alizard]$ su

Password:

[root@terrarium alizard]# xsane

When you see the xsane warning, click "Continue at your own risk." It's a known bug, which you can learn about on this Red Hat Bugzilla page.

If this is your problem, set up a Web alert from Google's beta section on any "known bug" that you find that doesn't already have a fix you can apply.

USB scanners are not supported yet by Win4Lin. The workaround is to first access the scanners from Linux, then put the file somewhere within the /win directory space that Win4Lin can find, unless you have a graphics application in Linux you plan to process the file with. However, this isn't a current concern for you, all you're trying to do is make sure your scanner works before installing Win4Lin.

Printers

If all goes well, you will simply be able to select your printer from a printer configuration menu and start printing immediately. But if your printer won't print, don't panic. First make sure the printer is turned on. Some printers don't automatically get turned on by the software on boot.

I spent three days installing my USB Lexmark Z605 Colorprinter after finding that downloading and installing the installation RPM (rpm is an applications installation/upgrade file format) file didn't work. During that time, I did online research and tried different options suggested by various posters. I won't go into the details here, mainly because they'd be useful only to a handful of people. But I can recommend that you find a printer on the "approved" list for the Linux distribution you ultimately pick. Epson, for one, has a good reputation for Linux compatibility.

Dealing With Files

First, everything on a Linux system is in a single filesystem. The root directory is /. All other directories, including that of separate and network drives mounted on the Linux filesystem, are subdirectories under the root directory.

Never use a space in a Linux filename. Instead, use an underscore or a dash to separate words. Here are some examples of good and bad Linux filenames:

BAD: filename one

GOOD: filename_two

GOOD: filename-three

Do this when working in Windows, as well. Otherwise, working with files you've created will become much more difficult.

When working with files in the Linux command line, you may need to select a legacy file with a filename in it. In that case, use the ? wildcard character: filename?one. It works.

For test purposes, make a directory to put files you'd like to experiment with some of your files with

cd /home/username

mkdir test

The file managers that come with the FC2 distribution don't work well when dealing with large numbers of files, like the 120,000++files that copying my Windows working environment to Win4Lin required. For this task, you are better off using the command line instructions.

However, you are also better off waiting to move your Windows drive working files until after you have installed Win4Lin/Windows. When you move to your new environment, you will want access to the latest versions of all your files, particularly mailboxes/folders. Once your Windows drive is mounted, you can experiment with Linux applications by copying them into your Linux /home/username directory by:

cd /path/filename

with path being

/mnt/windows/[directories between windows and]/filename

For example:

/mnt/windows/My?Documents/shoppinglist-2-20-1997.doc

and

cp filename /home/username/directory/

You should now have your Linux distribution up and running, so this ends Part One of this two-part Recipe. Next week, in Part Two I'll show you how to install Win4Lin, install Windows applications under Win4Lin, and handle backups.

Sidebar: Where To Go If You Run Into Trouble

  • Check the vendor site first. The answer may already be in a searchable KnowledgeBase, FAQ, or other documentation on the site. Google is your friend. There is much useful documentation available at the Linux Documentation Project. Also check out About.com. Post questions in places like Linux Questions, The Fedora Forum (if you use Fedora Core), or Usenet groups like news://comp.os.linux or subgroups. There are many Linux Web forums and vendor-specific mailing lists. Google can help you find them, too. Ask a knowledgeable friend or local Linux User Group (LUG). There's a list of LUGs here. If you bought a distribution or application that includes support, call the vendor. Check vendor and open-source developer sites for user and developer forums. Your question may have already been answered. If not, post a new question. Visit TechBuilder's Recipe Forum, and post a question for your fellow system builders.

This is Part One of a two-part Recipe. Part Two can be viewed here. A. LIZARD is an Internet consultant in the San Francisco Bay Area who has written for technology magazines and Web sites since 1987. He wishes to thank Maxtor and Netraverse for contributing a pair of hard drives and a review copy of Win4Lin, respectively, for use in this Recipe.

Never Miss a Beat: Get a snapshot of the issues affecting the IT industry straight to your inbox.

You May Also Like


More Insights