chroot into it, and run dpkg would be the easiest thing. See http://superuser.com/a/417004/20798 for how to get a working `/proc`, `/sys`, and `/dev` inside the chroot.


Since you have a working debian system outside the backup, you could probably just use

 dpkg --admindir=dir --get-selections

The `dir` defaults to `/var/lib/dpkg`, so put the path to your backup's `/var/lib/dpkg`.

----

Don't forget that `dpkg --get-selections` doesn't show which packages were manually installed, and which were only installed to satisfy dependencies (and thus should be auto-removed when no longer needed because newer versions of the packages you actually want have different deps, or because you purge a manually installed package.)

I use aptitude, which makes it easy to mark *everything* as auto-installed, then go through and mark some packages as manually installed until nothing you want to keep is getting auto-removed. Start with big meta-packages, like `build-essential`, the Debian equivalents of `ubuntu-standard` and `ubuntu-desktop`, and stuff like that. In aptitude, hit `r` to see the reverse-depends of a package (pkgs that depend on it).