[MINIX LOGO]

Exchanging Data between Minix and Other OS File Systems

revised 6 June 2006


If you use two or more operating systems you probably will want to exchange data between them at some point. If they are on separate computers and the computers are networked, you can use programs like ftp(1) (available for most, if not all, operating systems) or (between Unix-like systems) rcp(1). Between non-networked computers you can use kermit(1) (also available for most, if not all, operating systems) to transfer data via modem or over a serial line connection.

The above may also apply when you are running two or more operating systems at the same time on a single computer using a virtual or emulated machine such as provided by VMWare, VirtualPC, Bochs, or Qemu. It may be possible for a guest OS and its host OS or another guest OS to connect via a network as if they were running on completely separate computers. It may also be possible for two such systems to read each other's disks, as described in the next paragraph.

Exchange of data between different operating systems running at different times on the same computer or on two computers that can't communicate by wire requires arranging for one system or the other to read and write "foreign" floppy disks or hard disk partitions. With floppy disks the only problem is to interpret the data structures used by the foreign file system. With hard disk partitions there may be another problem to be solved first: although all operating systems that use the same hardware platform must use the method of defining primary disk partitions that is supported by the system's ROM boot code, operating system designers have devised various ways of further dividing primary partitions into subpartitions. This document deals with the problem of interpreting foreign file systems; see the file on partition compatibility for information on the subpartition problem.

Minix 3 Access to Minix 2 File Systems (and vice versa)

Minix 3 was released in late 2005 and is described in the 3rd edition of the text by Tanenbaum and Woodhull, Operating Systems Design and Implementation, published in early 2006. Minix 3 has many changes, including a new version of the Minix file system. Unlike the Minix 2 file system, which was also capable of reading Minix 1 file systems, the Minix 3 file system is not able to read Minix 2 file systems. As this is written (June 2006) nobody has announced any kind of utility programs to copy data between Minix 2 and Minix 3 file systems. This is an obvious topic for a student project, and this situation may be expected to change.

Since Minix is primarily intended for use in teaching, the Minix 3 programmers felt that there would be few Minix 2 installations with large amounts of data that would need to be transferred to new Minix 3 installations. So the goal of keeping Minix simple trumped making Minix useful in this case. If you happen to have a large amount of data on a Minix 2 machine you will curse this decison, of course. This website is one such installation; the owner found setting up Minix 2 and Minix 3 systems on separate computers and transferring files on the local network was the easiest way to deal with this.

Another consequence of the change from the Minix 2 to the Minix 3 file system is that support that may have existed in other systems for reading Minix files may no longer work. See the section below on accessing Linux acccess to Minix file systems.

Minix Access to Foreign File Systems

The primary purpose of Minix is to illustrate operating system principles. Keeping Minix small enough to fit into a student's head during a semester- or year-long course has required keeping it simple. In particular, the Minix file system supports mounting only media containing Minix file systems.

In the Unix world mounting a file system has a definite meaning: a mounted file system is part of a single directory tree with / at its root. But just because Minix cannot mount foreign file systems doesn't mean they can't be accessed. The standard Minix distribution contains utility programs to allow reading and writing files and directories in MS-DOS and Windows file systems, and for reading files and directories in ISO-9660 file systems, as found on CD-ROMs. These programs are the dos* utilities, mtools, and the iso* utilities.

Accessing MS/DOS and Windows file systems from Minix:

Analogous to the dos* commands, a set of isoinfo(1), isodir(1), and isoread(1) commands exist for accessing ISO-9660 (CD-ROM) files from Minix:

Of course, to use the iso* tools you need to know the Minix device that corresponds to your CD-ROM. It will most like be /dev/c0d1 or /dev/c0d2 on a typical computer with one hard drive and one CD-ROM drive. (That's for Minix 2.0.3 or later, for earlier versions try /dev/hd5 or /dev/hd10). You can use the part command or experiment with isoinfo with different arguments to identify the CD-ROM drive.

Accessing files in Linux ext2 file systems from Minix:

Terry McConnell ported a package called ext2tools, originally written for MS-DOS, to Minix. As originally written by Claus Tondering, this package provided tools for accessing a Linux ext2 filesystem from MS-DOS. The port provides the same functionality for accessing Linux files from Minix. The following programs are included:

Of course, as of 2003 Linux has moved on, and ext2 is no longer the most widely used Linux file system. One way to deal with this is similar to what was suggested above for Windows: make an extra Linux partition that uses ext2, or perhaps even the Linux minix file system, and use this as a staging point for files to be transferred.

MS-DOS and Windows Access to Minix File Systems

Terry McConnell has extended a package originally called MinDOS to make mintools, which gives access to Minix files from an MS-DOS prompt.

Linux Access to Minix File Systems

This category is a no-brainer for Minix 2. Linus used the then-current Minix file system as the basis for Linux , and although Linux hard drives usually use the Linux ext3 or another newer file system now, support for the Minix file system is usually included if floppy disk access is required -- newer file systems are not suited for floppy disks, and the Minix fs is used for floppy disks by default. Just be sure when you configure Linux that you include support for the Minix file system.

It is particularly ironic that Linux, which originally used the Minix file system and has always supported it can not read Minix 3 partitions or floppy disks. As of June 2006 the only solution is patches for various Linux versions that have been written and posted by the author at http://www.terra.es/personal2/danarag/, These have not yet been merged into standard Linux distributions.

File Transfers between Guest and Host OS on Virtual or Emulated Systems

With a virtual or emulated host platform, as provided by Bochs or VMWare, one frequently needs to transfer data from the host OS to the guest OS or vice versa. Depending on the capabilities of the two systems, there may be several ways to do this.

Virtual and emulated system links: Here are sources of more information about some of the topics mentioned in this section.
[HOME] [HINTS/FAQ] [MINIX DOWNLOADS] [CONTRIB SOFTWARE]
[NET SOFTWARE] [MINIX-VMD] [TEXTBOOK] [LINKS]

All material on this site not otherwise attributed is copyright ©1994-2006 Albert S. Woodhull
Click here for information on copying and other use.
Mail comments on this page to: Al Woodhull <asw@woodhull.com>
[Viewable With Any Browser]
Valid CSS!
[Valid XHTML 1.0!]