Debian This forum is for the discussion of Debian Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-15-2006, 12:12 AM
|
#1
|
|
Member
Registered: Oct 2005
Location: Melbourne, Australia
Distribution: Debian Etch 2.6.18-(custom compile for k7) with a 72 no 58 no 42 second bootup time (XP=4mins)
Posts: 52
Rep:
|
Transfering installed packages on one sys to another
I had a really sweet version of etch running a week ago when i upgraded my hard drive, i've got both the old and new in now but i'm running etch off the new. The thought of figuring out which packages to download again kills me so i'm wondering if somewhere i can grab a list of the installed packages on the old system and do something with it, thoughts?
|
|
|
|
09-15-2006, 01:57 AM
|
#2
|
|
Member
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
|
boot up the old system and run
dpkg --list
pipe it into a file so you can read it whenever you wish
dpgk --list > packagelist.txt
this list will show you all packages and version numbers of the packages installed.
also:
this will show you package name, current version, available version and priority of installed packages:
aptitude -F '%p %v %V %P' search '~i'
this will show you the same as above but for packages to be updated if you run apt-get upgrade:
aptitude -F '%p %v %V %P' search '~U'
read /usr/share/doc/aptitude/README for more info.
|
|
|
|
09-15-2006, 02:29 AM
|
#3
|
|
Member
Registered: Oct 2005
Location: Melbourne, Australia
Distribution: Debian Etch 2.6.18-(custom compile for k7) with a 72 no 58 no 42 second bootup time (XP=4mins)
Posts: 52
Original Poster
Rep:
|
nice, i should really go over all that piping stuff.
|
|
|
|
09-15-2006, 04:04 AM
|
#4
|
|
Member
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
|
in theory you should be able to mount your old system somewhere and simply point apt, dpkg or aptitude to the packages database on that hdd to retreive information :-)
|
|
|
|
09-15-2006, 11:35 AM
|
#5
|
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
Other than using chroot, how might one "point apt, dpkg or aptitude to the packages database on that hdd"?
In addition to the good advice above, before you destroy the old system, also consider:
Quote:
from man dpkg
dpkg --get-selections [package-name-pattern...]
Get list of package selections, and write it to stdout.
dpkg --set-selections
Set package selections using file read from stdin.
This file should be in the format '<package> <state>',
where state is one of install, hold, deinstall or purge.
Blank lines and comment lines beginning with '#' are also permitted.
...
To make a local copy of the package selection states:
dpkg --get-selections >myselections
You might transfer this file to another computer, and install it there with:
dpkg --set-selections <myselections
Note that this will not actually install or remove anything, but just set the selection state on the requested packages. You will need some other application to actually download and install the requested packages. For example, run dselect and choose "Install".
Ordinarily, you will find that dselect(8) provides a more convenient way to modify the package selection states.
|
I just tried this on a re-install, unfortunately, dpkg --set-selections <myselections re-installed everything including what I had already done w/ the original CD. Would have taken hours if I hadn't aborted it.
Although I haven't tried it yet, I believe apt-get dselect-upgrade might work better:
Quote:
from man apt-get
dselect-upgrade
dselect-upgrade is used in conjunction with the traditional Debian packaging front-end, dselect(8). dselect-upgrade follows the changes made by dselect(8) to the Status field of available packages, and performs the actions necessary to realize that state (for instance, the removal of old and the installation of new packages).
|
Last edited by archtoad6; 11-12-2006 at 06:47 PM.
Reason: "speling"
|
|
|
|
09-15-2006, 08:39 PM
|
#6
|
|
Member
Registered: Oct 2005
Location: Melbourne, Australia
Distribution: Debian Etch 2.6.18-(custom compile for k7) with a 72 no 58 no 42 second bootup time (XP=4mins)
Posts: 52
Original Poster
Rep:
|
Quote:
|
Originally Posted by archtoad6
dselect-upgrade follows the changes made by dselect(8) to the Status field of available packages, and performs the actions necessary to realize that state (for instance, the removal of old and the installation of new packages).
|
It almost sounds spiritual.
|
|
|
|
09-15-2006, 08:47 PM
|
#7
|
|
Member
Registered: Oct 2005
Location: Melbourne, Australia
Distribution: Debian Etch 2.6.18-(custom compile for k7) with a 72 no 58 no 42 second bootup time (XP=4mins)
Posts: 52
Original Poster
Rep:
|
So anyway seriously, what your saying is i should be able to pipe the state of every package to a file and make dselect just kind of 'make it happen'.
I guess this leaves me one last question, apart from these methods, is there anyway to just transfer everything physically w/o downloading?
|
|
|
|
09-16-2006, 05:28 AM
|
#8
|
|
Senior Member
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380
Rep:
|
If you have a cd burner then create a cd repository of the packages;
1. Create a new directory /debs under root
2. copy the files from /var/cache/apt/archives to /debs
3. do as root; dpkg-scanpackages /debs /dev/null | gzip > /debs/Packages.gz
4. write the contents of /debs to a cd
6. add the cdrom to the apt sources by doing; apt-cdrom add
5. you can now retrieve the packages you need from the cd using apt-get install
Last edited by TigerOC; 09-16-2006 at 05:56 AM.
|
|
|
|
09-16-2006, 05:33 AM
|
#9
|
|
Member
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
|
Quote:
|
Originally Posted by Nathanael
in theory you should be able to mount your old system somewhere and simply point apt, dpkg or aptitude to the packages database on that hdd to retreive information :-)
|
Apologies, i confused this with another packaging system where this is possible!
but chroot is at least something :-)
|
|
|
|
09-17-2006, 02:40 AM
|
#10
|
|
Member
Registered: Oct 2005
Location: Melbourne, Australia
Distribution: Debian Etch 2.6.18-(custom compile for k7) with a 72 no 58 no 42 second bootup time (XP=4mins)
Posts: 52
Original Poster
Rep:
|
I wish that were possible, but as part of tweaking my system i cleared the cached debs, i guess i have no choice but to d/l. Thanks all for your help, you guys (/gals) on this forum rock.
|
|
|
|
09-17-2006, 04:24 AM
|
#11
|
|
Senior Member
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380
Rep:
|
You could just replicate the old system on the new drive. Here is a howto on this.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:09 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|