Previous Next Table of Contents

3. Compatibility with other operating systems.

-------------------------------------------------------------------------------

3.1 Can Linux share my disk with DOS? OS/2? 386BSD? Win95?

Yes. Linux uses the standard MS-DOS partitioning scheme, so it can share your disk with other operating systems. Note, however, that many of these other operating systems are rather picky. DOS's FDISK.EXE and FORMAT.EXE, for example, can sometimes overwrite data in a Linux partition, because they sometimes incorrectly use partition data from the partition's boot sector rather than the partition table.

In order to prevent programs like these from doing this, it is a good idea to zero out -- under Linux -- the start of a partition you created, before you use MS-DOS -- or whatever -- to format it. Type:

$ dd if=/dev/zero of=/dev/hdXY bs=512 count=1
where hdXY is the relevant partition; e.g., hda1 for the first partition of the first (IDE) disk.

Linux can read and write the files on your DOS and OS/2 FAT partitions and floppies using either the DOS filesystem type built into the kernel or mtools. There is kernel support for the VFAT filesystem used by Windows 95 and Windows NT.

`` What software does Linux support?'' for details and status of the emulators for DOS, MS Windows, and System V programs.

See, `` Can Linux access Amiga filesystems?'' and, `` Can Linux access Mac filesystems?'' `` Can Linux access BSD, SysV, etc., UFS?'' `` Can Linux access SMB filesystems?''

-------------------------------------------------------------------------------

3.2 How do I access files on my DOS partition or floppy?

Use the DOS filesystem; i.e., type, for example:

$ mkdir /dos
$ mount -t msdos -o conv=text,umask=022,uid=100,gid=100 /dev/hda3 /dos
If it's a floppy, don't forget to umount it before ejecting it!

You can use the conv=text/binary/auto, umask=nnn, uid=nnn, and gid=nnn options to control the automatic line-ending conversion, permissions and ownerships of the files in the DOS filesystem as they appear under Linux. If you mount your DOS filesystem by putting it in your /etc/fstab, you can record the options (comma-separated) there, instead of defaults.

Alternatively, you can use mtools, available in both binary and source form on the FTP sites -- `` Where can I get Linux material by FTP?''.

A kernel patch (known as the fd-patches) is available which allows floppies with nonstandard numbers of tracks and/or sectors to be used; this patch is included in the 1.1 alpha testing kernel series.

-------------------------------------------------------------------------------

3.3 Can I use my Stacked/DBLSPC/etc. DOS drive?

Not very easily. You can access DOS 6.X volumes from the DOS emulator (`` What software does Linux support?''), but it's harder than accessing a normal DOS volume via the DOS kernel module or mtools.

There is a module available for the Linux kernel which can do read-only access of the compressed volume. Look in sunsite.unc.edu/pub/Linux/system/filesystems/dosfs for this package.

-------------------------------------------------------------------------------

3.4 Can I access OS/2 HPFS partitions from Linux?

Yes, but Linux access to HPFS partitions is read-only. HPFS filesystem access is available as an option when compiling the kernel or as a module. See the Documentation/filesystems/hpfs.txt file in the kernel source distribution. `` How do I upgrade/recompile my kernel?''). Then you can mount HPFS partition, using, for example:

$ mkdir /hpfs
$ mount -t hpfs /dev/hda5 /hpfs
-------------------------------------------------------------------------------

3.5 Can Linux access Amiga filesystems?

The Linux kernel has support for the Amiga Fast File System (AFFS) version 1.3 and later, both as a compile-time option and as a module. The file Documentation/filesystems/affs.txt in the Linux kernel source distribution has more information.

See `` How do I upgrade/recompile my kernel?'').

Linux supports AFFS hard-drive partitions only, though: floppie access is not supported due to incompatibilities between Amiga floppy controllers, and PC and workstation controllers. The AFFS driver can also mount disk partitions used by the Un*x Amiga Emulator, by Bernd Schmidt.

-------------------------------------------------------------------------------

3.6 Can Linux access BSD, SysV, etc. UFS?

