Previous Section  < Day Day Up >  Next Section

Recipe 16.14. Creating a Bootable System Restore CD with Mondo Rescue

16.14.1 Problem

You need a simple method for creating a system image. You want a perfect clone to preserve your configurations, patches, and updates, so you can easily do a bare-metal restore, or migrate to a new hard drive, or roll out a number of identical installations. Your data are backed up separately, so you only want to preserve system and configuration files.

16.14.2 Solution

Use Mondo Rescue to create a custom bootable system CD.

Be sure there is enough free space on your hard drive to store the temporary CD image (at least 700 MB) per CD. Do not run any other programs (games, email, word processors, etc.) while running Mondo. Then, as root, run mondoarchive at the command line. Mondo will think about things for a minute or two, then open the window shown in Figure 16-2.

Figure 16-2. Mondo


Choose your backup medium. In this example, we'll use a CD-RW at SCSI address 0,1,0. In the next window, it asks if your writer has "Burn-Proof" technology (yes). Next, choose the compression level (Maximum), then specify the speed of your CD (re)writer (4).

Tell it the SCSI address of your CD writer 0,1,0. Next, you'll be asked which files you want to back up. Select /, or the entire root filesystem, because the next question is which files you want to exclude. /tmp and /proc are automatically excluded. You should also exclude /home and any other data directories, such as shared data directories, mail spools, and logfiles.

Mondo will then ask whether you want to verify your backups after it has created them (yes) and whether you are confident that your kernel is a sane, sensible, standard Linux kernel (say no if you are using an older Debian kernel—see the "Discussion" section of this recipe for more information). Next it will ask if you are sure you want to proceed (yes).

When it asks you to enter your CD-ROM's /dev device, give it the SCSI /dev name—/dev/scdn—if your system has a 2.4 kernel. For 2.6 kernels, use /dev/hdn. The backup can take up to a couple of hours. However, you can't wander away, because you'll need to push some buttons near the end.

16.14.3 Discussion

If you're running Mondo from the console and your screen blanks from inactivity, bring it back by hitting the Alt key.

cdrecord —scanbus shows the SCSI address of your drive. On systems with 2.4 kernels, look in /etc/fstab to get the SCSI /dev name, or dig through the output of dmesg.

To qualify as "sane," your kernel needs to include:

  • loopfs support

  • CD-ROM support

  • ISO9660 filesystem support

  • initrd ramdisk support (built-in)

  • Virtual memory filesystem support (built-in)

  • Floppy disk support (built-in)

  • Ext2 filesystem support (built-in)

  • Support for the backup media

  • SCSI emulation in 2.4 kernels

Most stock kernels newer than 2.4.7 ought to be fine. Debian, in particular, didn't used to be well supported by Mondo, but Debian kernels from 2.4.18 should have all the required bits. If your kernel cannot be used to boot a Mondo Rescue CD, use the failsafe mindi-kernel (see Recipe Recipe 16.18). The mindi-kernel is used only to boot the Rescue CD; it does not replace your system kernel.

If you're not sure whether your drive supports "Burn-Proof" technology, run this command to show all of your drive's capabilities:

$ cdrecord —atip dev=0,1,0

Cdrecord 2.01a07 (i686-pc-linux-gnu) Copyright (C) 1995-2003 Jörg Schilling

scsidev: '0,1,0'

scsibus: 0 target: 1 lun: 0

...

Using generic SCSI-3/mmc CD-R driver (mmc_cdr).

Driver flags   : MMC-3 SWABAUDIO BURNFREE

Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R

...

Mondo has its own ideas about how GRUB should be set up, so GRUB users may need to create this soft link:

# ln -s /boot/grub/menu.lst /etc/grub.conf

Mondo insists on it and won't perform a backup without it, so it's best to humor it.

Mondo comes in source form, Debian packages, and RPMs. You'll need several packages:

Mondo
Mindi
afio
Newt
lzop
syslinux
cdrecord
mkisofs

Debian users will also see apt-get fetch:

buffer
gawk
mindi-busybox
ms-sys, tint
slang

16.14.4 See Also

  • mondoarchive(1)

  • Your locally installed Mondo documentation (/usr/share/doc/mondo/hml/1.6x-howto)

  • Mondo user forums (http://forum.mondorescue.org)

    Previous Section  < Day Day Up >  Next Section