Sei sulla pagina 1di 31

mkCDrec Howto

Inhoudsopgave
1. Introduction ............................................................................................................................... 2 1.1. Copyright ....................................................................................................................... 2 1.2. Installing mkCDrec .......................................................................................................... 2 1.3. Make test ........................................................................................................................ 3 1.4. The Configuration file Config.sh ...................................................................................... 4 2. Make the Disaster Recovery CD-ROM ........................................................................................... 4 2.1. Rescue CD-ROM only (no backups) .................................................................................... 4 2.2. Into /tmp/backup (to burn on CDROM) ................................................................................ 4 2.3. Enter another path (spare disk or NFS) ................................................................................. 5 2.4. Enter (remote) tape device ................................................................................................. 5 2.5. Quit ............................................................................................................................... 5 2.6. Encrypting the backups ..................................................................................................... 5 2.7. Backups without encryptions .............................................................................................. 5 2.8. During the backups ........................................................................................................... 6 3. Booting from a mkCDrec CD-ROM ............................................................................................. 11 3.1. x86 and x86_64 platforms ................................................................................................ 11 3.2. IA64 (itanium) architecture .............................................................................................. 13 4. Restoring with start-restore.sh ..................................................................................................... 13 4.1. Interactive restore ........................................................................................................... 13 4.2. Automatic Disaster Recovery ............................................................................................ 16 5. Cloning with clone-dsk.sh .......................................................................................................... 17 6. Restoring a single file system with restore-fs.sh .............................................................................. 19 7. Restoring with HP Openview Storage Data Protector ....................................................................... 21 7.1. Integrating HP OpenView Storage Data Protector and mkCDrec .............................................. 21 7.2. Restore with Data Protector .............................................................................................. 21 8. Other uses of mkCDrec .............................................................................................................. 23 8.1. Restore user-mode Linux (UML) ....................................................................................... 23 8.2. Superrescue CD-ROM ..................................................................................................... 24 8.3. MkCDrec Menu (Alt-F5) ................................................................................................. 24 8.4. One-Button Disaster Recovery .......................................................................................... 25 8.5. MkCDrec and PXE Booting ............................................................................................. 25 9. Know Issues ............................................................................................................................. 25 9.1. Secure Shell .................................................................................................................. 25 10. GNU Free Documentation License ............................................................................................. 26 10.1. PREAMBLE ................................................................................................................ 26 10.2. APPLICABILITY AND DEFINITIONS ........................................................................... 26 10.3. VERBATIM COPYING ................................................................................................. 27 10.4. COPYING IN QUANTITY ............................................................................................ 27 10.5. MODIFICATIONS ........................................................................................................ 28 10.6. COMBINING DOCUMENTS ......................................................................................... 29 10.7. COLLECTIONS OF DOCUMENTS ................................................................................ 29 10.8. AGGREGATION WITH INDEPENDENT WORKS ............................................................ 29 10.9. TRANSLATION ........................................................................................................... 30 10.10. TERMINATION ......................................................................................................... 30 10.11. FUTURE REVISIONS OF THIS LICENSE ..................................................................... 30 10.12. ADDENDUM: How to use this License for your documents ................................................ 30 11. Acknowledgements .................................................................................................................. 31 Document History: Version 1.0: 10 April 2003 initial release

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

Version 1.1: 29 August 2003 apply the GNU Free Documentation License Version 1.2: September 2004 review and update document Version 1.3: March-May 2006 added HP OV DP section - EFI - converted from word into XML E-mail: gdha at users.sourceforge.net