Recent kernels can mount (read only) the UFS filesystem used by System V; Coherent; Xenix; BSD and derivatives like SunOS, FreeBSD, NetBSD, and NeXTstep. UFS support is available as a kernel compile-time option and a module.

See `` How do I upgrade/recompile my kernel?'').

-------------------------------------------------------------------------------

3.7 Can Linux access SMB filesystems?

Linux supports read/write access of Windoze for Workgroups and Windoze NT SMB volumes. See the file Documentation/filesystems/smbfs.txt of the Linux kernel source distribution, and `` How do I upgrade/recompile my kernel?'' in this FAQ.

There is also a suite of programs called Samba which provide support for WfW networked filesystems (provided they're for TCP/IP). Information is available in the README file at sunsite.unc.edu/pub/Linux/system/network/samba.

There is a SMB web site at samba.canberra.edu.au/pub/samba.

-------------------------------------------------------------------------------

3.8 Can Linux access Mac filesystems?

There is a set of user-level programs that read and write the Macintosh Hierarchical File System (HFS). It is available at sunsite.unc.edu/pub/Linux/utils/disk-management.

-------------------------------------------------------------------------------

3.9 Can I run Microsoft Windows programs under Linux?

Not yet. There is a project, known as WINE, to build a MS Windows emulator for Linux, but it is still not ready for general distribution. If you want to contribute to its development, look for the status reports in the comp.emulators.ms-windows.wine newsgroup.

A commercial, working product known as WABI is said to provide full MS-Windows emulation under Linux. It is available from SunSoft, Inc.

There is also a FAQ, compiled by P. David Gardner, at sunsite.unc.edu/pub/Linux/docs/faqs/Wine-FAQ/.

In the meantime, if you need to run MS Windows programs, the best bet -- seriously -- is to reboot. LILO, the Linux bootloader, can boot one of several operating systems from a menu. See the LILO documentation for details.

-------------------------------------------------------------------------------

3.10 How can I boot Linux from OS/2's Boot Manager?

1. Create a partition using OS/2's FDISK.EXE (Not Linux's fdisk).

2. Format the partition under OS/2, either with FAT or HPFS. This is so that OS/2 knows about the partition being formatted. (This step is not necessary with OS/2 "warp" 3.0.)

3. Add the partition to the Boot Manager.

4. Boot Linux, and create a filesystem on the partition using mkfs -t ext2 or mke2fs. At this point you may, if you like, use Linux's fdisk to change the code of the new partition to type 83 (Linux Native) -- this may help some automated installation scripts find the right partition to use.

5. Install Linux on the partition.

6. Install LILO on the Linux partition -- NOT on the master boot record of the hard drive. This installs LILO as a second-stage boot loader on the Linux partition itself, to start up the kernel specified in the LILO config file. To do this, you should put

boot = /dev/hda2
(where /dev/hda2 is the partition you want to boot from) in your /etc/lilo/config or /etc/lilo.config file.

7. Make sure that it is the Boot Manager partition that is marked active, so that you can use Boot Manager to choose what to boot.

-------------------------------------------------------------------------------

3.11 How do I get MS-DOS to boot again after using Linux?

1. The (undocumented) option to MS-DOS' FDISK.EXE, /MBR, is said to completely rewrite the Master Boot Record on the hard drive, which is where LILO store its boot data, too.

2. Re-install Windoze from scratch, which is also said to rewrite the hard drive's master boot record. In fact, this is one reason why you need to install Windoze/MS-DOS first, and Linux second.

3. Use a commercial program, like Partition Magic, as suggested by Sebastian Fait, among others. I haven't used Partition Magic personally and so do not recommend it.

As a matter of fact, after installing Linux, I do not recommend using MS-DOS at all.

-------------------------------------------------------------------------------

3.12 How can I share a swap partition between Linux and MS Windows?

See the Mini-HOWTO on the subject by H. Peter Anvin, < hpa@yggdrasil.com>. It is available at sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/Swap-Space.

===============================================================================


Previous Next Table of Contents