MondoMindi

Revision 24 as of 2006-03-02 00:21:26

Clear message

This document contains a step-by-step proceedure for setting up mondo/mindi backup and recovery on an Ubuntu Breezy box.

What is mondo/mindi?

From the mondo/mindi website (http://www.mondorescue.org) HowTo:

Mondo Rescue is a Disaster Recovery Solution which allows you to effortlessly backup and interactively restore Linux, Windows and other supported filesystem partitions to/from CD-R/RW media, tape, NFS, ... and Mindi Linux provides the bootable emergency restore CD/floppy set which Mondo uses at boot-time.

Description of this solution

The mondo/mindi configuration described herein comes curtesy of Nick Wheeler, who uses a similar proceedure to backup servers at work. I'm going to first describe the roll your own solution, building everything from source, and then hopefully Nick will help me refine and simplify the process so that x86 Ubuntu Breezy boxes can be setup with a single install script.

The "Roll Your Own" Solution

Prerequisits

Make sure you have the following packages installed:

  1. gcc
  2. make
  3. libnewt-dev
  4. buffer
  5. gawk
  6. syslinux
  7. afio
  8. cdrecord

Installation Proceedure

  1. sudo su -
  2. mkdir /usr/local/mondoiso
  3. cd /usr/local/src
  4. download each of the following (note: there may be newer versions of each of these by the time you read this, but I plan only to test this procedure every 6 months - with each Ubuntu release - and to put a version know to work in a safe place):
  5. Now uncompress the archives:
    • tar xvjf mondo-2.06-r266.tar.bz2
    • tar xvjf mindi-1.06-r266.tar.bz2
    • tar xvzf mindi-kernel-1.0.tgz
  6. Build and install the pieces:
    • cd mondo-2.06
    • ./configure
    • make
    • make install
    • cd ../mindi-1.06 (note: CHANGES and chown warnings may be safely ignored)
    • ./install.sh
    • cd ../mindi-kernel-1.0
    • ./install.sh
    • mv /usr/local/share/mindi/* /usr/local/lib/mindi
    • cd ..
    • dpkg -i kernel-image-2.6.14.2-baseline-4.2_10.00.Custom_i386.deb
  7. Create the mondobackup script:
    • cd /usr/local/bin/
    • put the following in a file named mondobackup:

           mondoarchive -Oi -d /usr/local/mondoiso -9 -F -E "/usr/local/mondoiso /usr/local/mondo" -k FAILSAFE
           #
           # -Oi tells mondo to back up the system, and to back it up to ISO files.
           # -d is the destination for the ISO files to be put
           # -9 is the compression level
           # -F tells mondo not to offer to write boot+data floppy disk images.
           # -E is the exclusion directory, anything listed in that is excluded.
           # -k FAILSAFE tells mondo to use the FAILSAFE kernel, because your kernel has cramfs in it.
  8. chmod +x mondobackup

Using Mondo/Mindi

You now have mondo/mindi installed on your system. To make cdimages which can be used to backup and restore your system on the same or another machine do the following:

  1. boot from the kernel 2.6.14.2-baseline-4.2. This is necessary because the Ubuntu kernels have cramfs in them, which doesn't work with mondo/mindi.

  2. as root run mondobackup.

That's it! mondobackup will call mondo and mindi to make iso images of your system in /usr/local/mondoiso. Burn each image onto a cd, then boot the target machine from the first cd to begin the restoration process.


Warning /!\ Edit conflict - other version:


Mondo Mindi Wheeler Script

by Paul Flint

This is very much a work in progress, but I believe Version 0.4 is worth testing with

#
# 3/01/2006 04:54:55 PM
# (c) Nick Wheeler, Jeff Elkner & Paul Flint
# this is actually version 0.4 of this crufty script...
# This is offered under the GPL ?? add gpl stuff here ??
#
# This code installs mondo-mindi using the Wheeler method...
#
# this must be run as root...
# sudo bash somebody make this part work...
#
# this is a prototype of the check for stuff...
# make gottahave the name of the thing you are looking for:
#
gottahave[1]="gcc"
gottahave[2]="make"
gottahave[3]="libnewt-dev"
gottahave[4]="buffer"
gottahave[5]="gawk"
gottahave[6]="syslinux"
gottahave[7]="afio"
gottahave[8]="cdrecord"
gottahave[9]="curl"
#
# gotta loop.
i=1
#
echo "BEGIN TEST FOR TOOLS"
#
while [ "$i" -le 9 ]
 do
  echo -n -e ${gottahave[i]} '\t' "..."
   stat=$(dpkg-query --show --showformat='${Status}\n' ${gottahave[i]})
   if [ "${stat##* }" = "installed" ]; then
     echo " is available for use"
   else apt-get install ${gottahave[i]} 
   fi        #
  i=`expr $i + 1`
 done
#
mkdir /usr/local/mondoiso
#
cd /usr/local/src
#      download each of the following (note: there may be newer versions of each of these by the time you read this, but I plan only to test this procedure every 6 months - with each Ubuntu release - and to put a version know to work in a safe place):
#          *
#            [WWW] http://ibiblio.org/jelkner/mondo_mindi/kernel-image-2.6.14.2-baseline-4.2_10.00.Custom_i386.deb
#          *
curl http://ibiblio.org/jelkner/mondo_mindi/kernel-image-2.6.14.2-baseline-4.2_10.00.Custom_i386.deb > /usr/local/src/kernel-image-2.6.14.2-baseline-4.2_10.00.Custom_i386.deb
echo "Download 1 of 4 completed"
#
#            [WWW] http://ibiblio.org/jelkner/mondo_mindi/mondo-2.06-r266.tar.bz2
#          *
curl http://ibiblio.org/jelkner/mondo_mindi/mondo-2.06-r266.tar.bz2 > /usr/local/src/mondo-2.06-r266.tar.bz2
echo "Download 2 of 4 completed"
#
#            [WWW] http://ibiblio.org/jelkner/mondo_mindi/mindi-1.06-r266.tar.bz2
#          *
curl http://ibiblio.org/jelkner/mondo_mindi/mindi-1.06-r266.tar.bz2 > /usr/local/src/mindi-1.06-r266.tar.bz2
echo "Download 3 of 4 completed"
#
#            [WWW] http://ibiblio.org/jelkner/mondo_mindi/mindi-kernel-1.0.tgz
#          *
curl http://ibiblio.org/jelkner/mondo_mindi/mindi-kernel-1.0.tgz >  /usr/local/src/mindi-kernel-1.0.tgz
echo "Download 4 of 4 completed"
#
#
echo "unpack the goodies"
cd /usr/local/src
      tar xvjf mondo-2.06-r266.tar.bz2
      tar xvjf mindi-1.06-r266.tar.bz2
      tar xvzf mindi-kernel-1.0.tgz
#
echo "begin the compile"
cd /usr/local/src/mondo-2.06
./configure
make
make install
#
echo "begin the install"
cd ../mindi-1.06 
./install.sh
cd ../mindi-kernel-1.0
/install.sh
#
mv /usr/local/share/mindi/* /usr/local/lib/mindi
#
cd ..
dpkg -i kernel-image-2.6.14.2-baseline-4.2_10.00.Custom_i386.deb
#
echo "move the mindi-kernel to /usr/local/lib/mindi
#
cp /usr/local/src/mindi-kernel-1.0/* /usr/local/lib/mindi/.
# fix this move it to where ever mindi is...
#
echo "Create the mondobackup script"
#
cd /usr/local/bin/
#
echo creating the mondobackup script
#
# note the slashes for escaping to allow quotes in next echo...
echo "mondoarchive -Oi -d /usr/local/mondoiso -9 -F -E \"/usr/local/mondoiso /usr/local/mondo\" -k FAILSAFE" > mondobackup
echo "# " >> mondobackup
echo "# -Oi tells mondo to back up the system, and to back it up to ISO files." >> mondobackup
echo "# -d is the destination for the ISO files to be put" >> mondobackup
echo "# -9 is the compression level" >> mondobackup
echo "# -F tells mondo not to offer to write boot+data floppy disk images." >> mondobackup
echo "# -E is the exclusion directory, anything listed in that is excluded." >> mondobackup
echo "# -k FAILSAFE tells mondo to use the FAILSAFE kernel, because your kernel has cramfs in it." >> mondobackup
chmod +x mondobackup