1. Introduction
We all make backups, right? Of course we do! This is the basic need for data recovery. Unfortunately hard disks die too fast and too often these days including boot disks. Therefore, having backups is not enough. We changed so many configuration files of the operating system that we certainly forget to restore some of them and at the time we need them the backup has been expired. Therefore, wouldnt it be nice to have to same system back as before the disk died? Thats where mkCDrec comes in Make CD-ROM recovery (mkCDrec) makes a bootable (El-Torito) disaster recovery image (CDrec.iso), including backups of the GNU/Linux system to the same CD-ROM (or CD-RW) if space permits, or to a multi-volume CDROM set. Otherwise, the backups can be stored on another local disk, NFS disk or (remote) tape. However, a CD-ROM made with mkCDrec can easily be used as a rescue CD-ROM too. Especially, when you have installed the mkCDrec Utilities aside mkCDrec. Currently, mkCDrec is working on Linux platform x86 (IA32), IA64, Sparc and PPC only. Hopefully mkCDrec fills a gap in Open Source projects covering disaster recovery with full backups and with plenty of rescue tools standard delivered. The reason of this howto is mainly to provide a written guidance for the end-user, as most people prefer to have a piece of paper in front of them instead of staring at the web pages.

1.1. Copyright
MkCDrec is an Open Source project that follows the GNU General Public License (GPL) as published by the Free Software Foundation; either version 2 of the License, or any later version. The full text can be found at http://www.gnu.org/copyleft/gpl.html

1.2. Installing mkCDrec


The latest mkCDrec sources (and RPMs) can be downloaded from http://mkcdrec.ota.be/ or from SourceForges website http://sourceforge.net/project/showfiles.php?group_id=25327 Once downloaded the sources, e.g. mkCDrec_v0.8.9.tar.gz you can extract it into any directory of your choice. It really does not matter where you install it as long as you have the root password! Indeed, it makes no sense to download and try mkCDrec you do not know the root password.

It is also possible to download the binary Intel x86 RPM (and/or source RPM) which should work on many Linux distributions such as RedHat, Mandriva and SuSe. The default installation directory for the binary RPM version is /var/opt/mkcdrec.

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

To install a RPM based version of mkCDrec use the command rpm i for a first time install or rpm U to upgrade an older version. To remove a RPM based mkcdrec version use the command rpm e. The binaries for Debian is also available for download and use the command dpkg -i to install it. While you are busy make some extra time to download the mkCDrec Utilities too (available from the same web site) into mkcdrec/ directory:

A rule of dumb with the mkCDrec utilities is to install the highest available version. mkCDrec Utilities is not a must, but do contain some nice tools.

1.3. Make test


A small note before starting using mkCDrec is that the make command is needed on your GNU/Linux system. Check this with which make which should return the location of the executable. If not, then you have to install the make rpm from your distribution. On Debian systems do apt-get update; apt-get install make. After unpacking mkCDrec run make test to check whether your system fulfill the requirements to create a bootable El-Torito CD-ROM.

If mkCDrec notices there is something missing make test will tell you, and sometimes gives some hints too.

Please note the warning given at test 10 about the SCSIDEVICE setting. Please edit the Config.sh file in the home directory of mkCDrec and change the setting.

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

1.4. The Configuration file Config.sh


It is worth the time to view the Config.sh file at least once as it contains plenty of parameters that can be modified by the end-user. At least you have to modify those variables as told after running a make test, otherwise you will never succeed in running mkCDrec successfully. For a full list of the most important parameters see the web page http://mkcdrec.ota.be/project/config.html Please note, mkCDrec also recognizes /etc/mkcdrec.conf file containing variables which override the settings in Config.sh. This is very handy to keep your local settings upgrade proof.

2. Make the Disaster Recovery CD-ROM


After the make test was successful you can run mkCDrec in two different modes, interactive and in batch. To run in interactive mode just type make and the following screen will be displayed:

To run in batch mode, then you have to add an option to the make command. The batch mode commands are listed in the same order as the interactive mode: 1. 2. 3. 4. Make rescue Make CD-ROM Make path DESTINATION_PATH=/foo Make device

Another important option to make is clean:


# make clean

will remove all temporary files made by mkCDrec including the ISO9960 images created.

2.1. Rescue CD-ROM only (no backups)


If you select option 1 from the menu then you will create a small ISO9960 image without backups, but still useful as a simple rescue CD-ROM built on your Linux platform. You can even burn the image to a business card size CD-ROM. Of course, you cannot restore backups with this CD-ROM unless you have your complete system file systems on another backups media, such as Tivoli Storage Manager or Data Protector.

