gmirror – recovering data from a failed hard disk

Having a working RAID and data mirroring set up on your server/PC is great for when your one of your hard disks dies, but what to do when this really happens to you? How do you get that data back?

This article shows what to do to retrieve your data back on a FreeBSD system that uses gmirror

I like RAID. On my development server, I use both hardware and software RAID. For hardware RAID on FreeBSD, I like 3Ware. For software RAID, I tend to use gmirror, because I don’t need more than RAID-1.

Some time ago I added two 120GB HDD to this system. One was SATA, one was PATA. They were joined together via gmirror. Tonight I received some errors that one of the drives was failing. I replaced the drive, and recovered the mirror. I’ll show you what I did, mostly so I know what to do the next time it happens, but also so you can see what to do as well.


Running Google Chrome on FreeBSD

Since Google Chrome just recently launched and it unfortunatly only supports Windows I felt a little bit dissapointed. But hey that doesn’t stop me so easy. So i decided to check out what wine (a windows api emulator for linux and FreeBSD) could do for me.

So i downloaded chrome and tried to run ChromeSetup.exe with wine. No success, wine whined about a windows sytem call regarding http not implemented. So i googled around a bit and noticed that that call was implemented in the latest wine… Did i run the latest wine? no…

Read further: Part 1 – Part 2

Yesterday I mentioned that Google Chrome is released under the BSD License. Oliver suggested (in the comments) that the EULA is very restrictive and Chrome cannot be ported to FreeBSD. Google has changed the EULA now after a storm of protest. Ars Techica concludes that since Chrome is released under the BSD license, the EULA is unenforceable.

It’s worth noting that the EULA is largely unenforceable because the source code of Chrome is distributed under an open license. Users could simply download the source code, compile it themselves, and use it without having to agree to Google’s EULA. The terms of the BSD license under which the source code is distributed are highly permissive and impose virtually no conditions or requirements on end users.

Whatever the license restrictions, Chrome is open source and I’m sure the Wine team will get it to run without major hickups soon.

Embedded FreeBSD systems

FreeBSD was developed with server use in mind. It’s rock solid and ultra stable, and therefore perfectly suited to be used where reliability is required. Since FreeBSD is a flexible operating system, it can be easily adapted for other uses as well; one of which is the use on embedded systems or systems requiring a stable but small-footprint OS.

There are three such small bare-bones versions of FreeBSD (as far as i’m aware): TinyBSD, NanoBSD and miniBSD.

is a set of tools and shell scripts, part of the FreeBSD base system (/usr/src/tools/tools), designed to make the development of embedded systems based on FreeBSD as easy as possible. The TinyBSD script can be used on FreeBSD 5.x, 6.x and 7.x and 8-CURRENT to created a mini FreeBSD version.

The installed FreeBSD generates an embedded system image which is about 20MB in size and is a very generic approach. It comes with support for a number of wired NIC support and also the most popular wireless support, divert, bridge, dummynet, firewall, etc; and CPU_ELAN (for soekris devices). If the “generic” system gets tightened up the final result can be as low as an 8MB embedded system.

The process (though not graphical) can in a way be compared to nLite, a freeware application that lets users customise and remove components from their Windows installation CD and create a new customised, slimmed down ISO.

NanoBSD is a tool that creates a fully working FreeBSD system image for embedded applications, suitable for use on a Compact Flash card (or other mass storage media). The objective is to get a FreeBSD-like environment running on a CF-card with no extras by stripping down and customising FreeBSD.

NanoBSD is created by compiling it from the FreeBSD source tree (/usr/src/tools/tools/nanobsd)  and it works with FreeBSD 6.x, 7.x and 8.0-CURRENT releases.

NanoBSD can be used to build specialised install images, designed for easy installation and maintenance of systems commonly called “computer appliances”. Computer appliances, e.g. routers and firewalls, have their hardware and software bundled in the product, which means all applications are pre-installed. The appliance is plugged into an existing network and can begin working (almost) immediately.

One of the advantages of NanoBSD is that it’s part of the FreeBSD base system and it is easy to create, customise and use.

The features of NanoBSD include:

  • Ports and packages work as in FreeBSD. Every single application can be installed and used in a NanoBSD image, the same way as in FreeBSD.
  • No missing functionality. If it is possible to do something with FreeBSD, it is possible to do the same thing with NanoBSD, unless the specific feature or features were explicitly removed from the NanoBSD image when it was created.
  • Everything is read-only at run-time
  • Easy to build and customise. Making use of just one shell script and one configuration file it is possible to build reduced and customized images satisfying any arbitrary set of requirements.

