BSD Magazine issue 2010-09: BSD and Linux

The BSD Mag September issue is about BSD and Linux

The following articles can be found in this issue:

Installing a Citrix Client on FreeBSD

As our computing needs change, so does our criteria for selecting an operating system. Today, my job and my family are in different cities.

Writing shellcode for Linux and *BSD

A shellcode is a sequence of machine language instructions which an already-running program can be forced to execute by altering its execution flow through software vulnerabilities (e.g. stack overflow, heap overflow or format strings).

How To Convert Text to Voice Using Festival and Lame in FreeBSD

In 2007 I built a web-based IM/ Chat Service which was later launched as an iPhone web app. Making a long story short I retired the service in 2008 and that was that.

FreeBSD Squid proxy with Parental Controls How-To

Traditionally, web pages were served via a webserver such as Apache and transmitted via the network on port 80 to a web-browser.

Network monitoring with Nagios and OpenBSD PART 2

So our OpenBSD-based network now includes redundant firewalls, domain name servers, a mail gateway  and a web proxy cache .

The Difference Between FreeBSD and Ubuntu in a Not So Technical Way

As a system administrator, I have been using various distributions of Linux and FreeBSD. I am comfortable in a mixed environment of *nix operating systems to provide network services.

Download: BSD Magazine 2010-09 (Linux and BSD)

PC-BSD Q&A in this Week’s DistroWatch Issue

Jesse Smith from DistroWatch recently asked DistroWatch readers to submit questions about PC-BSD.  The questions, with Dru Lavigne’s answers, can be read in this week’s issue of Distrowatch.

The questions asked were:

  • What is your opinion on the differences between the BSD license and the GPL, and how it works for how BSD does things? Why would a developer choose a license which allows a commercial entity to use their code and make money from it without giving anything back (i.e. OS X)?
  • Going back to the basics, it’d be interesting to know why one might choose a BSD operating system over a Linux distro, and vice versa. What is/are the core function(s) of BSD, and what sets it apart from Linux (other than the different licensing schemes)?
  • What are some of the philosophical differences between the BSD kernel and Linux kernel coders? And can things like drivers be shared between the two camps?
  • Could you please compare and contrast BSD Ports and Linux package management?
  • I would appreciate hearing your insight into the Oracle/Google lawsuit, Java and patent issues. I would also love to hear about your perspective on some of the new upstart BSD distros that include installers and GNOME/KDE (PC-BSD, GhostBSD, GNOBSD).
  • I would love to try a BSD distro, and I like the look of PC-BSD, but I don’t want to download the large DVD image. Are there plans for a live CD edition any time soon? Perhaps one with Xfce or LXDE instead of KDE?
  • It is already possible to install ZFS from the GUI installer of PC-BSD. In fact I was able to establish a functioning mirrored “rootpool” using the installer with a minimum of fuss. The problem is that there is no default (suggested) file system layout that is specifically tailored to zpools (like there is in OpenSolaris) and you have to create your own, unlike the default (or suggested) UFS layout provided by the PC-BSD installer. This puts a premium on user knowledge. So I was wondering if future installers will have an even more “user-friendly” approach to ZFS installation, where ideal partition layouts are recommended by the installer?
  • Will there be any attempt to improve on the power and flexibility of the BTX bootloader that PC-BSD uses? Is it even conceivable that PC-BSD might incorporate GRUB 2? Right now it is supposed to be possible to install GRUB on PC-BSD, but I think people have had a lot trouble doing this, with GRUB 2 at any rate.
  • I’ve tried to install PC-BSD, but if it’s not video issues on my new machine it’s boot issues on the old one. What can a relative computer Luddite like myself (who’ll try something but probably never dig that deep into getting it to work) do to encourage better hardware compatibility on future releases?
  • I have been using PC-BSD and plain FreeBSD (with KDE) for quite a while. With FreeBSD you have the option of using it in “rolling-release style” by upgrading your ports on a regular basis. But you can restrict your port upgrades and just upgrade those ports that have security vulnerabilities if you like. Just run portaudit and it will tell you what needs upgrading. Now, as you know, PC-BSD is not a rolling release (unless you use the ports system with it and want to constantly upgrade). But I have noticed that the number of “system updates” in PC-BSD are very few and far between. They seem even fewer then just the security patches provided by FreeBSD (i.e. the portupgrades applied only to the vulnerable ports). So my question is, in light of these fewer system updates, is PC-BSD more insecure then FreeBSD? (I am assuming that one is not using the ports system with PC-BSD.) I realize that a lot of the vulnerabilities that portaudit reports are only relevant if you are using a server, but this is not universally true, and I can’t shake the feeling that PC-BSD is significantly behind the curve when it comes to providing package updates that eliminate security problems. If PC-BSD has a flaw relative to FreeBSD (or most Linux distros) this might be it.
  • Is there anything else you’d like to add about the PC-BSD project or BSD in general?

Read the answers: Interview (by Jesse Smith)

FreeNAS 8 alpha snapshot ready for testing

Warner Losh from iXsystems announced the availability of a FreeNAS 8 alpha build today.