2.2. Into /tmp/backup (to burn on CDROM)


Option 2 will create a rescue CD-ROM including a complete backup of your systems file systems. Of course it will exclude any files or file systems you set in Config.sh EXCLUDE_LIST. If necessary mkCDrec will create multi-volume CD-ROM images or can even burn a DVD too.

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

2.3. Enter another path (spare disk or NFS)


Option 3 expects that you NFS mounted the ISOFS_DIR (see Config.sh file)! Still a rescue CD-ROM will be made but the destination path on the CD-ROM will point to the NFS mount point and it will try to auto-mount it. If that does not work, then try it manually before starting a restore, clone operation.

2.4. Enter (remote) tape device


Option 4 will prompt for a no-rewinding tape device, either local or remote accessible, e.g. /dev/nst0. Also now a mkCDrec ISO image will be created that must be used for a recovery operation. So, to restore a system you first need to boot from the CD-ROM and then insert the tape into the tape drive (local or remote) and start the restore to retrieve the data from tape. Note that there is the possibility to create an OBDR tape (no CD-ROM image will be burned).

2.5. Quit
What can we say about this option? Quit.

2.6. Encrypting the backups


If in the Config.sh file you activated encryption cipher, e.g. openssl Blowfish cipher CIPHER=bf Then you will be prompted twice for a password:

2.7. Backups without encryptions


When in the Config.sh file CIPHER= (default value) then the backups will not be encrypted. In interactive mode you will see the following question appearing:

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

If there are file systems listed that should not be backuped then press Control-C now and unmount those file systems immediately. In batch mode the above screen will not be disabled! Thereafter, just run make command again to restart the backup process.

2.8. During the backups


What follows is a series of screen dumps of such a run to give you an impression of how it looks.

It will start with some primary checking, including if encryption will be used or not. The network settings are stored in a system file. Later when you boot from the mkCDrec CD-ROM it will allocate the IP address as found while making the disaster recovery image, unless you have chosen DHCP setting in the Config.sh configuration file, or if you are using DHCP right now.

Then it will create the root file system for the RAM disk. In above picture the RAM disk is created as an ext2 file system. It is also possible to use another file system as ext3, minix, reiserfs, xfs or jfs, but you loose so much RAM disk space on journaling it is unwise to use journaling file systems such as ext3, reiserfs, xfs and jfs. Ext2 is good enough for a RAM disk anyway as it lives in memory only and not an a real hard disk. The root file system is mounting and filled with directories and binaries (stripped binaries) as seen in following screen shots.

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

Somewhere after copying the binaries and libraries mkCDrec will create lots of scripts and rescue files in the root file system etc/recovery directory.

After a while the root file system is complete and will get unmounted and compressed.

After the RAM root file system is compressed, and only when the mkCDrec Utilities were installed you will see the following cfg2html run. This creates 2 important files (one as plain text and one in HTML format) that contain a complete overview of your current systems hardware and software installed, including all the configuration settings. For this alone it is worth installing the mkCDrec Utilities. The information that these files contain will be very appreciated in case of trouble! Believe me.

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

The next important phase in mkCDrec disaster recovery image making is the creation of the initial RAM disk which is a small boot image that loads some loadable modules in memory to mount the CD-ROM and bootstrap into the bigger root file system RAM disk.

As you can see not much binaries are needed in the initial RAM disk. After the initial RAM disk mkCDrec will create a bootable floppy in memory, but it is possible to write to a real floppy too if the size permits. See the Config.sh file to toggle this. The boot floppy contains the Linux kernel and the initial RAM disk. Once the boot floppy is done syslinux will make it bootable. If you have installed mkCDrec Utilities you will notice that the behavior is somewhat different as it will use isolinux directly to boot from the CD-ROM instead of emulating a boot floppy booting from a CD-ROM.

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

