Making apt-get powercut-proof

Michael Vogt michael.vogt at ubuntu.com
Tue May 6 07:51:13 UTC 2008


Hi,

On Mon, May 05, 2008 at 08:57:36PM +0100, Andrew Sayers wrote:
> A friend of mine was upgrading to Hardy, and (so far as we can tell)
> there was a power cut while it was halfway through, which left his
> system in a not-especially-useful state.  I think the best solution is
> to have a /etc/init.d/{apt-get|dpkg} script that checks for
> half-finished installs, and restarts them if necessary.  If so, which
> (or both) would be better, and is there anyone here that knows enough
> about the two to suggest a complete set of commands that need to be run?
>  Also, is this something we should be doing in an Ubuntu-specific way
> (e.g. from X), or should I take this idea to Debian?

I added a dpkg/apt recovery to the friendly-recovery package in
intrepid. When booting into recovery mode it will have a "dpkg -
Repair packages" menu item that will do the required steps. I plan to
also extend update-manager so that it is available there.

The new friendly recovery is also in my PPA at
https://edge.launchpad.net/~mvo/+archive
(for those curious to test).

Cheers,
 Michael




More information about the Ubuntu-devel-discuss mailing list