FreeBSD - AMD64 Platform

This is a log of my experience with the amd64 platform of FreeBSD.

Orientation

The amd64 platform has a home page.

Hardware

I'm using the amd64 platform on the following computer.

I bought this machine from Computer Connection of Marin, who, after I told them of my main requirements (running FreeBSD and wanting a rackmount case to install in my 19" rack at home), suggested various options. As their website claims, these guys are fairly geeky and as far as I have determined, have steered me fairly well into the brave new world (for me) of AMD CPUs and associated hardware.

Internet Research

As part of assessing how FreeBSD would run on the above system, I found the following resources on the web.

I thought about waiting for the ASUS DDR2 board that supports the new AMD CPU chip type and socket, but I didn't want to be the first one with that board and have to solve incompatibility problems in order to run FreeBSD. Using a board that has been out for 9 months has allowed other people to blaze the trail so I can have an easier time following in their path.

I liked all the good reviews I read about Antec cases, and the fact that they have been around for awhile (meaning it's likely I could get parts if need be). I hate the case that houses my dual 450 MHz PIII system, one reason being it is a no-name case, so I can't find parts for it, and the clone builder who made it is apparently no longer in business.

I ended up choosing between the case I got and their Take4 quiet rackmount case. I went with the case I got because it would fit an extended ATX motherboard, which would be a dual-processor motherboard for example.

16 June 2006 - Applying Power to the System

One of the guys that works at Computer Connection warned me that the fans would be loud, and even though the motherboard is hooked up to control the fans so that they only operate when needed and at the minimum speed necessary, this requires drivers to be installed (or configurations to be written to ports), and the CD-ROM supplied by ASUS requires Windows XP. The fans are in fact loud, louder than another machine I've got that has the same number of fans (5).

Given the noise generated by four fans running full-speed in this case, I may have made a mistake! However, since the motherboard can control the power and speed of the fans, and the techs at Computer Connection apparently hooked up the chassis fans to the Q-Fan-controlled power connector, I should have a pretty quiet system once I set it up correctly. I do have the Q-Fan enabled in the two required places within the BIOS. The temperature threshold is 50 degrees C and the temperature sensors read about 37 degrees C. If there is something automatic that is already supposed to slow down those fans, it isn't working.

I've still got the power supply fan to listen to that I suspect will not be hooked up to Q-Fan.

One thing I don't like about the system is that I can't read everything that is displayed by the BIOS when the machine boots; it goes by too fast!

Booting the FreeBSD installation CD

The system booted up the FreeBSD 6.1-RELEASE disk 1 with no problem.

Running sysinstall

Here's the steps I took within sysinstall.

Installation

  1. Choose United States for the country in the big list box.
  2. Choose Standard Installation
  3. As part of partitioning the disk, I got a message that said:
    "WARNING: A geometry of 484521/16/63 for ad4 is incorrect. Using a more likely geometry. If this geometry is incorrect or you are unsure as to whether or not it's correct, please consult the Hardware Guide in the Documentation submenu o ruse the (G)eometry command to change it now.

    Remember: you need to enter whatever your BIOS thinks the geometry is! For IDE, it's what you were told in the BIOS setup. For SCSI, it's the translation mode your controller is using. Do NOT use a '' physical geometry ''.
  4. I went into the disk partitioner, hit G, and found the geometry sysinstall chose was 30401/255/63.
  5. I then exited the program, rebooted, and went into the BIOS setup.
  6. I could not find any information in the BIOS about the geometry, and reading the Hardware Guide was not helpful, so I am going to use the geometry suggested by the install program (gulp).
  7. Back into sysinstall
  8. Partition the disk into slices - press a to use entire disk for FreeBSD.
  9. Press q to quit the slice partitioner
  10. Choose to install the FreeBSD Boot Manager
  11. Set up partitions as follows
  12. Press q to finish partition setup

Next

  1. On Distributions, choose ALL for workstations, choose SERVER for servers
  2. Choose yes when asked if you want to install the ports tree
  3. Exit to the previous form
  4. Choose which medium to use in order to install FreeBSD (CD/DVD by default)
  5. Choose which CD/DVD drive to use (acd0 or acd1 - I chose acd0)
  6. Confirm disk writes
  7. It proceeded to install the packages.

Post-installation Setup

This involves after the initial generic kernel is installed, but still within the same invocation of the FreeBSD installation program.

  1. Asked if wanted to configure an Ethernet device, I said yes, but the only likely device I saw was fwe (Firewire Ethernet emulation). What cable do I use for this? Is this really the correct device?
  2. Bring the Ethernet interface up
  3. Don't designate/setup this machine as a network gateway
  4. Don't activate inetd
  5. Permit ssh logins
  6. Don't permit anonymous FTP
  7. Don't set up as an NFS Server
  8. Don't set up as an NFS Client
  9. Customize system console settings (like the screensaver)
  10. Set time zone
  11. System has a non-USB mouse
    1. Enable/run mouse daemon
    2. Ensure mouse moves in test

Packages

Said Yes when asked if I wanted to browse the package collection, then chose the following packages

Viewed the summary screen showing the packages I chose, then confirmed my choices

The Remaining Stuff

  1. Added users and groups - add user for me in wheel group
  2. Set system administrator password
  3. Say No to "Visit general config menu?"
  4. Exit install
  5. Confirm yes
  6. reboot

Rebooting after Installation

The system failed to boot. I apparently had created too many partitions on my single disk. I tried to create 10 partitions in the FreeBSD slice. After a while, it started labeling the partition devices as X. Upon reboot, the system failed to find these partitions because they had the same bogus name. I will research this. If I fail to find information on this, I will reduce the number of partitions.

Hurray for the FreeBSD Handbook. I found the section on Creating Partitions Using Disklabel and at the top it says that partitions are lettered from a to h. So, I can only have eight partitions per slice. Back to the installation program to completely reinstall.

Running Sysinstall to Limit Partition Count to Eight

I could create only seven partitions, since letter c was not available to me. I created:

Otherwise I repeated the same installation procedure as above.

Reboot after Repartitioning

This time FreeBSD booted successfully. I had to enter the page of so-called random keys during the boot to seed the random number generator. This will time-out after 5 minutes, so don't leave until the machine completes booting.

The Firewire Ethernet interface came up with no problem. But, I don't have a cable for it.

There is an Ethernet port on the back of the box. Looks like sysinstall didn't recognize the on-board NVidia Ethernet port; there's a report of that in one of the web pages whose links appears above. Time for more research, especially about that nfe driver mentioned in the A8N-VM CSM entry on the FreeBSD amd64 motherboards page.

I found the web page by the creator of a FreeBSD native device driver (nfe) for the NVidia nForce network adapter. Here is the link to his announcement of the availability of his driver. Next is for me to incorporate it into the kernel of my machine.


21 June 2006 - Configure on-board nForce Ethernet

Manually applied MII patch for the on-board Marvell 88E1111.

Creating a new kernel configuration file so I can remove the device nve line. Created directories /root/kernels and /root/kernels/RCS. Read man polling as suggested by the page on the nfe driver. Device polling sounds good, so I'll add that to the kernel config and the nfe driver source code. Not adding a CPUTYPE entry to /etc/make.conf for amd64. Added copy of GENERIC configuration file to RCS at /root/kernels/(machinename). Checked out config file, applied changes (remove device nvc, add options DEVICE_POLLING).

Run config within /usr/src/sys/amd64/conf for the config file. cd to ../compile/(machinename). Run make cleandepend ; make depend. cd to /usr/src. Run make buildkernel KERNCONF=(machinename). Run make installkernel KERNCONF=(machinename). Reboot. Uncomment #define DEVICE_POLLING in if_nfe.c. Make. Copy if_nfe.ko into /boot/modules. Run kldload if_nfe. Reported having an 88E1000, not an 88E1111. ifconfig also recognizes the nForce 430 Ethernet.

Configuring the nForce Ethernet (IP, gateway). Added if_nfe_load="yes" to /boot/loader.conf, putting loader.conf under RCS. Put /etc/rc.conf under RCS. Added entry for ifconfig_nfe0. Reboot.

Boot dmesg showed the nfe0 device. Pings to local network gateway failed. Removed the entry in rc.conf for the fwe0 device. Rebooted.

Works! Able to ping network gateway and ISP's web server.

I wonder if I will have to reapply the patches for the Gigabit Ethernet when I upgrade OS source code for security fixes.

Hook up Firewall

The FreeBSD Handbook has a nice section in IPFilter. I used the filter script from that page to start me off with firewall rules, rather than copy over my old one. I modified /etc/rc.conf to enable the loading of the IPFilter module. I put filter rules in /etc/ipf.rules, under rcs.

Upgrade OS with Security Fixes

I built the net/cvsup-without-gui port. I could have built the regular cvsup port because it has an argument to be command-line-only.

Copied stable-supfile and ports-supfile from /usr/share/examples/cvsup to /usr/src. Renamed stable-supfile to security-supfile. Put supfiles under rcs. Set version to RELENG_6_1, host in security-supfile. Set host in ports-supfile.

I'm running cvsup to get the security fixes.

The cvsup operation rolled back the patches I've made, so I'll have to reapply the Marvell patches.

Reviewed /usr/src/updating. Looked in /usr/src/sys/amd64/conf for updates to GENERIC and other files. Ran make buildworld in /usr/src. Ran make buildkernel, make installkernel with the custom kernel configuration file. Rebooted. Logged in. Su'd to root. Ran shutdown now. Ran mergemaster -p. cd /usr/src ; make installworld. Ran mergemaster. Reboot.

Edit /etc/resolv.conf to add the other name server supported by my ISP. Edit /etc/rc.conf to add ntp and ntpdate start-up configuration. Create /etc/ntp.conf ntpd configuration file. Add linux_enable="YES" to /etc/rc.conf to enable Linux binary compatibility. kldload linux failed, said File exists. Reboot. ntp information and Linux ABI information appears in the boot dmesg.

Update ports tree. Run cvsup ports-supfile from /usr/src. Run portsdb -Uu. Run make readmes. Run portversion to find ports to update. pkg_delete portupgrade and the ruby packages since they both need upgrading. make install clean lang/ruby18. make install clean sysutils/portupgrade. portupgrade -aR.

portinstall lots of the software I need. Fails to portinstall x11/kde3 due to the mysqlclient already having been installed. Trying again - I may have done portupgrade x11/kde3 this time - I'll check.


23 June 2006 - Continuing to Build Software From Ports

I halted the machine then later booted it and tried portinstall x11/kde3. This time it completed without error.

Building Java. Tried to build java/jdk14 but that port is marked as i386 only! Yikes! I didn't think to check if the amd64 platform would have Java. It does, fortunately: java/jdk15. Downloaded the files required for that. Added the fstab entry linprocfs /compat/linux/proc linprocfs rw 0 0. Ran kldload linprocfs but that gave me a file exists error. Mkdir /compat/linux, but the mount failed. Rmdir /compat/linux, then mkdir /usr/compat/linux, then the mount succeeded. Looked at the ports listing for OpenOffice.org 2.0. Found that the OO2.0 build supports use of JDK 1.5 (another thing I didn't check beforehand). Restart building java/jdk15.


24 June 2006 - Configuring X

Port builds completed. Problems included OpenOffice 2.0 requiring Bison 2 where Bison 1 had been installed on the machine. There were no packages dependent on Bison 1 so I deleted the package, then installed Bison 2.

Configuring x.org. Run Xorg -configure as root; writes /root/xorg.conf.new. Then, run X -config /root/xorg.conf.new - press control-alt-backspace to exit.


Back to FreeBSD main page