After the boot floppy it is time to create the backups of the mounted file systems using GNU tar. The behavior can be different as seen below if you have selected backup to tape or another disk.

The cutstream program is nothing more then a calculator to split the backups into 650 Mbytes images so mkCDrec can create an ISO9660 image of it. The image size is a variable that is defined in the Config.sh file (MAXCDSIZE).

mkCDrec uses mkisofs to create a bootable El-Torito CD-ROM.

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

Once the CDrec.iso has been created by mkisofs it will be checked to see whether it is useable and an md5sum checksum will be implanted in the image too.

If you have selected to use a CDRW (variable in Config.sh) it will blank the CD, otherwise it will skip this step.

Burning the CDrec.iso image to the CDR(W) is done with cdrecord.

Above error will normally not been seen as in this case vmware was used to capture the screen shots, but it gives you an impression that you will be given a second chance to write the image to CDR(W) if the first one fails. If it still fails it will move the CDrec.iso image to another filename and continue with the backups. After the entire file systems are backuped the last CDrec.iso image will be written.

10

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

3. Booting from a mkCDrec CD-ROM


3.1. x86 and x86_64 platforms
To be able to boot from a CD-ROM made by mkCDrec make sure the computers BIOS is capable of booting off a CD. Therefore, it might be necessary to enter the Setup and modify the boot sequence as follow:

You will see a message from syslinux (or isolinux) when the boot process starts from the CD-ROM.

Then the boot process stops and waits on your input (isolinux only, when mkCDrec Utilities are installed). To boot from the CD-ROM enter option 2.

Once option 2 has been entered and the enter key has been pressed the boot process continues with loading the Linux kernel and the initial RAM disk.

As you can see the initial RAM disk gets loaded and uncompressed into the computers memory and it launches linuxrc that is part of the initial RAM disk.

11

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

The initial RAM disk duty is to find the CD-ROM drive device and to load the necessary loadable kernel modules. Once the CD-ROM device gets mounted the initial RAM disk will read and uncompress the bigger root file system into main memory. If this step is successful it will activate the root file system via pivot_root (for linux kernel 2.4 and above) as shown below.

The root file system uses BusyBox, the Swiss nice under Linux tool boxes, as an all-in-one utility among many other Unix binaries. Once BusyBox activation is successful you will see a more or less normal boot sequence all be it much less then a normal Linux distribution. It boots up to the point you will see a prompt appearing. No root password is required to get started. MkCDrec has 5 console login screens behind each ALT-F1 to ALT-F5 key combinations. Maybe, you will notice that the 5th screen is a bit different as it requests a user and password via the login process. Valid users are root, admin or mkcdrec and the password is mkCDrec. The idea is to add an automatic menu behind it to simplify the restore/recover situation. So far mkCDrec disaster recovery is mend for administrators, which are used to work with command line interfaces.

From this point on you can use mkCDrec as a rescue tool or for any other non-destructive purposes.

12

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

Please note that mkCDrec CD-ROMs are a very powerful tool if used by the wrong people, if you understand what I mean. Keep the images (CD-ROMs) in a safe place!

3.2. IA64 (itanium) architecture


The Itanium systems are using ELF to bootstrap the Linux kernel, therefore, we cannot use e.g. isolinux to create a bootable CD-ROM image. The EFI Shell is a console interface used to launch applications (such as the Red Hat Enterprise Linux installation program), load EFI protocols and device drivers, and execute simple scripts. It is similar to a DOS console and can only access media that is FAT16 (VFAT) formatted. The EFI Shell also contains common utilities that can be used on the EFI system partition. These utilities include edit, type, cp, rm, and mkdir. For a list of utilities and other commands, type help at the EFI Shell prompt. The EFI Shell contains a bootloader called ELILO. Additional information on EFI can be found at the following URL: http://developer.intel.com/technology/efi/index.htm Each Itanium system contains a FAT16 (VFAT) system partition that is mounted on /boot/efi which contains the Linux kernel as well as the ELILO configuration file (elilo.conf). Mkcdrec creates a bootable image for CD-ROM and a recovery image stored under the /boot/efi/efi/recovery directory. Important notice is that you better enable SERIAL=ttyS0 in the Config.sh file if you want to work with the LAN console and have no real access to any VGA console. To boot from the local EFI partition interrupt the boot process and enter the EFI shell and select the local disk (e.g. fs0: ) and cd to efi/revovery and type elilo to boot (without any physical CD-ROM made).

