How to figure what packages were installed from the old installation drive?
Alan Pope
alan at popey.com
Mon Sep 19 21:49:06 UTC 2011
On 19 September 2011 22:29, Peng Yu <pengyu.ut at gmail.com> wrote:
> My old ubuntu system was install in a hard drive, which is not mounted
> in a new ubuntu system (not at the /). I want to figure out what
> packages were installed in the old system and reinstall all these
> packages in the new ubuntu system. Does anybody know what is the best
> way to do so? Thanks!
>
Assuming your old ubuntu system is in a caddy that you can connect via
USB, and assuming your external drive is /dev/sdb, and assuming the
Ubuntu install was on the first partition then;-
Boot to your new partition
mkdir ~/target
sudo mount /dev/sdb1 ~/target
sudo chroot ~/target
(at this point you'll have a root prompt on your old install)
You can then use tools like "dpkg" to see what was installed:-
dpkg --get-selections
Press CTRL+D to exist from the chroot, and then umount:-
sudo umount ~/target
Cheers,
Al.
More information about the ubuntu-users
mailing list