Ceci est une ancienne révision du document !
What do Yahoo, Yandex.ru (bigger than Google search engine in Russia), the Playstation 4, pfSense, Hotmail, and Netcraft have in common? They’ve all run FreeBSD, or a fork of FreeBSD at some time. While Hotmail (outlook.com) has been on Windows server for a number of years, those of you who remember the old Hotmail will probably also remember how fast hotmail was when the site ran FreeBSD.
Many years ago, I ran FreeBSD too, that was until I ran into an issue getting a printer driver for the HP Deskjet I’d just bought. Prior to this, I was one of the folks who had a FreeBSD subscription from Walnut Creek. After a broken release (in one release /stand/sysinstall was broken and the way to fix it was getting a file from the Internet, defeating the purpose of buying the CDs), and high speed becoming more available in our area, I stopped subscribing. The CD subs were a great value, but all things change and I began shifting back towards Linux (I used Slackware 96 back in 1997).
One of the things that attracted me to FreeBSD was the interesting collection of software in the ports system. Ports are essentially Makefiles that link to downloads (or on the CD/DVD) of source code. You make the software much the same way you do with a Linux distribution like Arch, Gentoo, or Slackware. Another great thing about FreeBSD is that it is available for a wide range of hardware platforms. FreeBSD 10.1-RELEASE (the current release at the time of this writing) ISOs are available for amd64, i386, ia64, powerpc, powerpc64, sparc64 and armv6 architectures. My recollection of FreeBSD was that it was blazingly fast. What I forgot was, like Gentoo, Arch, or Slackware, FreeBSD takes a bit of reading and tweaking to get going…
Installing FreeBSD isn’t particularly difficult. In fact it follows a similar process as a Linux install: Select a keyboard mapping, choose a hostname, choose some optional components (extra docs, games, the ports tree and system source code), partition the hard drive, wait for the base packages to install, set the root password, configure a network connection, set the timezone, choose some services to start (sshd, ntpd, powerd, etc), add more users, and make any final changes before rebooting to an installed system. Anyone with experience installing Linux will find the process of installing FreeBSD familiar. The FreeBSD project provides decent online documentation, the FreeBSD Handbook at https://www.freebsd.org/doc/handbook/ to guide anyone through an installation.
All told, my FreeBSD installation took just over 15 minutes on a Pentium 4 1.7GHz notebook with 2GB RAM and a 5400rpm (slow) 80GB hard drive. One issue I ran into with my installation was that the Intel wireless card driver didn’t seem to get installed pre-installation so I had to use an ethernet connection. I installed FreeBSD 10.1. By default it uses the GPT partition scheme allowing for 3TB+ hard drives. There’s also an option to use the Zettabyte File System (ZFS). And, unlike some, I prefer to see each service load up rather than a spinning or flashy logo.
Once the install was finished, I found myself staring at every new Linux user’s nightmare: a command line prompt. For those looking for a desktop out-of-the box experience, PC-BSD is a good choice: http://www.pcbsd.org/.
It’s worth mentioning here that the FreeBSD handbook covers sysinstall. If you’re using FreeBSD 10.1, it uses bsdinstall instead of sysinstall. Browsing through the /sbin folder, I found a package named bsdconfig which seems to do the same job of installing packages (other than ports) that sysinstall did. But, when I tried bsdconfig, it seemed to hang for a very long period while it was querying any of the FreeBSD ftp servers. I’m not sure if this was a matter of me being too impatient waiting for the list to download, or whether there was an issue. Whatever the case, it appeared to me that FreeBSD was taking way too long just to query the ftp server (I could ping the server). At one point, I got an error message “error no pkg database found.” I tried installing the packages, using the DVD as a source, and ran into the same ‘no pkg database’ error. I found a couple of forum posts related to the error: https://forums.freebsd.org/threads/bsdconfig-no-pkg-8-database-found.49216/ https://forums.freebsd.org/threads/error-no-pkg-8-database-found.48142/
Unfortunately neither posts helped fix the issue. So I tried some of the pkg commands:
pkg update
pkg upgrade
Both commands worked and updated the packages available to the system from the Internet. So next I tried:
pkg install xfce
A bunch of packages and dependencies were installed. Still at a terminal I tried:
pkg install xorg
Many more packages installed. This time I tried the startx command and voila a desktop (not XFCE but TWM… but still a desktop). Unfortunately, when I tried to exit the TWM desktop using the Exit command in the menu, FreeBSD hung – the TWM window decorations disappeared but the windows stayed. I tried switching virtual terminals to issue a kill command, no luck.
The pkg command seems to work in a similar way to apt. pkg search <packagename> searches for <packagename> much the way apt-cache search can be used to find packages on a Debian/Ubuntu-based system.
At this state in the game, I have FreeBSD running and can find and install new packages. Next month, I’ll report more on my experiences with the ports tree. Getting back into FreeBSD after a more than 10-year absence makes me appreciate how easy Ubuntu makes things for desktop users. And while it’s a bit like comparing apples and oranges, FreeBSD can be made to look and run the same desktop software that Linux can. I’m sure, with a bit more reading and work, it will all come back. Next month, Part 2 of Trying FreeBSD.