FriendlyRecoverySpec

Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.

  • Launchpad Entry: friendly-recovery

  • Packages affected: whiptail, recovery-mode (new package), upstart-compat-sysv.

Summary

When the user selects the "(recovery mode)" item from the boot loader menu they will be taken to a ncurses-based menu where they can select a number of options to repair broken aspects of their system.

The items will be provided by scripts implementing a simple plug-in protocol. Packages can add menu items by simply putting a compliant script in the appropriate directory.

One such item will be "give me a root shell" so no functionality is lost with respect to the current behaviour.

Rationale

Currently when the "(recovery mode)" item is selected the user is dropped to a root shell. This is far from helpful.

Use Cases

  • The user has forgotten their password and wants to reset it.
  • The user has trashed their X config and wants to reconfig.
  • The user has done a partial upgrade and their system isn't booting properly. They want to complete the upgrade.
  • The user just wants a root shell prompt.

Scope

A new package "recovery-mode" will be created in main and included in the default install. A small change will be made to upstart to check for this script and invoke it instead of a shell in the event of a single user login. There may be changes to whiptail if it is missing required functionality.

Design

  • /etc/event.d/rcS-sulogin checks for the existence of the executable /usr/share/recovery-mode/recovery-menu and invokes it if available or a shell otherwise.
  • recovery-menu looks in /usr/share/recovery-mode/options
  • each executable in this directory is invoked with the "test" command-line parameter.
    • if it returns zero it should print a name to stdout to be added to the menu
      • like "Recover broken X configuration".
    • if it returns one it will not be added to the menu
      • makes sense if the script detects that nothing is broken
  • the menu is shown with the items that returned zero along with their names
  • when the user picks an item the same script is executed with no parameters
    • when the script exits, the "test"ing is redone and the user is returned to the menu
    • if the script exits with a status of 42 (magic number) then the boot-up immediately resumes
      • this should not normally be used
      • it is for things like "continue boot with safe video mode"

Implementation

Implementation is in progress. Some other package maintainers have been notified and plan to provide their own plug-in scripts.

See also


CategorySpec

FriendlyRecoverySpec (last edited 2011-09-30 17:22:54 by vorlon)