[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: probleme avec le fichier status de dpkg



Daniel Déchelotte a écrit :

Cédric Devillers <cedric@laria.u-picardie.fr> a écrit :

| Il y a peut-être une méthode pour régénérer ce fichier, mais je ne la | connais pas. Quelqu'un a des idées ? ( à part réinstaller
| l'intégralité des packages )

Ca me rappelle un ancien systeme d'exploitation (mais toujours tres
repandu) dans lequel la corruption d'un ou de deux fichiers clefs
rendait le systeme inutilisable. Pour Debian GNU/Linux (yeaah ;-), si
/var/lib/dpkg/status est serieusement endommage, le systeme est
parfaitement utilisable mais ne peut plus evoluer (mettre a jour ou
installer de nouveaux paquets). A mon avis c'est une vulnerabilite tres
serieuse. Y a-t-il un procede pour repartir des copies de ce fichier (et
peut-etre quelques autres) dans l'arborescence (logique) et, surtout,
physiquement sur le disque ?
Je suis entrain d'essayer cette methode. J'en suis au rechargement des paquets (dselect --expert) mais cela sera pour ce WE car 750Mo! Jusqu'a present cette methode a l'air de fonctionner


     6.3.4 Recover package selection data

If |/var/lib/dpkg/status| becomes broken for any reason, the Debian system loses package selection data and suffers severely. Look for the old |/var/lib/dpkg/status| file at |/var/lib/dpkg/status-old| or |/var/backups/dpkg.status.*|.

Keeping |/var/backups/| in a separate partition may be a good idea since this directory contains lots of important system data.

If the old |/var/lib/dpkg/status| file is not available, you can still recover information from directories in |/usr/share/doc/|.

    # ls /usr/share/doc | \
      grep -v [A-Z] | \
      grep -v '^texmf$' | \
      grep -v '^debian$' | \
      awk '{print $1 " install"}' | \
      dpkg --set-selections
    # dselect --expert # reinstall system, de-select as needed

------------------------------------------------------------------------


     6.3.5 Rescue system after crashing |/var|

Since the |/var| directory contains regularly updated data such as mail, it is prone to be corrupted. Separating it in an independent partition limits risks. If disaster happens, you may have to rebuild the |/var| directory to rescue your Debian system.

Obtain the skeleton content of the |/var| directory from a minimum working Debian system based on the same or older Debian version, for example ||var.tar.gz <http://people.debian.org/%7Eosamu/pub/>||, and place it in the root directory of the broken system. Then

    # cd /
    # mv var var-old      # if any useful contents are left
    # tar xvzf var.tar.gz # use Woody skeleton file
    # aptitude            # or dselect

This should provide a working system. You can expedite the recovery of package selections by using the technique described in Recover package selection data, Section 6.3.4 <http://qref.sourceforge.net/Debian/reference/ch-package.en.html#s-recover-status>. ([FIXME]: This procedure needs more experiments to verify.)


--
:  ______ ______ ______ ______ ______ __  daniel.huhardeaux@tootai.com
: /_____// __  // __  //_____// __  // / phone.: +48 32 285 5276
:  / /  / /_/ // /_/ /  / /  / /_/ // / fax....: +48 32 285 5276
: /_/  /_____//_____/  /_/  /_/ /_//_/ mobile..: +48 602 284 546



Reply to: