"Linux Gazette...making Linux just a little more fun!"


The Answer Guy


By James T. Dennis, linux-questions-only@ssc.com
Starshine Technical Services, http://www.starshine.org/


(?)Running Unix/Linux Under Win '9x

From John Riddoch on the comp.unix.questions newsgroup on 05 Jun 1998

Jeff wrote:
I need a question answered. I am running Windows 95 and soon 98. ...

I was wondering if there is any way to run the unix program itself in a program window in Win 95,


unix is not a program; it is an operating system. You _cannot_ run two operating systems at the same time on the same hardware. Dual-booting is a different matter.

(!)And running an OS under simulation or under a VM is also a "different matter." Also not that the phrase "OS" is not so precisely defined that you can defend this position. For example the IBM mainframes support VM's (virtual machines) that would allow the concurrent use of multiple OS'. Also consider the case of Tenon Systems' "MachTen" a microkernel OS that support MacOS running as a personality under the microkernel.

(?)just like you can run win 95 the same way on a mac.

???? I sincerely doubt it. Perhaps the mac had an emulator that ran win 95 programs. Apart from anything else, win 95 is i386 only and won't run on a 68000 (or whatever macs use these days).

(!)He's probably referring to VirtualPC --- an emulation of the hardware, including CPU, video, disk, I/O, and ethernet chipsets. There's also RealPC. These are the most popular PC emulators under MacOS.

Modern Macs run the G3 (PowerPC) processor, and the performance of Win '95 under VirtualPC is tolerable (about equivalent to a Pentium 90 on a 250 Mhz G3 Powerbook (laptop) and about a Pentium 75 on a 180 Mhz Performa).

Getting back to the original question:

There is a shareware package (distributed as source code and available for free evaluation) by Kevin Lawton called Bochs.