The iXsystems engineering team has moderized FreeNAS in a number of ways. We wanted a platform that was more extensible than the current m0m0wall-based framework allowed. We wanted to create a platform that could be expandable by modules (possibly not even written by us). We wanted to make it easier to upgrade the base FreeBSD release, as well as leverage more base FreeBSD technology that has been integrated into the system since FreeNAS was originally developed.

We’ve migrated the build to be NanoBSD based. This allows us to leverage the embedded work that has gone into NanoBSD. It also allows us to push some of the features that are important to FreeNAS back into the base FreeBSD distribution. NanoBSD gives us the flexibility that we need. Since we’re using the FreeBSD package system to add ports and packages, users will be able to add their own packages (we’ll likely expand the basics to use the PBI’s that PC-BSD produces for ease of installation). We’re using the normal rc.d system, so upgrading is easier as well. etc

It has taken some time to come to these builds but iXsystems has been working hard to move FreeNAS from a m0n0wall base to a nanoBSD base. This will upgrading the underlying FreeBSD base system go smoother, and the new design makes development of plugins easier. Imagine FreeNAS with the ability to import PBI plugins and updates. That would be cool.

Olivier as put some screenshots on the FreeNAS blog, including some hints on how to set the the disk(s) and services.

Happy testing.

FreeNAS is an embedded open source NAS (Network-Attached Storage) distribution based on FreeBSD, supporting the following protocols: CIFS (samba), FTP, NFS, TFTP, AFP, RSYNC, Unison, iSCSI (initiator and target) and UPnP. It supports Software RAID (0,1,5), ZFS, disk encryption, S.M.A.R.T/email monitoring with a WEB configuration interface

FreeBSD quick news and links (week 35)

Some FreeBSD related links and updates below:

New NVidia FreeBSD drivers 256.53

NVidia has updated its graphics drivers for FreeBSD. Some of the changes are:

  • Fixed a bug that prevented XvMC from initializing in most cases.
  • Added support for xorg-server video driver ABI version 8, which will be included in the upcoming xorg-server-1.9 series of releases.
  • Fixed a bug that caused extremely slow rendering of OpenGL applications on X screens other than screen 0 when using a compositing manager.
  • Fixed a regression introduced after 256.35 that caused stability problems on GPUs such as GeForce GT 240.
  • Fixed a slow kernel virtual address space leak observed whenstarting and stopping OpenGL, CUDA, or VDPAU applications.
  • Fixed a bug that left the system susceptible to hangs when running two or more VDPAU applications simultaneously.

BSD License Generator

One shouldn’t have to change too much text when adapting the BSD license, but for the lazy there a BSD License Generator.

Benchmarking HAProxy – Ubuntu vs FreeBSD

“HAProxy on Ubuntu, or HAProxy on FreeBSD? I couldn’t find any real benchmarks comparing the two out in the wild, so I decided to do my own.”

More: Benchmarking HAProxy – Ubuntu vs FreeBSD

Installing pfSense on a Nokia IP120 firewall

“I was recently toying with an old Nokia IP120 firewall and discovered that pfSense would run quite well on this old hardware.”

Here’s how to do it: Installing pfSense on a Nokia IP120 firewall

FreeBSD Stable Release Install Guide

There’s already the excellent FreeBSD Handbook, but here and there you can find other useful guides, for instance the FreeBSD Stable Release Install Guide.

Up to date, Step by Step, How-To, Instructional Guide to Installing FreeBSD from scratch, Specifically written with background information covering the why and how the different components are used together to create a home or small enterprise network for the new-be and inexperienced FreeBSD computer hobbyist. Not a General reference type of document, but a true learning aid containing details unique to the stable version of FreeBSD your installing: a1poweruser.com

The history of Unix on the PC: Exploring lesser-known variants

“When someone discusses the Unix operating system on a PC, many modern computer users think of Linux, a Unix work-alike first released by Linus Torvalds in 1991. Linux is a relative newcomer to the field; Unix and Unix-like operating systems have been released for Intel x86-based systems as far back as 1979. This article covers some lesser-known Unix variants for IBM PC-compatible systems, both those that survive today and the ones that were not long-lived or commercially successful:

The history of Unix on the PC: Exploring lesser-known variants

FreeBSD will continue supporting ZFS

OpenSolaris may be dead now; its advanced techologies such as the ZFS file system continue to live on in FreeBSD.

FreeBSD Developer Pawel Jakub Dawidek confirmed that he is preparing a port of the OpenSolaris ZFS v28 file-system.

Some of the new features included in v28 are:

  • Data deduplication
  • Triple parity RAIDZ (RAIDZ3)
  • zfs diff
  • zpool split
  • Snapshot holds
  • zpool import -F
  • continue to work on ZFS

Instructions on how to test the latest patch can be found on the mailinglist.

Martin Matuska has issued two calls for testers to try out his improvements to the ZFS code.

Pawel confirmed the commitment of the FreeBSD Project to ZFS:

