OEM Rescue/Reimaging

Status

Introduction

Provide a rescue/reimaging method to be supplied with OEM installations.

Rationale

OEMs will want to provide a way for users to return an installed system to a pristine state. This is mainly to reduce support costs as they can ask the user to just return the system to its shipped state and restore data from backup.

Scope and Use Cases

Implementation Plan

The rescue partition will be an Ubuntu installation consisting of the base and standard seeds plus a new oem-rescue seed consisting of desktop infrastructure (preferably without any Ubuntu branding), a rescue application, and perhaps a few other tools such as a graphical partition editor. To prevent users attempting to use the rescue partition for real work, it will normally be mounted read-only with a writable tmpfs, and the desktop seed (including e.g. openoffice.org) has intentionally been omitted.

OEMs requiring this functionality are expected to create a partition of sufficient size (normally using the existing automatic partitioning facilities) designated for use as the rescue partition. An extension to the installer will be written that sets up this rescue partition after installing the normal base system. This will copy the normal base system into the rescue partition and install the standard and oem-rescue seeds. Suitable options will be added to the system's bootloader configuration.

After the OEM has customized the normal system, the OEMInstaller documentation will instruct them to boot the rescue partition with a special parameter that causes it to store an image of the normal system and remember the current partition layout and bootloader configuration.

When the end user boots the rescue partition, it will boot directly into a special desktop session that launches the rescue application. If the partition layout does not match its stored values, it will fail; otherwise, it will ask whether it can restore its saved image, and if so it will proceed to do so (using dd or similar) and then restore the saved bootloader configuration.

Data Preservation and Migration

No data preservation, the user will be told that the hard drive will be wiped and that he should restore from backups.

Packages Affected

New oem-rescue, oem-rescue-udeb packages; bootloader installers. New seed.

User Interface Requirements

The rescue application will probably be written in PyGTK or similar and run inside X. The rescue option should either be in the grub menu (with an appropriate warning) or hook into the BIOS boot sequence similar to how the "ThinkPad button" on IBM laptops work. The application must be very clear about it causing user data to be destroyed permanently and offer to cancel at any point (up to the point where the actual reimaging starts).

Outstanding Issues

Is there anything more sensible we can do if the partition layout does not match the stored values? If that happens, the index of the rescue partition may have changed. We might want to just tell the user that she has modified his system in a way which the system cannot recover from and she should contact support.

UDU BOF Agenda

UDU Pre-Work

Comments

JohnMoser: I've said this many a time, but here is a demonstration of why a separate /home is superior in design. While here the data is lost, a "rescue" mode could wipe / and reinstall. If the user's profile is a problem, he can copy all important data to a shared directory (chmod 01777 /home/shared) or use a home repair tool which could correct issues. For example, "I can't log in: Ubuntu accepts my password but immediately logs me back out" would probably be solved by erasing the GNOME configuration; while a broken Firefox or Thunderbird could be solved by attempting to gently repair the profile or in the worst case store important data (the Mail directory in thunderbird) and wipe the rest of the configuration. Both options can be completed from an OEM LiveCD, and the profile sanitizing option can operate on individual users' home directories. The mentioned sanitizing tool to gently repair individual applications' configurations can be discussed elsewhere.

PaulSladen: on x86, the HPA (Host Protected Area) spec may allow the recovery facilities the the OEM needs without having to worry about the recovery-partition being a normal, visible partition. The specs defines that the AT drives be commanded by the BIOS to return 'fake' information about its true length; thus obscuring the rescue area. The BEER specification allows a number of bootable areas (eg. reinstall OS, make backups, restore backups), each of which is an emulated bootable floppy image in much the same way as a CDROM boots. These can be selected during startup by pressing down a key; the BIOS then commands the IDE device to return its true-capacity when queried, this allows the recovery OS full access to both itself and the rest of the disk where the normal OS will be installed/backed up from.

KarlHegbloom: My vision of a restore/rescue system is a little different. Rather than have it using space on the hard drive, I thought it should be on a set of CD-R or DVD-R. There should be a tool the OEM Installation Technician can run to create the ISO-9660 file system images for that. It would also be very nice if the end-user could use it as a backup solution. I'd like a CD-R that serves as the restore/rescue boot CD, and a separate CD or set of CD's to hold the system image and perhaps partman recipe or other system-specific metadata. It would naturally be based on the Debian Installer and 'partman-auto', allowing the user to change the partitioning layout if desired, so that, for instance, migration from single disc to RAID or restoration to a replacement hard drive can be acheived. The same RR CD would work with any customized system image set, say for each of several computer models in an OEM product line.

PhillipSusi: IIRC libata disables the HPA by default, exposing the full disk. Using it also prevents the user from removing the partition if they so choose. For this reason I do not like the use of HPA. The hidden partition and external media each have their own advantages, so I think it best to have a system that is equally at home in either, and offers to transfer itself to the other. In other words, recreate the restore cd from the hidden partition, or recreate the hidden partition with the restore cd.

By the way, using dump instead of tar or dar may prove beneficial. It seems to be quite a bit faster than tar. An initial level 0 dump could be done during OEM install and provide an emergency base to return to in the event of catastrophe. An option could be included on the grub boot menu to create/update a level 1 backup that the user could choose periodically to update the changes they have made to the system that could be optionally restored or not on top of the base level 0 dump. This level 1 dump could be located on the restore partition, or possibly on external media. In the event of catastrophic restore, the user could be given the choice between restoring to the factory default state of just the level 0 dump, or also including their backed up data in the level 1 dump as well.


CategoryUdu CategorySpec

UbuntuDownUnder/BOFs/OEMRescue (last edited 2010-04-05 02:30:40 by 183)