Improve friendly recovery

Registered by Stéphane Graber

A bit of work has been done late in the Oneiric cycle to improve friendly recovery to work better.

Now with the LTS coming up, it's time to fix some of the bigger issues for good and make sure the recovery mode will be useful and working for everyone.

Things to discuss include:
 - Dealing with udev so important devices are initialized in recovery mode
 - Properly initialize the network, either by using ifupdown or Network Manager
 - Update the plugins to work properly when network isn't available and give a clue to the user that they need to enable network

Blueprint information

Steve Langasek
Stéphane Graber
Stéphane Graber
Series goal:
Accepted for precise
Beta Available
Milestone target:
milestone icon ubuntu-12.04-beta-1
Started by
Colin Watson

Related branches



== Notes from the session ==

*Other concerns:
- Improving navigation, better descriptions and merging menus.

friendly-recovery was substantially rewritten during the 11.10 cycle by stgraber, in the cause of fixing a number of bugs. The initial goal was to make sure that friendly-recovery would start from / rather than /usr; and now it also starts as just about the very first thing on the system with a read-only / (so that it's actually possible to run fsck, etc.), rather than something very late in the boot sequence after / is read-write and all daemons have been started.

Separation of read-only and read-write options, with the latter being accessible only via a mount-rw option, has proven to be confusing to users. We will show both read-only and read-write options on the menu again, and make the first selection of a read-write option indicate that read-only options will be unavailable after this point.

There are some situations where it would be useful to detect problems at boot time and invoke some kind of recovery path. For example: fsck failure, or broken package database. See desktop-p-graceful-failure. However, friendly-recovery is a menu-driven interface that may not be appropriate if we have specific knowledge of the failure (we want "friendly recovery", not "friendly-recovery").

Wubi recovery is a complex story; however, it does already have clear recommendations on the situation where NTFS requires checking. Most other Wubi-specific failures are boot loader problems; it may be worth adding some facilities to ubiquity (or something called by it) to detect that situation and recover it.

In general, it would be useful to have a "Repair Ubuntu" facility accessible from ubiquity, although this ought to be graphical.

Starting udev is important to ensure reliable device availability, e.g. USB keyboards. We should SRU a fix to friendly-recovery to start udev once it has been tested in precise.

 * ifupdown: It is sufficient to start udev.
 * network-manager (if installed): This requires starting dbus-daemon, which requires /var/lib/dbus/machine-id to be readable. friendly-recovery would need to do this by hand.

A system summary entry would be very useful and could show something like:
  disks: mounted (good)
  disks have errors: no (good)
  networking available: yes (good)
  package database consistent: no (BAD)
     => recommendation: select option "2 fix packages" (or whatever).

whiptail is in /usr, as is libnewt. libnewt must be moved to /lib; either whiptail should be moved to /bin, or we should write a new friendly-recovery UI helper in C using libnewt and put that somewhere in / (which would also allow us to offer a help menu in friendly-recovery). (bug 234409)

== Actions ==

Work items for precise-alpha-1:
[stgraber] Start setvtrgb job before starting friendly-recovery: DONE
[stgraber] Start udev when entering recovery mode (will give us network on servers once dhclient is fixed to use resolvconf and /run): DONE

Work items for precise-alpha-2:
[stgraber] Handle cases where network is brought up by udev: DONE
[cjwatson] Provide a basic UI in C using libnewt (mailed to stgraber): DONE
[stgraber] Rework the UI based on what's provided by cjwatson, adding help to all elements, properly splitting the menu (always showing all the items but with different states): POSTPONED

Work items for ubuntu-12.04-beta-1:
[stgraber] Get friendly-recovery working without /usr, at least in English: DONE
[stgraber] Add "system summary" option: DONE
[stgraber] Show read-write options from the start again, with a warning on first selection: DONE

Work items:
[cjwatson] fix "recovering grub" wiki page to list the good option first (exclusively?)
[jamesodhunt] Discuss with mterry possibilities for automatically recovering some things from backups
[stgraber] investigate feasibility of getting friendly-recovery working without /usr in non-English - translations, gettext shell lib: POSTPONED


Work Items

This blueprint contains Public information 
Everyone can see this information.