This is just an informal comparison of FreeBSD release 4.x (such as release 4.10), and FreeBSD release 5.3. It was written mostly for people who are already familiar with FreeBSD 4.x, and are wondering what there might be in release 5.3 (and later) that they might find interesting.
Brief background of FreeBSD
- FreeBSD is one of a family of "BSD" operating system projects. "BSD" refers to the kind of license that all the source code is released under.
- Related projects are NetBSD, OpenBSD, Darwin (used by Apple as part of MacOS 10), and the new Dragonfly BSD project (which is an offshoot of FreeBSD 4.10). On a FreeBSD system, you can check the file /usr/share/misc/bsd-family-tree for more details. The latest version of that file can be seen at:
- FreeBSD is used by some major network providers/ISPs (Yahoo, NTT/Verio, NY Internet)
- Parts of FreeBSD are also picked up and used by some commercial OS's, such as MacOS 10, IRIX, Solaris. It is also used by some embedded systems.
- The official "1.0 release" of FreeBSD was on November 1993
FreeBSD 4.x vs 5.x - Background
- Official Release cycle:
- Release 4 vs 5 vs 6 --- Big Changes happen between these branches.
- Release 4.8 vs 4.9 vs 4.10 --- These are smaller, well-tested landmarks on the 4.x branch. API's and ABI's will usually be upwards compatible between these "minor" releases.
- Release 5.2 vs 5.2.1 --- Minor but significant fixes (to 5.2, in this example)
- Meaning of the active "CVS branches" in the FreeBSD CVS repository
- What CVS calls "MAIN" is what FreeBSD calls the CURRENT branch
- CURRENT vs STABLE vs SECURITY and ERRATA
- The RELENG_4 (4.x) branch was created in CVS around March 9, 2000 (which means "the 5.x-CURRENT series" started on that date).
- On November 6, 2004, we made available 5.3-RELEASE, and that marks the official start of 5.x-STABLE series.
http://www.FreeBSD.org/releases/5.3R/announce.html -- provides a short announcement for 5.3-RELEASE, information on various ways to obtain the release, and links to various pages that provide much more detail.
FreeBSD 4 vs 5.3 - Hardware Architectures
- Release 5 adds support for sparc64, amd64, and ia64 hardware ports.
- A port for PowerPC hardware is also close to being ready.
- The level of support for Alpha hardware has been lessened.
- Support for real 80386 systems (as opposed to 486 or Pentium) is de-emphasized. If you to run FreeBSD on real 80386 hardware architectures, then you might be better to stay with 4.x.
- Ports for ARM, MIPS and S370 hardware are "being worked on" by a a few developers (to different degrees).
FreeBSD 4 vs 5.3 - Kernel Level
- Much much effort on improving our SMP support, with the following goals:
- Better Performance on two CPU's
- Scales better on hardware with more (and more!) SMP processors
- A kernel configured for SMP now works on a single-processor system (although there is still some performance penalty in using
an SMP kernel on a single-CPU system, at least you can use it)
- We have added "Kernel Scheduled Entities" == KSE: New option for supporting threaded applications. There are both "M:N" and "1:1" implementations.
- Support for multiple schedulers: SCHED_ULE vs SCHED_4BSD (the default is still SCHED_4BSD). The process scheduler to be used is selected in the kernel configuration. SCHED_ULE is the newer scheduler, but it still needs some work to be completely reliable.
- System now uses the devfs method of populating /dev (so on Release 5.x systems there is no need for the MAKEDEV script).
FreeBSD 4 vs 5.3 - Filesystems
- Support has been added for UFS2
- UFS2 supports much larger disk partitions compared to the original UFS
- UFS2 will also support Access Control Lists (ACLs), although those are not yet supported by the operating system.
- Softupdates (vs logged filesystems like extfs3)
See info at http://www.mckusick.com/softdep/index.html
UFS snapshots (see separate wiki page: ExampleUfsSnapshots )
- The /sbin/dump command includes a -L option to automatically use a snapshot when dumping a live filesystem, so your dump will be a consistent snapshot of the filesystem.
- The /sbin/newfs command creates a .snap directory (which is owned by user operator) after initializing any filesystem partition, for use by /sbin/dump -L .
- In 5.x, softupdates also allows us to do "background fsck" at startup. If these are used, then after a system crash (for any reason), the system startup will not have to wait until the initial "fsck" finishes. That means the system can be available to users, even though "fsck" may not have completed. This is a big advantage on huge partitions that have millions of files.
- Release 5.3 includes GEOM, which is a major rewrite and improvement of the code which handles the partitioning of hard disks. Among other changes, this brought in support for the types of disk labels which are standard formats on sparc64 and PPC architecture. This rewrite will also make it easier to reliably implement new features in disk support, disk partitioning and disk I/O (such as additional styles of RAID support).
- One of the benefits of GEOM which is available in 5.3 is called GBDE. This provides support for encrypted disk partitions.
FreeBSD 4 vs 5.3 - Networking
- Network drivers: Out from under "the Giant Lock", which means much better performance on SMP systems.
- Imported pf (new packet filter facility) from OpenBSD. FreeBSD 5 now has three packet filters to choose from: IPFW, PF, IPFILTER. There have also been a number of improvements and new features for IPFW.
- Now using Random IP ID's (picked up from OpenBSD). This makes certain kinds of network-attacks much less effective.
- NDIS Binary Compatiblity, aka "Project Evil". FreeBSD/i386 can use binary Ethernet and WLAN network drivers from Windows, if they were written to the WindowsXP NDIS 5.1 specification.
- Ability to rename ethernet interfaces. Allows you to change any interface name to any arbitrary string of up to 15 characters.
# ifconfig -a bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 188.8.131.52 netmask 0xffffff00 broadcast 184.108.40.206 inet6 fe80::2e0:81ff:fe27:e0a9%bge0 prefixlen 64 scopeid 0x2 ether 00:e0:81:27:e0:a9 media: Ethernet autoselect (100baseTX <full-duplex>) status: active # ifconfig bge0 name office # ifconfig -a office: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=1a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING> inet 220.127.116.11 netmask 0xffffff00 broadcast 18.104.22.168 inet6 fe80::2e0:81ff:fe27:e0a9%office prefixlen 64 scopeid 0x2 ether 00:e0:81:27:e0:a9 media: Ethernet autoselect (100baseTX <full-duplex>) status: active
http://people.freebsd.org/~andre/FreeBSD-5.3-Networking.pdf describes these network changes, along with many others.
FreeBSD 4 vs 5.3 - Applications in Base System
- Perl is removed from the "base" system
- ...but it is almost always pulled in from the ports collection
- The installation CD's for Release 5.3 include the choice of Perl 5.6.1 vs 5.8.5
- The version of 'gcc' changes from 2.95.4 to 3.4.2. This was partially motivated by the desire to support all the new hardware architectures.
- The new version of 'gcc' required matching upgrades for binutils (now version 2.15) and 'gdb' (6.1)
- Release 5.x changes from BIND8 to BIND9 in base system.
FreeBSD 4 vs 5.3 - Misc
- There is the usual "this release supports more devices, and has better support for some devices". Examples include bluetooth, firewire and improved PCI and USB support.
- Support for ACPI (Advanced Configuration and Power Management) is now available, in addition to the support for the older APM (Advanced Power Management) BIOS standard.
- The acpi driver provides support for the Intel/Microsoft/Compaq/Toshiba ACPI standard. This support includes platform hardware discovery (superseding the PnP and PCI BIOS), as well as power management (superseding APM) and other features. ACPI core support is provided by the ACPI CA reference implementation from Intel.
- Release 5.x now has a new way of starting/stopping services via the scripts in /etc/rc.d/* (this was adapted from NetBSD).
- Some work has been done so the system can be compiled by icc or tcc in addition to gcc (icc == Intel's C compiler, tcc == C compiler from
- Newer boot-up manager. Somewhat nicer. (this might also be in the most recent 4.x releases. I have not done a clean install of 4.x for some time now). You will probably only see this if you do a clean install of Release 5.3 (or later), or if you remember to run 'disklabel -B' after building and installing a new system.
- dynamically-linked binaries in /bin and /sbin. This results in smaller executables and a smaller "root partition", but was mainly done so those programs can use dynamically-loaded services (such as 'pam' modules).
- 4.x used to have a /stand directory, which really was just for the initial installation of freebsd. That is gone, but there is now a directory called /rescue. This holds statically-linked versions of several key programs statically-linked and "crunchgen"ed together. These programs can be used if some event screws up the system libraries (such as a disk error, or a failed attempt to upgrade the OS)
- procfs is used much less. It is not mounted by default, and is likely to disappear at some point (6.0 or later).
- /dev/random now provides much better randomness. It is now "cryptographic quality". This includes the checking of multiple sources of entropy to make sure it supplies truly unpredictable random values.
- You can also checkout the migration guide at:
- My recommendation: If you are upgrading a system from 4.x to 5.3-RELEASE, you would probably be better off backing up all your important data, and doing a clean install. You can upgrade from (say) 4.10-release to 5.3-release, but you will have better results if you create brand new partitions, and install into them. Among other things, you probably want a larger root partition.
Upcoming FreeBSD 6.0
- Major New Features are NOT selected yet!
- In hindsight, we attempted way too many things in the 5.x-series, and most developers feel strongly that we must avoid that for 6.0.
- Developers really hope to see 6.0-RELEASE in less than two years, and not FOUR years! And we also expect to have 6.0-RELEASE as the start of the 6.x-STABLE series, instead of going all the way to 6.3-RELEASE before we are comfortable claiming that it is "stable".
This Wiki page is just an informal outline that I (GaranceDrosehn) had written up for a few public presentations I had done. It is not meant to be an exhaustive comparison of release 4.10 (or later) to release 5.3 (and later). It might not even be completely accurate. In some sense, it is just the changes which "effected me personally". Other developers are welcome up to update this page, or to contact me directly if there is anything I have grossly mis-represented.
I am also pretty sure that there are more changes than this in the big jump to release 5.3. This is only meant to be the most noticeable highlights. Again, other developers are welcome to add more to this.
The initial version of this Wiki web page was written on February 14th, 2005. However, most of it comes from outlines that GaranceDrosehn wrote in November and December 2004, and thus it might be a bit out-of-date.