This page describes how to use NetBSD version 1.5 with Virtual PC version 4 from Connectix. NetBSD is a free, mature, and very stable Unix operating system that is a widely-used alternative to Linux. Virtual PC is a wonderful commercial Macintosh product that allows you to run PC programs unchanged by emulating a full PC on your Mac. Virtual PC comes with Linux support, but not NetBSD support. This site fixes that. (If you are interested in other BSDs, there is a different site that explains how to install OpenBSD on Virtual PC.)
The information on this site assumes you already own Virtual PC version 4, and have a copy of a NetBSD 1.5 CD-ROM. This site does not explain much about how to run either product, only how to get them working together well. This site also doesn't describe how to get earlier versions of either product to work with each other. A different site created by David Hornsby describes how to use NetBSD 1.3.2 with earlier versions of Virtual PC.
Basically, NetBSD 1.5 out of the box works OK with Virtual PC 4. However, there are a few major problems, such as the fact that the Ethernet interface and the floppy drive doesn't work. Thanks to the hard work of Peter Seebach, you can fix this easily by copying a new kernel to your system after installing NetBSD 1.5. Thank you, Peter! Also, the folks at Connectix did a fair amount of work between version 3 and version 4 to make NetBSD work even though NetBSD is not officially supported by them. Further help was provided by Peter A. Eisch, who upgraded the XF86Config file to higher resolution.
Virtual PC 4 can be bought at any fine purveyor of Macintosh products (my favorite continues to be MacConnection); the current street price is around $75 for the no-Microsoft-OS versions. Virtual PC version 4 seems to run significantly faster than version 3, so users of earlier versions of Virtual PC should probably upgrade. Virtual PC comes in many different flavors (for Win98, for Windows 2000, for Linux, etc.), and all of them work with NetBSD.
NetBSD is free. There are many ways to install NetBSD on a PC, the two
fastest and most reliable being:
- from a CD-ROM
- over an Ethernet-based network after booting from floppy
Unfortunately, the Ethernet drivers on the
installation floppies and CD-ROM for NetBSD 1.5 do not work with Virtual PC
version 4. Thus, the only reasonable way to install a working NetBSD 1.5
is to install from CD-ROM, and then copy a new, better kernel onto
your system. NetBSD 1.5 CD-ROMs can be bought many places; see
the NetBSD CD-ROM
list for information, or simply borrow a NetBSD 1.5 CD-ROM from a friend
(that's both legal and friendly!).
+***********************************************+ * NetBSD-1.5 Install System * * * * a: Install NetBSD to hard disk * * b: Upgrade NetBSD on a hard disk * * c: Re-install sets or install additional sets * * d: Reboot the computer * * e: Utility menu * * x: Exit Install System * +***********************************************+In the installer, you can use the arrow keys on the keyboard or letters.
I have found the following disks: wd0 wd1
On which disk do you want to install NetBSD? [wd0]:
wd0: no disk label
You might not see the "wd0: no disk label" notice; that's OK. If the first
line does not list both wd0 (the new drive you created) and wd1 (the
small drive you downloaded), stop immediately. Otherwise, enter "wd0"
and press Return.
Your disk currently has a non-NetBSD partition. Do you really want to overwrite that partition with NetBSD?Answer yes, you really want to do that.
Status: Running
Command: /sbin/newfs /dev/rwd0e
---------------------------------------------------------------------------
/dev/rwd0e: 3362688 sectors in 3336 cylinders of 16 tracks, 63 sectors
1641.9MB in 209 cyl groups (16 c/g, 7.88MB/g, 1984 i/g)
super-block backups (for fsck -b #) at:
Lots of numbers get displayed, Depending on the size of your drive and the
speed of your system, this may take a while.
device: cd0 directory: /i386/binary/setsYou can continue with these settings.
Status: Running
Command: pax -zrpe -f /mnt2//i386/binary/sets/base.tgz
(with different names for the last bit of the second line). Feel free
to walk away for a bit.
NetBSD/i386 (Amnesiac) (ttyE0)
login:
Enter "root" (without the quotes, of course). When prompted, enter the
root password.
-rw-r--r-- 1 root wheel 5138 Jan 23 10:03 XF86Config -rw-r--r-- 1 root wheel 4591 Jan 6 12:45 low-res.XF86Config -rwxr-xr-x 1 root wheel 2329634 Jan 6 10:21 netbsd -rw-r--r-- 1 root wheel 42616 Jan 6 10:22 vpc-patch-03
By default, Virtual PC assumes that you have a DHCP server to give you an IP address. However, some folks want or need to have a fixed IP address.
dhclient=YES auto_ifconfig=NOto the end of that file, then reboot.
dhclient=NO auto_ifconfig=YESCreate the file /etc/ifconfig.tlp0 that has one line:
inet 40.50.60.70 netmask 255.255.255.0where "40.50.60.70" is your IP address. Create the file /etc/mygate that has a single line that contains the IP address of your Internet gateway. Create the file /etc/myname that has the host name of this machine in it. Reboot, and you should be on the net.
Virtual PC emulates an S3 screen driver. To run X Windows, copy the XF86Config file from the drive image you downloaded into /etc. If you run startx now, you will get a tiny screen with really, really big pixels. Instead, install the XF86Setup package and run that setup program. There, you can specify the screen driver (S3) and the resolution you desire. Virtual PC works just fine in 1024x768 full-screen mode on a PowerBook. (If you are not familiar with the NetBSD package system, you should be! See the pkgsrc manual for more information.)
Note that resolutions over 1024x768 are currently not working correctly due to a quirk of the clock chip emulation; they work in Windows, but you have to use the BIOS to change modes, and XF86 just tries to make the chip do the work directly. There is no problem using 1024x768 with 256 colors, but it does not work with more colors than that.
Also note that the XF86Config file is specifically designed for 1024x768 adapters. If you have an 800x600 adapter (such as for the iBook), you need to modify the XF86Config file. Near the bottom of the file, there is a section that has a bunch of entries like:
Subsection "Display" Depth 32 Modes "1024x768" EndSubsectionEdit them to say "800x600" instead.
If you don't already know how to build a kernel, you probably don't want to spend your time on something that is more arcane than rebuilding a car's engine. If you already know how to patch a kernel, patching the NetBSD kernel is easy, and you want to apply the patches for Virtual PC before you create a new kernel.
To get the kernel source tree, mount the CD-ROM on /mnt
(using "mount -t cd9660 /dev/cd0a /mnt").
Unpack the kernel source with
"cd /; tar -xzf /mnt/source/sets/syssrc.tgz";
this will take quite some time.
When the source is unpacked, you can apply the patch you copied into your home
directory above with
"cd /usr/src/sys; patch <~/vpc-patch-03".
This patches a wide variety of files and creates a VPC configuration.
The following steps are all you need to build a new kernel.
cd /usr/src/sys/arch/i386/conf
config VPC
cd ../compile/VPC
make depend
make
cp /netbsd /netbsd.works.ok
cp netbsd /
reboot
The following is a list of the problems that are know to exist with the setup described above.
