## Installing FreeBSD on a Win95 box
## Dan Langille <>
This topic describes how I installed FreeBSD 3.1 onto a Windows 95
machine. The install was done from a DOS partition. But the destination
machine has very little disk space. So I had to compile a custom kernel on
another machine.
Paul Kennett, of
and
fame, runs a small LAN at his office. He's been trying to install Linux for
some time. I offered to install FreeBSD 3.1 for him.
This new box will have a modem and a network [interface] card (NIC).
It will dial up to his ISP and allow the rest of the LAN to have
access to the Internet. This will be an interesting exercise for me
as I've never installed PPP before. The machine will also have a
printer accessible from his MS Windows machines. I'll also install
some sort of firewall. But for this article, we'll concentrate on
getting FreeBSD 3.1 installed.
The hardware
This machine is a 486 DX 33MHz with 8 Meg of RAM, a CD-ROM, and an
ethernet card. It has a 400M disk with about 250M free. Windows 95
is already installed on this machine. My first task will be to
install FreeBSD from DOS. I was going to do this today, but my coax
cable and terminators are at Paul's. I also must ask him if anything
on this machine is irreplaceable. I might wind up doing a backup of
his machine. If I can get it connected to my LAN first. I will
assume you have already done this.
OK. That's the IP set. The workgroup changed. And the machine
rebooted. The machine asked for the Windows CD-ROM but I don't have
it here (this *is* someone else's machine remember). So I just
skipped all the files. After it rebooted, I could see my other
machines. All looks well.
Know your interrupt
One thing you should do, and I didn't, is find out the hardware
settings for your network card. Do this from Windows. Go into the
Control Panel and click on Network. Find your network adaptor and see
what the IRQ and Address are. You'll need those later.
The documentation
I started with the of The FreeBSD Handbook. I suggest you go
there now and read that before proceeding blindly with my instructions.
Before proceeding, I strongly urge you to first read
.
The floppies
I connected to a FreeBSD FTP server and you should pick yours from
Gavin Cameron's list of
. As I'm installing FreeBSD 3.1, I grabbed the files from
/pub/FreeBSD/release/3.1-RELEASE/floppies. In that same directory you will
find README.TXT. Please read it.
I created the c:\FreeBSD directory on my Windows 95 machine. Then I
downloaded the following files from the FTP site into that directory:
/pub/FreeBSD/tools/tools/fdimage
/pub/FreeBSD/release/3.1-RELEASE/floppies/kern.flp
/pub/FreeBSD/release/3.1-RELEASE/floppies/mfsroot.flp
Then I followed the instructions in README.TEXT (see previous paragraphs
for the location of this file).
In short, I created two floppies using the above files.
Creating a second partition
I had only a single partition on the Windows 95 machine. You need
two partitions to create a dual boot machine. One partition will
contain Windows 95, the other will contain FreeBSD. Luckily, FreeBSD
comes with a DOS utility called fips which can be used to create a
second partition. You can find this tool in /pub/FreeBSD/tools/tools.
I suggest you create a bootable DOS floppy and put fips on it.
Then reboot your Windows machine using that floppy. Run fips and
repartition your machine. When fips terminated on my machine, it
was unable to reload command.com and displayed a memory error. I just
rebooted and Windows reloaded fine.
This partition was about 220M.
Getting the FreeBSD files
Read the document before proceeding.
It shows you what files you need to download to your machine. I copied bin
and manpages over into their respective subdirectories under c:\freebsd.
But this didn't work. See the next paragraph.
NOTE: I found that using c:\freebsd did not work. I also tried
c:\FreeBSD and other upper/lower case combinations. But I was able to
get the install to work when I moved the bin directory to c:\bin. I
have sent a message to [email protected] and this information
has been added to ERRATA.TXT, and is fixed in 3.1-STABLE.
These files took up about 23 M.
The actual install
I direct you to the next part of the Handbook: Installing FreeBSD.
Although this has the same title as a section mentioned above, it
actually deals with the process of booting from the floppies. Which
is what I'm about to do. I've placed the kern.flp floppy in the
drive and I've restarted the machine.
Well, well, well! What do you know! I'm seeing the BTX bootstrap
loader as I type. OK. Now it's asked me for the mfsroot.flp floppy.
Things are looking good!
The rest of this section is divided up into the various screens which
are presented by the installation process. Each heading pertains to
a particular screen. Please refer to this document as you proceed
through the screens.
Kernel Configuration
OK. Now I have the Kernel Configuration Screen on my screen. I'm
going to choose Start kernel configuration in full screen visual mode.
In this screen you will be asked to remove any conflicts which exist
within the system. Basically, the system is designed to be generic
and work with most systems. What you need to do is remove the things
which you don't have. I'm sorry, but I can't be more specific than that.
For me, I have no SCSI devices, so I remove all of them. I also
don't have tape drives etc. Whatever you do, don't remove the system
console or you won't have a screen.
If you want this information be saved and used permanently, see the
information. Otherwise, you'll have to reenter
that visual configuration screen each time you boot. Your other option is
to make a custom kernel, which I recommend you do in any case.
Novice Install
After you save your changes and exit this screen, you will be
presented with /stand/sysinstall Main Menu. I selected Novice
Install.
FDISK Partition Editor
On this screen, I choose to delete the wd0s2 partition because it's
the one I created using fips. Well, didn't create it by name, but I
checked with fdisk under DOS and verified that the larger partition
was the one I created. It was listed as unknown whereas the smaller
partition was listed as FAT16, which was clearly my Windows 95
partition.
After deleting this partition, I created a new partition which became
the FreeBSD partition.
Boot Manager
I choose the FreeBSD Boot Manager.
FreeBSD Disklabel Editor
I pressed A for Auto. Then Q for save etc.
Choose Distributions
I choose the Kern-Developer distribution. Later in this section
you'll see that this failed and that I tried the minimal installation
instead. I don't know why it failed.
Choose Installation Media
I selected DOS. Then for the DOS Partition, I choose wd0s1.
WARNING - file location
As mentioned above, I moved c:\freebsd\bin to c:\bin as it just didn't
work otherwise. The message displayed said, more or less, that bin
could not be installed as it was not included in the distribution.
This was a problem with the version I was installing. Again, see
ERRATA.TXT for current information.
Oh oh! The install froze.
Hmmm, the install has stopped at 69%. I think I've run out of space.
I'll try again with just the Minimal Distribution. That failed at 5%.
This time I tried again, but under Options I turned on debug. That
means ALT-F2 gives you the debugging information and ALT-F1 gives you
the main screen.
This is going much better now. It's doing a MAKEDEV ALL now! Woo Hoo!
Post install configuration
The install has finished. But then it asks you for configuration
things. Such as Ethernet. Here's what I did:
- I said yes to Gateway and FTP.
- I chose the defaults for FTP details.
- I set the Timezone.
- I added two two users: myself and the system owner.
- I set the root password.
- I registered the system.
- I joined the announce mailing list.
The first reboot
OK. The reboot failed when it was probing ed0. That's my fault. I
don't think I've configured it properly. So I've rebooted and will
enter -c at the boot prompt. Ouch. The keyboard only responds to
ENTER at that point. That's not good enough! So I rebooted and
tried the UP arrow. That got me into a prompt. Then I chose boot
-c. Then I chose visual. This gets you back to the same point as we
were much earlier in the process when using the floppies. I again
removed the conflicts and continued with the boot. I got a root
prompt. All is well.
I booted back into Windows and looked under Network in the Control
Panel to see what the default settings were for my NE2000 card. They
were IRQ 5 and IO 300. OK.
Getting the NIC working
Now that I know the details of the card, I need to get it working.
Using the procedure mentioned in the previous section for getting into
the visual configuration. On this screen I configure ed0 as
specified within windows. After the system boots, I login as root.
Then I type the following to configure ed0:
ifconfig ed1 10.0.0.10 255.255.255.0
At this point the box is now live and on the LAN.
How long did all this take?
The above took about 8 hours all up. That includes my writing time
and the mistakes. Your time should be less than 2 or 3 hours.
What's next?
Well, ed0 isn't working properly, so I have to create a new kernel,
but you will recall that I went with the minimal installation. This
means that this machine doesn't include the tools for creating a new
kernel. For example, /usr/src is empty. But I have another machine
which is also 3.1-Release. So I will compile the kernel on that
machine and then copy the results to the other machine.
Other configuration
Here's what I added to /etc/rc.conf. These changes gave the box a
name, enabled the gateway (for later use), set up ed0, and specified
our gateway.
# This file now contains just the overrides from
# /etc/defaults/rc.conf please make all changes to this file.
# -- sysinstall generated deltas -- #
gateway_enable="YES"
debug="YES"
# items above were added during install.
# items below were added by me.
hostname="kennett.freebsddiary.cx"
firewall_type="simple" # Firewall type (see /etc/rc.firewall)
network_interfaces="ed0 lo0" # List of network interfaces
# (lo0 is loopback).
ifconfig_ed0="inet 192.168.0.45 netmask 255.255.255.0"
inetd_flags="-l -R 1024" # Optional flags to inetd.
### Network routing options: ###
defaultrouter="192.168.0.20" # Set to default gateway (or NO).
In order to use the existing DNS server, I created /etc/resolv.conf
which contained the following:
search freebsddiary.cx
nameserver 192.168.0.20
Compiling the kernel
I installed only the minimal stuff which means I don't have the
necessary stuff to compile a kernel. So I compiled it on another
machine and transferred it over. After this process, the new kernel
had ed0 in it with the correct values.
Did this help?
This was the first time I've installed FreeBSD on Windows 95. If
this doesn't work for you, I'd like to know about it. All feedback
will be appreciated.
- Dan
Return to Issue #5
|