MondoRescue can create a diverse variety of rescue media ranging from something as simple as a set of CDs or DVDs to CD/tape combinations and highly sophisticated methods like PXE.
The first stage in restoring is booting the restore system. This usually happens using a kernel and an initrd image. This is followed by the init script carrying out various crucial steps such as loading more modules and programs and starting subsystems such as RAID, LVM or NFS. The last steps, once all the infrastructure is in place, is to start the mondorestore program either in nuke (automatic) or interactive mode to perform the actual restore (unless expert mode is chosen that is).
So, the startup process of a MondoRescue media can be summarised as follows:
- Kernel boots and loads initial infrastructure from initrd;
- init is called and further prepares infrastructure, loading additional programs and modules and starting components like RAID, LVM or NFS;
- mondorestore is called either in nuke (automatic) or interactive mode to perform the actual restore.
Kernel / Initrd
Coming sooner or later...
Modules and Additional Programs
- Load mandatory modules from initrd: InsertEssentialModules;
- get restore media going: HandleTape | StartNfs | !HandleCDROMorFloppies;
- load additional stuff from restore media including all modules: install-additional-tools (gets ordinary NFS working);
- now that all modules are available, load the ones we need: insert-all-my-modules.
Maybe PXE should be a distinct first step at the top of the list.
It might be a good idea to migrate all module loading to InsertEssentialModules which would imply that all module were part of the initrd image, especially having drivers for all NICs available would be a good thing as it would make it so that (a) PXE and ordinary NFS restore work the same way and (b) all NIC supported by the kernel would automatically be available for PXE out of the box.
From a bigger picture point of view, looking into installers of other systems such as but certainly not limited to Debian and live systems like knoppix might prove useful to come up with a more streamlined, fool-proof and dynamically adjusted boot process that ensures that everything works as intended even in situations where the hardware we are running on is pretty much a moving target.
As of 2.2.6, MondoRescue is supporting the OBDR function of some tape drives from HP (Cf: OBDR FAQ).
This has been done by studying the OBDR support of another GPL DR solution mkCDrec. As I've not found anywhere else a precise doc on how to do that, I'll put my findings here:
OBDR is a hardware function that will allow the administrator to press a key (typically F8 on the drive I used for these test) in order to emulate a USB CD from an ISO image stored on the tape. Once the system has booted on this image, it can launch the recovery process, taking the remaining data from the following portions of the tape.
An OBDR tape is in fact made of 3 parts:
- an empty (or maybe can be used for something else) 10 KiB zone (block size of 512 bytes), made typically with
dd if=/dev/zero of=/dev/nts0 bs=512 count=20
- a bootable ISO image stored as is (block size of 2048 bytes), made typically with
dd if=/path/to/image.iso of=/dev/nts0 bs=2048
- Finally the data stored in the format expected by the software present on the bootable image
The configuration information to setup a pxelinux PXE server to provide network restoration of MondoRescue images is available in the README.pxe of the mindi package (or at http://trac.mondorescue.org/browser/branches/2.2.9/mindi/README.pxe)
(Information provided by E. Colussi)
- export an NFS FS from your Ignite server (hp-ux) as for HP-UX (ex: /Images/Linux?)
- make your mondoarchive backup using the NFS share (using -n hp-ux:/Images/Linux)
- Extract from the ISO image the vmlinuz and initrd (as descrined in the pxelinux setup)
- On the Ignite server, you uncompress the pxelinux archive (from the syslinux package or from another Linux distribution where pxelinux is already used) under the
/opt/ignite/boot directory. (You'll need the pxelinux.0 and pxelinux.cfg files). The executable will look for its configuration under the directory pxelinux.cfg.
- Create under the pxelinux.cfg a default file looking like this:
prompt 1 timeout 600 label restore_mondo kernel vmlinuz-mondo append initrd=initrd-mondo.img load_ramdisk=1 ramdisk_size=131072 ramdisk_blocksize=1024 rw root=/dev/ram iso_mode acpi=off apm=off devfs=nomount exec-shield=0 pxe prefix=mondorescue ipconf=eth0:ip_client_address_for_install:netmask:brodcast:router nfsmount=ignite_ip_address:/images/Linux
or look at the previous paragraph on pxelinux.
- Configure your DHCP server on the Ignite server by modifying /etc/rc.config.d/netdaemons:
export DHCPV6D=1 export DHCPV6SRVRD_ARGS="-c /etc/dhcptab"
- restart your DHCP server:
- Configure the DHCP server by adding to the file /etc/dhcptab:
dhcp_device_group:\ re:\ ncid:\ class-name=HP_X86_0:\ class-id="PXEClient:Arch:00000:UNDI:002001":\ lease-time=300:\ subnet-mask=255.255.255.0:\ gw=192.168.2.2:\ lease-policy=accept-new-clients:\ allow-bootp-clients=FALSE:\ addr-pool-start-address=192.168.2.110:\ addr-pool-last-address=192.168.2.120:\ bf=/opt/ignite/boot/pxelinux.0:
- Enjoy an MondoRescue deployment from an Ignite server by typing restore_mondo at the boot prompt of the target machine.