This started as a PC emulator (hardware) emulation for Unix (including Linux) that is allegedly capable of supporting Win '95 under emulation. It apparently isn't quite up to supporting NT (apparently the CPU emulation is only 386 and NT requires 486 or Pentium emulation). For info on that look at the Bochs web site: (http://world.std.com/~bochs/). It looks like Kevin will be upgrading the processor emulation as time (and possibly funds) allow. Apparently you can License this package for $25. (I haven't used it yet, but I might send him the money just 'cause I'm so impressed by the effort).

I know this doesn't answer the question Yet but hang with me a moment. Someone named David Ross seems to have ported Bochs to the Win32 platform, thus allegedly allowing one to run Linux, FreeBSD, or (presumably) most other forms of x86 Unix.

(?)if you can gimmie a hand and maybe tell me some sites where i can download some software please tell me.

(!)See above.

(?)You might try http://www.linux.org/ for a few pointers. Do some web searches for linux and read some stuff. RedHat linux 5.0 is a reasonable version which is nicely pre-packaged for you and fairly easy to install (http://www.redhat.com/).

(!)Having answered the basic question (where can you find a PC emulator for Win '9x) I have to add my own suggestion:

Don't do it.


You can buy a cheap PC (even an old used 486) for next to nothing (I've recently had one 40Mhz 386 given to me for free); and you can install Linux on that.

(My main household server is a 10 year old 386/33 with 32 Mb of RAM. Eventually I'll install some extra RAM and a new disk into that "new" 386 and throw it up as an extra server on my LAN).

Once you have a machine (give it at least 16Mb and at least a 540Mb drive) then you can just slap a null modem between it and you desktop machine, or toss in a couple of ether cards and a cross-over 10BaseT cord (or even by a little 4 or 5 port hub). Once that's done you can use a terminal package (like Hyperterm, Telix, or K95 -- Columbia U's Kermit for Win '9x), or even Kermit for DOS) to connect to the Linux box. If you go the ethernet route you can use Win '95's 'TELNET.EXE' or you can still use K95 (it's also a telnet client --- and it's terminal emulation is far less buggy than Microsoft's --- so you won't need a custom termcap/terminfo file to run "curses" (Unix/Linux "full scree" terminal/console) applications).

There are two reasons for me to suggest this approach:

First, you are likely to be very unhappy with the performance of running any form of Unix under emulation. Although Linux performs adequately on a 386 with only 16Mb of RAM --- and some kernels can run in as little as 2Mb --- you'll probably just find emulation to be too frustrating to be useful --- particularly when using any Unix networking utilities.

The only two viable reasons I can see for the mode of operation that you've requested are: You won't learn as much about Unix by running it under emulation --- and you'll probably end up being too frustrated by its performance to come away with a realistic appreciation of it.

In the other case you can get versions of Perl, awk, and most other Unix utilities, shells, editors and many other tools that have been ported to Win32 (and even to DOS, often using the GNU'ish Go32 "DOS extender").

The other reason for my suggestion is that Linux, even on a lowly 386, makes a great server. My box has over 6Gb of online storage (which I'll probably double in the 40Mhz) a magneto optical drive, a CD-ROM and a CDR recorder, a 4mm DAT autochanger, a modem line (which handles uucp, incoming and outgoing fax, dial out terminal/BBS'ing, dial in terminal, and dial out PPP and will handle dial-up PPP when I get around to configuring it), a null modem into the living room (for use from an old XT laptop) and some other toys.

The machine has currently been up for about three months.

I forget why I rebooted three months ago, maybe I built a new kernel for it or maybe I just made some changes to the startup files and wanted to make sure it would come up automatically. It's been used as my mail gateway and newserver for a few years --- and it was used as my primary interactive machine (mostly text editing) for years. My wife and our various house guests sometime still use it or the dumb terminal to read their mail (if they don't want to use one of the Pentium's in the living room or in my bedroom). Sometimes I dial into to it from a client site (I'm a consultant) or even from some local coffee house using the Ricochet wireless to telco gateway (offered in selected areas by Metricom: (http://www.metricom.com/).

You can use Linux as a gateway. Its kernel offers an optional feature called "IP Masquerading" which is a special form of "network address translation" (NAT) that allows you to hide a whole network of computers (using "private net IP addresses" like 10.*.*.*, 192.168.*.* and others defined in the RFC 1918). It is trivial to install a package called 'diald' that will dial up your ISP on demand (automatically when any of you computers try to access the Internet -- or any other non-local nets) and will automatically drop the line after a configurable period of inactivity. This puts virtually no load on a machine (not measurable on my 386!).

Another handy server role you can assign to your Unix box (Linux or otherwise) is as a household schedule/reminder service. The Unix 'cron' and 'at' facilities are just perfect for this. You can write simple scripts and schedule them for periodic execution (cron) or for one time execution in the future (at). With slightly more complex scripts (using the GNU 'date' command, and simple shell conditionals and tests) you can do arbitrarily complex scheduling. It is truly easy to set this up to automatically e-mail you reminders post them to your "intranet web server" or to even page you (using a normal modem) as an alarm service.

Eventually I expect someone to release a set of CGI scripts to act as a front end to a reminder/alarm service --- which you could toss up on your "intranet" server.

Using a little box as an "intranet" web server for a household or small business also takes almost no memory or CPU power on a Linux or FreeBSD box. I think the overhead is about 70K for a small web server, and you can even configure them to be "dynamically" loaded if you're really pressed for RAM. The little box can also function as a fileserver for you Win '95 box by using Samba, a Unix package that provides Windows/NT compatible file sharing. It's easy to run all of these functions on the same box, they don't conflict with one another at all, and most of them present very little load on the server.

On top of all that you can use the old clunker to run household appliance over the old BSR X-10 "Powerhouse" interface (also sold as "ActiveHome"). Larry Wall just gave a talk at the Silicon Valley Linux user's group showing us a demo of how he's automated his house. It was incredibly amusing. He has a detector on his clothes dryer, in the garage, that announces through the household PA system when the laundry is done; and motion sensors on the walk way leading up to the front door to announce visitors, and scripts to tell his wife and kids when they get mail (presumably he gets too much mail to want such an announcment for himself).

Naturally you can put a sound card in the PC and run PA/Speakers off of it to do various cool things.

The point is that you can't do all of this when you're running Unix in an emulator under Win '95 (since the chances are too great that you'll need to reboot it, and also since your emulator won't have access to most of the hardware that we're talking about --- it can only access the virtual/emulated hardware. The other problem is that Win '95 is generally not nearly as stable as any form of Unix. Even NT doesn't come close to Linux, FreeBSD, or any of the popular forms of Unix for stability.

For the same reasons you won't benefit nearly as much from a dual or multi boot configuration. There's not much point to having a "server" that you keep rebooting to play Doom (which is available for Linux, BTW) or to read that MS Word document.

Although I've focused on Linux (and I prefer it for my personal use) all of what I've said applies to FreeBSD, NetBSD, and OpenBSD among others. (There are some differences, the *BSD's don't have their NAT/masquerading and packet filtering in the kernel -- it's run as a user process, things like that. If you're learning Unix for professional reasons I'd definitely suggest that you clock in some time and practice on any one of the BSD systems as well as on a Linux box. Potential employers (in Unix savvy companies) will be far more intrigued by entry level applicants who've worked with BSD.

Also, if you want to play with the X Window system (the dominant tehnology for supporting GUI's under Unix --- though, technically, it is a communications protocol and programming API --- and not a "GUI") you won't want to run it on less than a Pentium. In that situation I'd put one (character only) installation on the cheap/used PC and install a dual boot configuration on your main (Win '95) workstation. The best way to do that is to install an extra hard drive on the workstation (so you don't need to repartition your existing drives).

Even you decide to put one of the BSD's on your cheap/used server you should probably still put Linux on your Win '9x workstation. There are two reasons for this:
  1. there are more commercially available productivity applications available for Linux (WordPerfect, StarOffice, Applixware, Cliq, Wingz, etc).
  2. Linux has very good support for DOS, and Windows filesystems (and even some, read-only and even NTFS and HPFS). You can even install a small Linux distributions directly into a DOS subdirectory.
You could install Linux on the workstation and have it access most of its files (almost all of them) over the network (over NFS). All you need on a Unix box is a fairly small "root" filesystem. 20 Mb is enough for all the "root" files (all you really need is /etc, /dev/, and /sbin -- the rest can all be mounted over the LAN though I'd suggest adding a local swap file or partition, and a local /tmp directory).

If you do an installation like this: (with one server installation on a dedicated PC and another on your workstation -- say FreeBSD on the server and Linux on a multi-boot for your Win '9x box) you'll get the maximum benefits and you'll learn enough about Unix to qualify for professional work in the field.

So, in conclusion: You won't learn nearly as much about Unix from any form of "emulation" or dual-boot arrangement. The principle advantage of Unix has always been the client server model it uses. Unix "wants" to be a server. It's as important to learn this philosophy as it is to learn the syntax for a couple hundred Unix commands. So, that's the best approach to installing and learning it around your house.


Copyright © 1998, James T. Dennis
Published in Linux Gazette Issue 30 July 1998


[ Answer Guy Index ] SCOkeys chroot dosemu-db NTauth cdr 3270 comport
lilostop emulate ppadrivers database vacation nullmodem lockups
gzipC newlook c500 solprint vc1shell memleak tvcard


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]