4. Restoring with start-restore.sh


After booting your PC with a mkCDrec CD-ROM you should see a # prompt on your screen. If the archives are not on a CD-ROM make sure the tape is inserted, or the file system has been mounted where original backups were stored on.

4.1. Interactive restore


To restore your system completely from scratch go into directory /etc/recovery and type # ./start-restore.sh

If you come across the following warning then mkCDrec was not able to guess your bootloader (lilo, grub, ). If you are working with the first console, then due to a bug in BusyBox shell it is not possible to type Control-C. To work-around that problem open second console with ALT-F2 and pressing Enter key.

13

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

Find out what the pid is of start-restore.sh shell script and kill it.

Go back to the first console (ALT-F1) and edit the BOOTLOADER file and replace the UNKNOWN keyword with LILO or GRUB. Thereafter, restart the start-restore.sh shell script again. The restore is quite simple just follow the questions. Per disk a question will be asked to restore or not.

Another question is whether you want to reformat the disk if mkCDrec finds an existing partition table on it.

The reformat will wipe out the entire disk. There is no way back once done!

After reformatting the disk the partitions are ready for creating file systems on it.

14

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

with some file system types, e.g. ReiserFS, a question may be asked.

Immediately after the creating of a file system on a partition it will get mounted and the restore starts in verbose mode. All the filenames will fly by quite quickly.

In case there are multiple CDs involved then you will see a message like the following when mkCDrec needs the next CD in sequence:

Once a partition has been restored it will get unmounted and a file system check will happen to check the integrity of it.

15

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

At the end when all disks and file systems have been restored mkCDrec will mount the / and /boot directory again to run lilo or grub. This is necessary to make the disk bootable again.

You should see a blue message when the restore went fine. Otherwise, you will see a red banner with some warnings for further inspections. To reboot your system do the following:

And, finally type, reboot after removing the CD-ROM. If the restore went fine then the disk should be bootable as before

4.2. Automatic Disaster Recovery


If in Config.sh the option Automatic Disaster Recovery (AUTODR) was set to y then when you boot from the mkCDrec CD-ROM the start-restore.sh procedure will be started automatically (after a warning and an interruption possibility of 20 seconds). Of course, when multiple CDs are involved the automatic restore will be interrupted when mkCDrec needs the next CD:

16

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

5. Cloning with clone-dsk.sh


If the archives are not on a CD-ROM make sure the tape is inserted, or the file system has been mounted where original backups were stored on. To clone one disk go into the /etc/recovery directory and type ./clone-sk.sh

Just follow the questions and select what you want:

17

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

Thats about it for cloning a disk. Or maybe not! Before rebooting always double check the /mnt/local/etc/lilo.conf file, or /mnt/local/boot/grub.conf file whether the boot and root device are correct. Need to change it? Use the chroot /mnt/local command to put the restored disks into root mode for the system. Another issue that may strike you is when you clone to another PC which is 100% the same then it is perhaps necessary to edit the /mnt/local/etc/modules.conf file and change e.g. the scsi_hostadapter, eth0, and so on. Also, a bit more tricky is when the initial ramdisk needs to be changed. Why do you need the initial ramdisk you might wonder? Well if the new PC has another SCSI card for example then the original one! Think wisely before start using mkCDrec on the source PC and add the SCSI modules you might need on the target PC to the Config.sh file! To create a new initial ramdisk do the following: # cd / # df Make sure that /mnt/local (and /mnt/local/boot) are mounted. Also before doing a chroot mount also the /usr if needed. # chroot /mnt/local # cd /boot # mv initrd-2.4.20-x.img initrd-2.4.20-x.img.sav # mkinitrd v --preload=BusLogic --omit-lvm-modules initrd-2.4.20-x.img 2.4.20-x creates a new initial ramdisk. Execute the lilo command once more to be sure.

