Guard Against Data Loss with Mondo Rescue

Hugo shows how to use Mondo to restore your system in the event of catastrophic data loss.

Every computer user has lost data at some point. Unfortunately, the experience rarely teaches the user to backup his or her data regularly. Mondo Rescue creates one or more bootable Rescue CDs based on your filesystem. In the event of catastrophic data loss, you will be able to restore your entire system. Mondo supports Lin/Win dual-boot systems, RAID, ReiserFS, ext2, ext3, XFS, JFS and VFAT.

I wrote Mondo because no other program did what I wanted, nor was any program as easy to use. I back up, wipe, format and restore my own system at least three times a week using Mondo's latest release. Mondo is the only backup regime that I use.

Background

Mondo is a thriving open-source project; it can restore your OS and data from bare metal, and data loss has not been reported since May 2000. The project is coming along nicely.

In the beginning, Mondo was created to back up Windows-only systems and provide disaster recovery facilities for Windows users. While running a small computer store near Nashville, Tennessee, I realized that many of the people that bought computers from us were bringing them back to have the disks reformatted and the applications re-installed. Was this because they did not know how to maintain their own PCs? Was our hardware to blame? Either way, we needed a way to restore a fresh copy of Windows onto a typical PC, unattended, in 10-15 minutes. We were using Norton Ghost at the time, but Ghost didn't let us restore selectively; it was all or nothing. Also, Ghost tended to crash when copying Linux partitions.

Our idea was to run Linux on a CD but have Windows archived in big tarballs on said CD. Well, to cut a long and tortuous story short, it worked. I even managed to write code that would create a Windows-bootable VFAT partition.

In March 2001, an employee of Hewlett-Packard (Grenoble) became interested in the project. Bruno Cornec, a skilled programmer in the server division, began to look at the code. He started to play with it and improved it in numerous ways. Between September 2000 (when the project was shut down) and March 2001, two new versions of Mondo were released. Both were made possible almost entirely by Bruno Cornec, Maciej Kulasa and other contributors.

In June 2001, I built a new computer and got to work. By July 4, I had fixed all the major bugs, and Mondo v1.00 was released (no jokes about Independence Day, please).

How It Works

Mondo is just a bit shell script that wraps around two other tools: Mindi and afio.

Mindi, aka Mindi-Linux, is a mini-distribution that generates boot disks from your kernel, modules, tools and libraries. It is more likely than a generic boot disk to be binary-compatible with your existing software because its tools are copied straight from your hard disk. It also can generate an El Torito 2.88MB boot disk image. Mondo uses Mindi to create a 2.88MB boot “disk” and associated data “disks”, which are incorporated in each Mondo CD. Whichever modules were loaded at backup time are reloaded at boot time. So, in theory you will boot into almost the same environment you were in when you backed up.

Mondo-Archive works something like this:

  1. It squeezes your files into several tarballs, each 5-10MB in size.

  2. It puts those tarballs in a directory.

  3. It puts an El Torito boot floppy image and associated data files in that directory.

  4. It points mkisofs at that directory and pipes its output to cdrecord, which causes a CD to be burned that contains a copy of that directory and its contents.

  5. It repeats the above steps for N CDs, N being the number of CDs it takes to accommodate all your files.

Kernel Configuration

Mindi v0.38 comes with a 2.4.7 fail-safe kernel, in case your kernel does not support all the features required by a boot disk. This is not Mondo being picky; this is Linux being awkward. Some kernels are just not suitable for boot disks. Novice users should stick with their default kernel and make Mindi use its own kernel by saying no when asked if they want to make a boot disk with their own kernel.

Advanced users should make sure that their kernel includes the following, built-in: CD-ROM support, IDE CD support, IDE support, initrd and RAM disk support, floppy disk drive support, stable loopfs support (which means it really needs to be 2.2.17 or later, or 2.4.5-ac10 or later) and ISO9660 support.

In case your kernel does not support these features, you should probably use Mindi's own kernel until you are confident enough to build your own kernel. If you find that Mindi's kernel does not support something you need (e.g., XFS) then please let me know. I will probably add the feature to the next release of Mindi.

______________________

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix