wiki:BootProcessUnraveled

Version 3 (modified by bruno, 11 years ago) (diff)

OBDR description

Introduction

Mondo Rescue 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 Mondo Restore rescue media can be summarised as follows:

  1. Kernel boots and loads initial infrastructure from initrd;
  2. init is called and further prepares infrastructure, loading additional programs and modules and starting components like RAID, LVM or NFS;
  3. mondorestore is called either in nuke (automatic) or interactive mode to perform the actual restore.

Kernel / Initrd

Coming sooner or later...

Init

Modules and Additional Programs

Steps

  • 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.

Discussion

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.

OBDR

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