MondoMindi

Differences between revisions 33 and 34
Revision 33 as of 2006-03-03 23:14:11
Size: 10044
Editor: montpeliervt-cuda1-24-50-146-184
Comment:
Revision 34 as of 2006-03-04 00:06:13
Size: 10149
Editor: montpeliervt-cuda1-24-50-146-184
Comment:
Deletions are marked like this. Additions are marked like this.
Line 200: Line 200:
# pflint in order to get install to work we add a directory that is incorrectly referenced
mkdir /usr/local/etc/mindi/mindi
#
Line 201: Line 204:
cd /usr/local/src/mindi-1.06  # god I hate anything but complete references. cd /usr/local/src/mindi-1.06            # god I hate anything but complete references.
Line 210: Line 213:
cd ..
#dpkg -i kernel-image-2.6.14.2-baseline-4.2_10.00.Custom_i386.deb < -- this is not needed right now. Most users will not want this.
#
echo "move the mindi-kernel to /usr/local/lib/mindi
# cd ..
#dpkg -i kernel-image-2.6.14.2-baseline-4.2_10.00.Custom_i386.deb
# ^
-- this is not needed right now. Most users will not want this.
#
# echo "move the mindi-kernel to /usr/local/lib/mindi
Line 221: Line 225:
#
echo creating the mondobackup script
Line 234: Line 236:
echo "t-t-t-t-thats all folks!!!" echo "Successful End Of Script"

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

(added by flint)

If you intend to back up unconventional partition types additional tools will be needed. In the script below these optional tools are ignored. However, These include:

  1. mtools
  2. The Microsoft command "sys.exe"
  3. Other closed file system emulator/drivers

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. This step removed, explanation: The failsafe kernel is recommended for use. If you use the above (or below) script, it will use the failsafe kernel, so this step was absolutely useless. If you happen to use SCSI, and the failsafe kernel doesn't work for you, download and install kernel-image-2.6.14.2-baseline-4.2_10.00.Custom_i386.deb, but make sure to edit your grub/lilo so it doesn't use this kernel as your default kernel (unless you want to). Then you have to reboot into the kernel and then you can perform your backup, but remove the -k FAILSAFE switch from /usr/local/bin/mondobackup. This is messy and silly, there will be a better/universal way in the very near future.
  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 script may actually work. Copy and paste it into a file, chmod +X it become root, and tourch it off. We believe Version 0.44 is worth testing with.

#
# 3/03/2006 
# (c) Nick Wheeler, Jeff Elkner & Paul Flint
# Version 0.44 of this remarkably crufty bit o bash 
# was last asaulted in an editor by flint, 
# who could not believe the DragonCow was so trusting, and this code  
# proves that scripting should be regulated by the US FEMA...
# 
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA#

# 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]="gawk"
gottahave[4]="afio"
gottahave[5]="curl"
gottahave[6]="buffer"
gottahave[7]="syslinux"
gottahave[8]="cdrecord"
gottahave[9]="libnewt-dev"
#
# 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"
#
# took out top download for it is not needed.
#
#            [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 1 of 3 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 2 of 3 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 3 of 3 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
#
# pflint in order to get install to work we add a directory that is incorrectly referenced
mkdir /usr/local/etc/mindi/mindi
#
echo "begin the install of mindi"
cd /usr/local/src/mindi-1.06            # god I hate anything but complete references.
./install.sh
echo "begin the install of mindi kernel"
cd /usr/local/src/mindi-kernel-1.0      # nick avoid the use of relative references...
./install.sh                            # this was /install.sh, it should of course be ./install.sh
#
echo "the famous wheeler hack"
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          
# ^-- this is not needed right now. Most users will not want this.
#
# 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/
#
# 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
echo "Successful End Of Script"

MondoMindi (last edited 2008-08-06 16:32:04 by localhost)