18

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

6. Restoring a single file system with restore-fs.sh


Sometimes you do not want to restore a complete system or just one disk, but only one particular file system. In that case restore-fs.sh is the script you need. If the archives are not on a CD-ROM make sure the tape is inserted, or the file system has been mounted where original backups were stored on. As before go into the /etc/recovery directory and type ./restore-fs.sh to launch it.

This script has been kept as simple as possible, just follow the questions.

Do not worry the following question will ask you on which partition you want to restore:

Be aware; make no mistake on which partition you select! Otherwise unpleasant situations can be created.

19

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

The next question gives you the chance to change the original file system type! However, only select the file system type you can actually use. With other words make sure that your Linux kernel is capable of using the select type and for which you have the necessary tools on board.

It will create a file system on your partition, one of the list above, and only then the following question will be asked.

Select Y to restore the archive from the backup medium, be it CD-ROM, tape or anther disk.

Do manually a chroot /mnt/local and edit /etc/lilo.conf file if needed. Thereafter, just run lilo to make the disk bootable.

The file system has been restored and in our case we activated lilo too. We are ready to reboot the system.

20

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

7. Restoring with HP Openview Storage Data Protector


7.1. Integrating HP OpenView Storage Data Protector and mkCDrec
If you prefer to use Data Protector as backup storage instead of burning CD-ROMs or DVDs then you can configure mkCDrec to just generate a rescue CD-ROM with the needed executables to be able to restore from a booted rescue CD-ROM. Therefore, edit the Config.sh file and define the following variables: 1. 2. DP_RESTORE=y DP_DATALIST_NAME=the name of your datalist

Thereafter run mkCDrec in rescue mode only as now you do not rely on mkCDrec to create a full backup! make rescue or mkcdrec rescue Burn the image on a CD-ROM and keep it safe for later usage.

7.2. Restore with Data Protector


Boot with the rescue CD-ROM and do the following: cd /etc/recovery ./dp-restore.sh and follow the instructions
screendumps will follow

If you want to push the restore (for security reason for example or if the pull method failed for some reason) then use the Data Protector GUI when the dp-restore.sh gives you the chance. What follows is an example restore via a Data Protector Manager GUI:

21

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

It is important that you restore into /mnt/local and select the overwrite button.

No additional options were selected.

22

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

Click next or finish to start the restore.

When the restore is finished type enter on your console window where you started the dp-restore.sh so it can finish the GRUB or LILO part.

8. Other uses of mkCDrec


8.1. Restore user-mode Linux (UML)
MkCDrec version 0.7.4 and higher is able to restore a mkCDrec backup to a user-mode Linux installation. Ron Yorston experimented with this and basically this was his cookbook: # extract the initrd file from the boot floppy image on the CD mount -t iso9660 /dev/cdrom /mnt/cdrom cp /mnt/cdrom/bootflop.img /tmp umount /mnt/cdrom

23

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

mount -o loop -t vfat /tmp/bootflop.img /mnt/spare cp /mnt/spare/initrd.gz . umount /mnt/spare gunzip initrd.gz # make a 20 Gb disk to restore to dd if=/dev/zero of=mkcdrec_fs bs=1024k count=1 seek=20000 # start UML connected to the 20 Gb disk and the CD drive linux initrd=initrd ubd0=mkcdrec_fs ubd1=/dev/cdrom fakehd fake_ide \ ubd=3 ramdisk_size=32768 mem=64M devfs=nomount More on UML can be found on: 1. 2. http://user-mode-linux.sourceforge.net/ http://linuxhacker.ru/uml/

8.2. Superrescue CD-ROM


The Superrescue CD-ROM mode will copy the complete /usr from your source Linux system onto the CD-ROM. Basically it is quiet easy to make a superrescue CD-ROM with mkCDrec on Intel architecture only. Just do the following: # make f Makefile.x86 superrescue This way all commands from /usr/bin, /sbin will be available on the CD-ROM.