miniBSD is a project developping a set of scripts that shrinks a running FreeBSD system to a small sized distribution suited for mass storage media, such as USB memory sticks and CF cards.

The size of the distribution is generally about 12-15Mb and contains everything one needs to run a FreeBSD system comfortably.

The scripts collect the necessary binaries, libraries, configuration files on a running FreeBSD system (4.x, 5.x and 6.x) and creates a disk image that can be saved on a CF card or USB memory stick.

The project started with the goal to create a FreeBSD system that could be fitted on a small compact flash without loosing too much of a full FreeBSD system. miniBSD is in a way half way between TinyBSD and NanoBSD.

Being small and fully featured makes miniBSD an optimal choice to develop routers, bridges, firewalls and vpn gateways.

Core Team: Gianmarco Giovannelli, Paolo Pisati, Davide D’Amico, Riccardo Torrini
Website: or


  1. nanoBSD has replaced picoBSD, which is out of date and hasn’t been updated for a long time.
  2. A new embedded version of FreeBSD is being worked on: ShinyBSD. This project is still in an early stage of development.

FreeBSD – A better chioce for the Open Desktop?

Thoughts about FreeBSD

Since is now a *BSD supporter, it only makes sense that we’d write a few Pro-BSD articles, right? Good.

Today, we’re going to talk about why FreeBSD is a better choice for the “Open Desktop”.

Linux is the current leading Open Source Operating System (LOL?). But, then again, Linux isn’t really an Operating System. Yeah, yeah; we’ve all heard that before. But, what should it be called then, you might ask. Well, the most common answer is “Linux is a kernel, which is then packaged into a something called a distribution with other software, thus making it an Operating System”. Those are the really nice terms, though, I would describe it like the following “Linux is a cluster **** of a kernel packaged into about 10 billion different distributions that are almost identical, yet cannot agree on a decent set of standards, so every software and hardware company cringes at the thought of having to support a super-dooper cluster **** like that is Linux.”

FreeBSD, on the other hand is a complete Operating System, with standards, a well organized development team, and all that jazz nobody gives a **** about.

Here’s a few basic comparisons: etc

  • Licenses
  • Main Development Team
  • Documentation
  • Advantages for the Power Users

There’s some strong language in this post (hence the **** above). A new version is in the make.

Thanks Justin for submitting this.

FreeBSD Clusters (video)

Matt Olander and Brooks Davis, two well known FreeBSD advocates, on FreeBSD clusters. This video was taken a few years back, but it’s still relevant explaining how cluster computing works on FreeBSD.

BSD and Linux are vastly superior to Windows

Linux and BSD are vastly superior to Windows in every way. Don’t believe me? Read on, my friend. Read on and realize the folly of your MS ways.

The top ten list:

#10 – Total cost of ownership ranges very low to nothing for Linux.
#9 – Linux and BSD distributions give you more complete, usable operating environments out of the box.
#8 – Viruses and Spyware are basically nonexistant for Linux and BSD.
#7 – Linux and BSD systems are more stable than Windows.
#6 – Linux and BSD supports more hardware out-of-the-box.
#5 – It’s easy and fun to develop high-quality software for Linux and BSD.
#4 – Linux and BSD distributions are more configurable and modular.
#3 – Linux and BSD perform better on any given platform.
#2 – Linux and BSD don’t limit your platform choices.
#1 – Linux and BSD give you complete freedom to do what you want with your system.

Read the whole post for the reasoning behind these statements

BSD Administrators and Jobs

Dru Lavigne posted an interesting post about oDesk, a company that provides a platform for business and qualified technology contractors to connect.

oDesk is a global staffing marketplace enabling businesses to Hire, Manage, and Pay remote contractors as if they were in the local office. Our proprietary tools and guaranteed payment policies enable a secure and trusted marketplace for both buyers and providers. We’ve mined through mountains of data about BSD (including FreeBSD, OpenBSD, NetBSD, and DragonFlyBSD) jobs, providers, certifications tests and more in order to bring you this single resource page containing statistics, information, maps, resources, links, and rankings. All information about programming and development work is based on the oDesk network that has providers from United States, Russia, India, Ukraine, China, and 100 other countries.

FreeBSD jobs trend page