This documentation is largely
for my own benefit - a record of what I did in case I ever need to rebuild
the machine. With any luck, this information will be useful to others (like
you, if you're reading this page and you aren't me). Mid 2001 I upgraded
an early model Dell Dimension 8100s (one of the early Pentium 4 desktop PCs)
from Windows Me (!) to dual-booting Windows NT4 and FreeBSD4.3. Now, mid
2002 the machine dual-boots Windows 2000 and FreeBSD 4.6. This page describes
my latest configuration.
FreeBSD boot messages
A Dell Dimension 8100/Limited happily runs Windows 2000 and FreeBSD4.6 + XFree86-4.2.0 + KDE 3.0, providing a decent combination of Windows and flexible unix code development environment.
Dell Dimension 8100/Limited: 1.3GHz Pentium4, 640MB RDRAM, 20GB hard drive, Sony CD-RW drive, Nvidia GeForce2 MX/MX 400 video card,
[Machine upgraded from
original 128MB RAM with two additional 256MB RDRAM modules. Original 40GB
Maxtor drive died with bad blocks late in 2001, replaced with Seagate Barracuda <ST320420A> 20GB 7200rpm drive for now.]
Dual-booting and Partitioning
FreeBSD4.6 and Windows 2000 were installed on separate BIOS partitions of the hard drive, and FreeBSD4.6's boot loader provided OS selection at boot time. Win2K uses the first two partitions, FreeBSD4.6 uses the third and fourth partitions.
Win2K supports FAT16 partitions and enhanced NTFS partitions. FreeBSD4.6 can natively mount FAT16 partitions in addition to regular FreeBSD UFS partitions. Although most of the disk is split between NTFS and UFS, I allocated 1GB of space as a FAT16 partition to be shared between FreeBSD and Win2K. This partition would be home to files that needed to be accessed under either OS. [Note: Neither Win2K nor FreeBSD can support multi-user permissions on files in the FAT partition. Under FreeBSD I mount the partition with my user account as the owner and group for the entire partition.]
I used the FreeBSD installers tools to partition the hard
drive, then installed Win2K, then went back and completed the installation of FreeBSD4.6.
Installing Win2K and FreeBSD
Assume we have a FreeBSD4.6 installation disc (disc 1 of the four disk ISO set). Reboot the machine with the FreeBSD CDROM installed. The FreeBSD boot process will prompt you for an initial kernel configuration step - skip it, and continue to the main Installation program. Select a Standard Installation, and you'll now be prompted to create the intial partitioning of the hard drive.
Because of its BSD/Unix roots, FreeBSD actually uses the term "slice" to refer to what the PC-world calls "partition". The traditional PC BIOS allows a disk to contain up to four distinct partitions, each containing a different file system (FAT16, NTFS, FreeBSD UFS, Linux, etc). Traditional BSD (from which FreeBSD is derived) uses partitions as key mount points for members of the unix directory tree and the swap space. Since FreeBSD was designed to co-exist on PC platforms and their BIOSes, BSD-style partitions are created inside BIOS partitions. To keep the names distinct, FreeBSD decided that BIOS partitions would be referred to as slices.
The first step in the installation process is the FDISK Partition Editor, which allows you to modify the BIOS partitions of the hard drives. From FreeBSD's perspective, the 8100's internal IDE drive is device /dev/ad0 (master). [Any additional slave drive on the same IDE cable would be /dev/ad1.] I used the FreeBSD partition editor to set up four partitions on the 20GB drive - the first two for Windows 2000, the last two for FreeBSD itself:ad0s1 1GB FAT16 (type 6)
[ads03 and ads04 allow me to keep my OS installation (in ad0s3) separate from
my home directories (in ad0s4). This allows me to simply blow away ad0s3
during upgrades to newer versions of FreeBSD without touching my data, personal
Press 'W' to force the new
partition assignments to be written to disk. You should now quit, and reboot
with WIndows 2000 installation disk. Win2K will notice your FAT16 and NTFS
partitions, and insist that ad0s1 becomes the "C:" drive and ad0s2 becomes
the "D:" drive. Tell Win2K to install on the D: drive. The installer will
place a small collection (less than 700K) of boot-time files on the C: drive
anyway, but the bulk of Win2K will then end up on ad0s2. (Ignore any offer to
convert/format the C drive partition to NTFS, and definitely ignore
offers to reclaim the remaining two drive partitions that Win2K
doesn't recognize.) The Win2K installation process will include some
intermediate reboots (if you're watching at the time, FreeBSD's boot
loader should fall through to booting the new/partially installed
Win2K boot code that's now on the first partition). At least in my
case the Win2K installation process went off without a hitch. In the
end you'll have a machine that boots into Win2K, and shows you have a
1GB "C:" drive and a 12GB "D:" drive.
Reboot from the FreeBSD 4.6
installation CDROM and head to the FDISK partition editor. Quit the partition
editor ('q' option) without changing anything and you'll be prompted to install
the FreeBSD boot loader in the Master Boot Record (MBR). Do this. The boot
manager provides OS selection at boot time from now on. You'll then be taken
to the "Disk Label Editor" and offered the chance to set up BSD-style partitions
inside the previously assigned FreeBSD slices ad0s3 and ad0s4. Ignore the
entry for ads01, the label editor is just noting that it recognizes the FAT16
partition. I assigned:
(ad0s3c conventionally represents the entire slice ad0s3, ad0s3d is unused by default.)
Continue with the
FreeBSD installation onto ad0s3.
At this point both the local CDROM drive and internal ethernet port are recognized.
(Although there's probably no reason not to continue installing from the
CDROM, you could choose to continue the installation over NFS or AnonymousFTP
from another machine on the local LAN. In my most recent re-instal I used NFS over the inbuilt ethernet port.)
When the installation
process prompts you to add additional packages, I found the following
to be a useful initial set: The 'ports' collection, X windows, KDE3 (the K desktop
environment), linux-compatibility, scanssh-1.60, nbtscan, and mtools.
KDE3 is a meta-package that pulls in key
KDE 3.0 desktop components. [You don't need to pull in too many
packages during the installation process, they can be added later
from the CD-ROM or over an Internet connection with "pkg_add -r <packagename>"] After my basic installation, the disk usage under FreeBSD as reported by 'df -h' was:
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s3a 126M 32M 83M 28% /
/dev/ad0s4e 2.7G 20K 2.5G 0% /home
/dev/ad0s3f 252M 4.0K 232M 0% /tmp
/dev/ad0s3g 1.4G 817M 458M 64% /usr
/dev/ad0s3e 252M 3.6M 228M 2% /var
procfs 4.0K 4.0K 0B 100% /proc
A note about X11: During the installation process you'll be prompted on whether to include X windows by default. As of FreeBSD4.6 the default is XFree86-4.2.0, so I advise selecting the "X Windows + " installation option. (If you don't, you can always add XFree86-4.2.0 as a package later.) However, I chose to keep the installation process simple by declining to configure the X server until after I'd completed the entire FreeBSD4.6 installation process. (The configuration of X is easily performed as 'root' later.) The X server is installed non-suid. If you like living dangerously, remember to make it suid-root before trying to start up an X session as a regular user otherwise it wont be able to write a log file.
A caveat about security settings: don't select the highest security setting when prompted during installation, otherwise the X11 server will be unable to start (e.g. when you run "XFree86 -configure" either from console or during the installation process).
A note about modems: Many common PCI-card modems are "winmodems" that need special drivers. FreeBSD4.6 includes a package (ltmdm-1.4) that supports winmodems based on the Lucent chipset. Sadly, my 8100 had a "Conexant HCF 56K PCI Modem" based on a different chipset, so it would only work under Windows.
boot time you'll now be prompted with a list of four possible boot options
"F1 DOS, F2 ???, F3 FreeBSD, F4 FreeBSD". You should select F1 to boot Windows
2000 or F3 to boot FreeBSD from ad0s3. (ad0s4 is not bootable, since it contains
only one large partition holding the /home directory. ad0s2 is not bootable
either, since it is missing the Windows boot code.) If you don't make a selection
within a small number of seconds the previously selected OS is
booted. (If you reboot and get an error message of an invalid
partition table then somehown you've marked more than one partition
bootable. Go back to FDISK and make sure only ad0s3 is marked
Turn it off. No real need on a workstation, and if we want to start forwarding
mail I'd suggest installing qmail. Edit the following line to /etc/rc.conf:
(note, sendmail_enable="NO" is no longer sufficient to completely stop all sendmail related activity).
Sound: Sound support can be enabled simply by recompiling and reinstalling the FreeBSD kernel with the following option added to the kernel config file:
Reboot the machine,
go into /dev/ and run "./MAKEDEV
snd0" (the 'sox'
package includes a 'play' command that seems capable of driving the
sound card). Now "cat /dev/sndstat" should confirm correct installation of sound driver
and recognition of the internal card:
[When recompiling the kernel for sound support, it is probably useful to edit the kernel config file to remove support for cpu support 386, 486 and 586 processors, since the Dimension 8100 uses a 686-class processor.]
XFree86-4.2.0: Run "Xfree86 -configure" as root to generate the initial XF86Config.new file, then copy it to /etc/X11/XF86Config.
XFree86 seemed to have no problem recognizing my Nvidia GeForce2 MX/MX 400 graphics accelerator.
However, it might get confused about the type of monitor and mouse you're using (e.g. if you are using a KVM between the mouse, monitor and the computer,
which I was). If you
see the following line in your XF86Config file:
Option "Protocol" "MouseSystems"
then replace it with:
Option "Protocol" "auto"
Also add this line to the mouse input device section to enable support for wheel-mice:
Option "ZAxisMapping" "4 5"
Finally, add the imwheel-0.9.9 package and make sure imwheel is started from your .xinitrc.
FreeBSD boot messages
I didn't tweak
IRQs or search for conflicts. Here's what FreeBSD4.6 reported when
Copyright (c) 1992-2002 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 4.6-RELEASE #0: Tue Jun 11 06:14:12 GMT 2002
Timecounter "i8254" frequency 1193182 Hz
CPU: Pentium 4 (1296.07-MHz 686-class CPU)
Origin = "GenuineIntel" Id = 0xf07 Stepping = 7
real memory = 670593024 (654876K bytes)
avail memory = 646795264 (631636K bytes)
Preloaded elf kernel "kernel" at 0xc04d0000.
md0: Malloc disk
Using $PIR table, 9 entries at 0xc00fbbf0
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pcib1: <PCI to PCI bridge (vendor=8086 device=2532)> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <NVidia model 0110 graphics accelerator> at 0.0 irq 5
pcib2: <Intel 82801BA/BAM (ICH2) Hub to PCI bridge> at device 30.0 on pci0
pci2: <PCI bus> on pcib2
pci2: <unknown card> (vendor=0x1274, dev=0x1371) at 10.0 irq 11
pci2: <unknown card> (vendor=0x14f1, dev=0x1036) at 11.0 irq 5
xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xec00-0xec7f mem 0xff1efc00-0xff1efc7f irq 3 at device 12.0 on pci2
xl0: Ethernet address: 00:b0:d0:17:b7:e5
miibus0: <MII bus> on xl0
ukphy0: <Generic IEEE 802.3u media interface> on miibus0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
isab0: <Intel 82801BA/BAM (ICH2) PCI to LPC bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH2 ATA100 controller> port 0xffa0-0xffaf at device 31.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <Intel 82801BA/BAM (ICH2) USB controller USB-A> port 0xff80-0xff9f irq 11 at device 31.2 on pci0
usb0: <Intel 82801BA/BAM (ICH2) USB controller USB-A> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
pci0: <unknown card> (vendor=0x8086, dev=0x2443) at 31.3 irq 10
uhci1: <Intel 82801BA/BAM (ICH2) USB controller USB-B> port 0xff60-0xff7f irq 9 at device 31.4 on pci0
usb1: <Intel 82801BA/BAM (ICH2) USB controller USB-B> on uhci1
usb1: USB revision 1.0
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
orm0: <Option ROMs> at iomem 0xc0000-0xca7ff,0xca800-0xcbfff on isa0
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model IntelliMouse, device ID 3
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1: configured irq 3 not in bitmap of probed irqs 0
ad0: 19458MB <ST320420A> [39535/16/63] at ata0-master UDMA66
acd0: CD-RW <SONY CD-RW CRX140E> at ata1-master PIO4
Mounting root from ufs:/dev/ad0s3a