8.3. MkCDrec Menu (Alt-F5)


Once booted from a mkCDrec CD-ROM you will be logged on by default on the /dev/console (also known as AltF1). However, there exist a mkCDrec menu to make the life easier of end-users. Therefore type the Alt-F5 key and login as user mkcdrec (with password mkCDrec):

You will now see the following menu:

24

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

The options are straightforward and need no further explanations.

8.4. One-Button Disaster Recovery


OBDR can rapidly restore or replicate a server's operating system, software applications, and data using a tape cartridge(s). This is possible because the tape drive emulates a CD-ROM that allows the server to "boot from tape". This standard feature is embedded in the firmware of HP tape drives. For more information go to http://www.hp.com/go/obdr What does this mean? MkCDrec will create an ISO9660 image and put it on a tape instead of burning to a CDR(W). The backups of the file systems are put after the ISO image. So basically, everything fits on one tape. To boot from tape you need: 1. 2. 3. 4. a HP tape drive which supports OBDR (see URL above) a PC BIOS able to boot from SCSI (maybe it is needed to put SCSI on top of the list) power-off the PC completely push (while PC is off) on the eject button of the tape drive and switch on the PC. This will activate the OBDR mode and the tape drive will emulate a SCSI CD-ROM. You will notice that the green/orange leds intermittent light up.On newer PCs the procedure may be different (F8 instead). See URL above. PC loads the linux and initrd from the tape. tape drive goes out of OBDR mode and become a plain tape drive again. the rd-base.img is read from tape. Linux system is up and running. Restore is possible, see chapter 4.

5. 6. 7. 8.

Simple! How can you make an OBDR tape? There are two ways: 1. 2. Via the menu option 4 (tape backup) the question will be asked to OBDR or not; Via the command line: make OBDR

8.5. MkCDrec and PXE Booting


Download the document http://www.ota.be/linux/workshops/20031129/mkCDrec-PXE-notes.zip

9. Know Issues
9.1. Secure Shell
Be aware when trying to secure copy files from another host to mkCDrecs rescued PC on the first console (/dev/console use the tty command is verify), e.g. # scp user@other_hsost:/tmp/missing_file /tmp Host key verification failed. An error may be expected as seen above. Nothing to worry as this is a SSH restriction! Switch to another console (ALT-F2). Use again the tty command to verify, e.g. /dev/tty2. And, try again. Now success it guaranteed.

25

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

10. GNU Free Documentation License


Version 1.2, November 2002 Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 021111307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

10.1. PREAMBLE
The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.

10.2. APPLICABILITY AND DEFINITIONS


This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a worldwide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing

26

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machinegenerated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice, which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.

10.3. VERBATIM COPYING


You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies.

10.4. COPYING IN QUANTITY


If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computernetwork location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to

27

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.

10.5. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: 1. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. State on the Title page the name of the publisher of the Modified Version, as the publisher. Preserve all the copyright notices of the Document. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. Include an unaltered copy of this License. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.

2.

3. 4. 5. 6. 7. 8. 9.

10. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. 11. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. 12. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. 13. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. 14. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. 15. Preserve any Warranty Disclaimers.

28

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a BackCover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.

10.6. COMBINING DOCUMENTS


You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements".

10.7. COLLECTIONS OF DOCUMENTS


You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.

10.8. AGGREGATION WITH INDEPENDENT WORKS


A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the

29

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.

10.9. TRANSLATION
Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.

10.10. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

10.11. FUTURE REVISIONS OF THIS LICENSE


The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation.

10.12. ADDENDUM: How to use this License for your documents


To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.

30

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/

mkCDrec Howto

11. Acknowledgements
This section acknowledges all the people who contributed to this howto in some way. 1. IT3 Consultants boss wise decision to apply the GNU Free Documentation License

2.

Ron Yorston for the section Restore user-mode Linux (UML)

31

XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/