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.

More…

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.

Google web browser: Chrome

On 1 September Google introduced its new web browser, Chrome, with a comic book.

Yesterday when Chrome became available I installed it and have been using it happily for a few hours. It’s light weight, fast and stable. As can be expected from Google the browser is simple and has a clean and intuitive user interface.

Today, Google launched a new web browser called Google Chrome. At the same time, we are releasing all of the code as open source under a permissive BSD license. The open source project is called Chromium – after the metal used to make chrome. Today, Google launched a new web browser called Google Chrome. At the same time, we are releasing all of the code as open source under a permissive BSD license. The open source project is called Chromium – after the metal used to make chrome.  Source

I know it’s only a beta version yet, but I was missing my favourite (Firefox) extensions and a “subscribe to RSS button”. Hopefully this will be added before the final version comes out.

Did you know that Microsoft had a multimedia browser project code-named Chrome back in 1998?Ironical or what?

Is the launch of Chrome the beginning of another browser war? We don’t know yet, but competition is always good. Do you remember the anti-trust cases against Microsoft for bundling Internet Explorer to Windows? Microsoft is now planning to sue Google because of Chrome claiming that Google is a monopoly, according to the Inquirer.

You may wonder why I post this on my BSD focused blog. Well, in the first place because Chrome is an open source project released under the permissive BSD license, and secondly I’m just excited about it. Google will be releasing a Linux and MAC version soon. Maybe this can be ported to FreeBSD too…?

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.


TinyBSD
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: http://www.minibsd.org or https://neon1.net/misc/minibsd.html

Notes:

  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.