… a message we, as the FreeBSD project, would like to send to our users: Eventhough OpenSolaris is dead, the ZFS file system is going to stay in FreeBSD. At this point we have quite a few developers involved in ZFS on FreeBSD as well as serveral companies.

Should OpenSolaris users consider moving to FreeBSD?

OpenSolaris has been in troubled waters after Oracle acquired Sun, the corporate sponsor of the OpenSolaris Project. The OpenSolaris operating system is a descendent of the UNIX System V Release 4 (SVR4) codebase, and OpenSolaris is was the name of the project initiated by Sun to build a developer and user community around the software.

A few months passed since the acquisition, but Oracle wasn’t communicating with the OpenSolaris Governing Board (OGB) about its plans for OpenSolaris’ future. The OGB set an ultimatum. A few weeks later an email from Oracle to its employees surfaced, making it clear that Oracle had no interest in keeping OpenSolaris going. After the deadline passed, the OGB resigned on 23 August 2010.

Does this mean that openSolaris is dead? Well, the source code is open and available, but there’s now no company behind the project to sponsor it and steer it in the right direction. Unless there’s somebody very motivated or a company with a special interest in OpenSolaris, the operating system will probably die a slow death. Maintaining and further developing a project like OpenSolaris without developers and without community, won’t be very rewarding.

During the time of unrest a group of former OpenSolaris developers decided to fork the distribution, and now development of an OpenSolaris based OS continues under a new project called Illumos.

With OpenSolaris being left to die, and IllumOS still being very young, should OpenSolaris users and developers not start looking for another mature operating system to use and develop for, instead of forking? An operating system that’s in a way similar? An advanced operating system that’s independent from any commercially driven owners?

FreeBSD has benefited from and ported some of OpenSolaris’ advanced features such as DTrace and ZFS. Beside that, FreeBSD contains other technologies similar to those found in OpenSolaris.

One of the advantages of moving to FreeBSD is that altough a number of companies contribute code to the FreeBSD base, non of them owns FreeBSD, neither can they push the project development in a certain direction. Interested companies, developers, volunteers and the community all work together.

So, should OpenSolaris users consider moving to FreeBSD? What are your thoughts on this?

FreeBSD Mall donates FreeBSD discs to NSRC workshops in Africa

The FreeBSD Mall, a provider of high quality FreeBSD software, documentation, support, and services to the open source community, recently donated FreeBSD CDs and DVDs to the NSRC (Network Startup Resource Center) for UNIX / FreeBSD workshops being held in Malawi and Tanzania.

The NSRC is a non-profit organization dedicated to spreading networking knowledge to diverse regions throughout the world. Open source operating systems are excellent instructional tools for NSRC workshops due to their easy and free acquisition and superior security and stability.

FreeBSD Mall has donated FreeBSD CDs and DVDs to NSRC and AfNOG (African Network Operators Group) workshops since as far back as 2000. Over 1300 participants have been instructed in approximately 50 NSRC and AfNOG workshops and tutorials. Discs donated by FreeBSD Mall are distributed to students who complete the workshops, allowing them to take home official copies of the software they were just trained on and continue to use those skills. O’Reilly Media also provides books so that people may continue the education process at home in combination with the software.

During NSRC workshops, students learn about network development and the logic behind it. Students are then “let loose” on hardware and software to experiment and learn hands-on with FreeBSD and UNIX. Beginners learn the ropes by installing the operating systems and learning basic commands and techniques. As students progress to the intermediate and advanced classes, they learn and experience more complex commands and tasks.

The NSRC uses these lab-based workshops to teach through doing; a process which also helps students to ensure that they can execute the skills they’ve learned to teach them to others in their community. With copies of FreeBSD in their hands, graduates of the workshops develop skills in networking and system administration in order to better their local community and find related jobs.

“I want to say a BIG thank you to FreeBSD Media. You may not know this, but through your support, we have now trained over 100 female Unix administrators on FreeBSD in the past three years. This is by no means a small number, when you look around your IT department and realize that there are very few women working in the tech industry.” – Dorcas Muthoni, General Manager, OpenWorld Ltd. and NSRC/AfNOG Workshop Organizer

(via)

Update on FreeBSD Jail Based Virtualization Project

Bjoern Zeeb has provided a summary regarding the completion of the funded portion of the FreeBSD Jail Based Virtualization Project:

“I am happy to report that the funded parts of the FreeBSD Jail Based Virtualization project are completed. Some of the results have been shipping with 8.1-RELEASE while others are ready to be merged to HEAD.

Jails have been the well known operating system level virtualization technique in FreeBSD for over a decade. The import of Marko Zec’s network stack virtualization has introduced a new way for abstracting subsystems. As part of this project, the abstraction framework has been generalized. Together with Jamie Gritton’s flexible jail configuration syscalls, this will provide the infrastructure for, and will ease the virtualization of, further subsystems without much code duplication. The next subsystems to be virtualized will likely be SYSV/Posix IPC to help, for example, PostgreSQL users. This will probably be followed by the process namespace.”

The full post can be read on the FreeBSD Foundation’s blog: Update on FreeBSD Jail Based Virtualization Project