On Tue, Dec 3, 2013 at 5:39 PM, Neal Murphy <neal.p.mur...@alum.wpi.edu>wrote:
> On Tuesday, December 03, 2013 05:26:37 PM Lisi Reisz wrote: > > I have had another failed upgrade. Before I tried to upgrade, I ran > > dpkg --get-selections and saved the result in a file. > > > > I am obviously going to have to install Wheezy from scratch. Is there > > any way I can make use of Squeeze's package list to give the owner of > > the box the same applications/packages as she had in Squeeze, mutatis > > mutandis? > > This topic was recently discussed, I think within the last 2-3 weeks. ... > Ah, > 11/4: "Re: Installing same packages in a Squeeze installation in a new > Wheezy > installation". Excerpt from a thread summary I posted: > > ---- > The theory is that --get-selections will list all installed pkgs in a form > that can be used by --set-selections to (re)install them. > > So, on the existing system: > # Mount a thumb drive; change 'sdg' as needed > mount /dev/sdg1 /mnt > > # Save the list of pkgs > dpkg --get-selections > /mnt/current_installed_pkgs.txt > > # Umount, then unplug the drive > umount /mnt > > And on the new system, first netinstall a basic system. Then > # Mount the thumb drive; change 'sdd' as needed > mount /dev/sdd1 /mnt > > # Set the list of pkgs to install > dpkg --set-selections < /mnt/current_installed_pkgs.txt > > # Unmount and remove the thumb drive > umount /mnt > > # Start the 'upgrade' > apt-get dselect-upgrade > When done, the new system should have the same pkgs as the old system. It > won't be identical, but it'll be close. > Neal beat me to the punch, Lisi. One point I would like to make is that it is probably not a bad idea to capture this from all of your machines as a starting point to have a pool of machine "types." For instance, being a believer in bastion hosts, I have a separate firewall, backup machine, fileserver, workstations, laptop, and containers (OpenVZ) for, for instance, mediawiki box, puppet master, etc. Each machine runs a script (installed by puppet) that runs at 4am that does an dpkg --get-selections and writes it to the filesytem. This is backed up daily. This way, if I am building a new box of a type, I have a base config from which to work. --b