Windows Compatibility and Samba

Linux is a remarkably effective operating system, which in many cases can completely replace MS-DOS/Windows. However, there are always those of us who want to continue to use other operating systems as well as Linux, or at least to exchange files directly with them. Linux satisfies such yearnings with internal enhancements that allow it to access foreign filesystems and act on their files. It can mount DOS/Windows partitions on the system's hard disk, or access files and printers shared by Windows servers on the network. Linux can also run DOS and Windows applications, using compatibility utilities that allow it to invoke MS-DOS or Windows.

We use the terms MS-DOS and Windows somewhat generically in this chapter to refer to any of the DOS-based operating systems coming from Microsoft or those compatible with them. These include MS-DOS, PC-DOS, and DR-DOS/Novell DOS (all with or without Windows 3.x running on top of them), as well as the various Windows versions themselves, no matter whether they build upon a separate DOS installation, such as Windows 3.x, or whether they have a DOS kernel built in, such as Windows 95/98/ME. Windows NT/2000/XP are different, and some of the things described here will not work with them, or will work differently.

One of the most common reasons for needing to run Windows is that it often has better support for new hardware products. If you have installed Windows because you need to use a piece of hardware that is supported by Windows, but for which there is no Linux driver, do not despair. Although you may have to wait a while for it, most mainstream hardware devices that are supported by Windows will eventually be supported by Linux, too. For example, Linux drivers for USB devices used to be rare and flaky, but now many common USB devices work just fine on Linux. You can get updated information about which USB devices work on Linux at http://www.linux-usb.org.

You may also need to run Windows in order to use "standard" applications, such as Photoshop or Microsoft Office. In both of these cases, there are free, Open Source applications (namely, The Gimp, KOffice and OpenOffice) that can match or even outdo their proprietary, closed-source equivalents. However, it is still sometimes necessary to run Windows to obtain access to software products that have no Linux equivalent, or for which the Linux counterpart is not fully compatible.

There are essentially four ways in which Linux and Windows can cooperate:

• Sharing CDs and floppy disks ("sneakernet")

• Sharing a computer by being installed on separate partitions

• Sharing data over a network

• Running concurrently on the same computer using an emulator or virtual machine

When Windows and Linux are running on separate hardware, and the systems are not networked, a floppy disk or CD (either CD-R or CD-RW) can be written on one system and read on the other. Both Windows and Linux have the capability to read and write CDs in industry standard, ISO9660 format. The cdrecord program, which runs on Linux and other Unix flavors, can create CDs using Microsoft's Joliet extensions to the ISO9660 standard, making Windows feel right at home with the disc format.

Although floppy disks hold much less data than CDs, they can be useful when just a few small files need to be transferred. Data can be shared between Linux and Windows on MS-DOS formatted floppy disks using the MTools utilities described later in this chapter.

A more cost-effective approach is to install both Windows and Linux on the same computer, each in their own disk partitions. At boot time, the user is given the choice of which operating system to run. Section 5.2 in Chapter 5, tells you how to configure a multiboot system.

MTools can be used to access files on the Windows partition while running Linux, but a much more convenient method is to mount the Windows partition directly onto the Linux file system. Then Windows files can be accessed similarly to regular Unix files.

For networked computers, the most outstanding tool for getting Linux and Windows to cooperate is Samba, an Open Source software suite that lets you access Unix files and printers from Windows. Linux servers running Samba can — depending on the circumstances — serve Windows computers even faster than Windows servers can! In addition, Samba has proven to be very stable and reliable.

The Samba package also includes programs that work with the smbfs filesystem supported by Linux, which allows directories shared by Windows to be mounted onto the Linux file system. We'll discuss the smbfs filesystem and Samba in enough depth to help you mount shared directories and get a basic, functional server running.

Finally, there are methods that can be used to directly run Windows applications under Linux, or even run Windows itself. Wine is an Open Source project with the goal of directly supporting Windows applications, without needing to install Windows. Another approach is used by the commercial VMware application, which is able to concurrently run a number of installations of Windows, Linux, FreeBSD or some other operating systems. When running Windows under VMware, data is shared with the Linux host using the Samba tools.

You should be a little skeptical of some claims of compatibility. You might find, for example, that you need twice the disk storage in order to support two operating systems and their associated files and applications programs, plus file conversion and graphic-format conversion tools, and so on. You may find that hardware tuned for one OS won't be tuned for the other, or that even when you've installed and correctly configured all the necessary software, small unresolvable compatibility issues remain.

Was this article helpful?

0 0
Learn Photoshop Now

Learn Photoshop Now

This first volume will guide you through the basics of Photoshop. Well start at the beginning and slowly be working our way through to the more advanced stuff but dont worry its all aimed at the total newbie.

Get My Free Ebook


Post a comment