LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-09-2006, 05:23 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
mutiple installation method


Hi,

I have a Pentium System on which I have been running Debian Sarge. After removing/installing many packages many times, finally I have the system ready the way I wanted.

Now I want the exact similar configuration on my AMD system. Basically, I want to install all the packages that are there on my Pentimum system.

I know I can get list of all packages that are installed on my system by the command:
Code:
dpkg -l
But then that way I will have to
Code:
apt-get install <all the packages listed in the file>
which will be like typing too much.

Is there any convenient way by which I can achieve the above. Is there a way by which we can specify apt-get to install all the packages whose names are there in a particular file. I cud think of only this method.

If anyone has any other ideas, plz share.


thanks
 
Old 02-09-2006, 05:32 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
One thing you might try is to just image your current drive and put it on the other drive. When you boot up the new machine, it'll upchuck because of different hardware, but you can rerun base-config and dpkg-reconfigure xserver-xfree86. That might get you there...
 
Old 02-09-2006, 05:46 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by pljvaldez
One thing you might try is to just image your current drive and put it on the other drive. When you boot up the new machine, it'll upchuck because of different hardware, but you can rerun base-config and dpkg-reconfigure xserver-xfree86. That might get you there...

Thanks for info. Actually, I thought the something like that, but I would like to prefer a fresh installation of packages rather than copying the image entirely.
 
Old 02-09-2006, 05:49 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Ah, found something. Read man dpkg.

To make a local copy of packages: dpkg --get-selections >myselections.txt

To transfer to another computer, copy the text file and then:
dpkg --set-selections <myselections.txt

To install, run dselect, and choose Install or apt-get dselect-upgrade

Hope that helps...

Last edited by pljvaldez; 02-09-2006 at 05:52 PM.
 
Old 02-09-2006, 06:01 PM   #5
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by pljvaldez
Ah, found something. Read man dpkg.

To make a local copy of packages: dpkg --get-selections >myselections.txt

To transfer to another computer, copy the text file and then:
dpkg --set-selections <myselections.txt
To install, run dselect, and choose Install or apt-get dselect-upgrade
Hope that helps...
Great...Actually I also just discovered the --get-selections option, but then I don;t know how to install after redirecting to the file. But I am glad that you found it how to install them(apt-get dselect-upgrade).
Thanks a lot.....

Will try it and see how it goes.
 
Old 02-09-2006, 09:00 PM   #6
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by kushalkoolwal
Great...Actually I also just discovered the --get-selections option, but then I don;t know how to install after redirecting to the file. But I am glad that you found it how to install them(apt-get dselect-upgrade).
Thanks a lot.....

Will try it and see how it goes.
Don't forget the dselect updateafter the --set-selections to get the dpkg/apt databases in sync.
 
Old 02-09-2006, 09:26 PM   #7
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by HappyTux
Don't forget the dselect updateafter the --set-selections to get the dpkg/apt databases in sync.
thanks for the info, Happy Tux. Just to summarize and confirm here are the steps that I need to do:

On Source machine:
#dpkg --get-selections >myselections.txt

Transfer the myselections.txt file on the destination computer
On Destination machine:
#dpkg --set-selections <myselections.txt
#apt-get dselect-upgrade
#dselect update

I hope I did not miss any step. Let me know if it is ok.

Thank you guys once again for all your help.

Appreciate it.
 
Old 02-09-2006, 09:40 PM   #8
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by kushalkoolwal
thanks for the info, Happy Tux. Just to summarize and confirm here are the steps that I need to do:
You have the last two mixed up other than that it is correct.

On Source machine:
#dpkg --get-selections >myselections.txt

Transfer the myselections.txt file on the destination computer
On Destination machine:
#dpkg --set-selections <myselections.txt
#dselect update
#apt-get dselect-upgrade
 
Old 02-10-2006, 04:46 AM   #9
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by HappyTux
You have the last two mixed up other than that it is correct.

On Source machine:
#dpkg --get-selections >myselections.txt

Transfer the myselections.txt file on the destination computer
On Destination machine:
#dpkg --set-selections <myselections.txt
#dselect update
#apt-get dselect-upgrade
Great Thanks. I will try that out......
 
Old 02-15-2006, 06:02 PM   #10
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by HappyTux
You have the last two mixed up other than that it is correct.

On Source machine:
#dpkg --get-selections >myselections.txt

Transfer the myselections.txt file on the destination computer
On Destination machine:
#dpkg --set-selections <myselections.txt
#dselect update
#apt-get dselect-upgrade
Ok, so I tried the method as suggested by you guys and it seemed to work pretty well. The only question that I have is, does this method purge the packages also or it just adds the missing package. Because I doubt that my target machine has few extra packages installed which are not there in my source machine. In short does this method perform both the operations like install and purge.???

I want my two system to be identical in terms of packages irrespective of thier starting state. Also do I have to run the command
Code:
#dselect update
on my source machine also before I get the list of packages by the command
Code:
#dpkg --get-selections >myselections.txt

For Example,
On my source the package nvi was not there
but on my destination the package nvi was there
Does this mean that the above method just checks for the missing package and not for additional packages installed on destination system and purges them??

Thanks.

Last edited by kushalkoolwal; 02-15-2006 at 06:39 PM.
 
Old 02-15-2006, 09:23 PM   #11
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by kushalkoolwal
For Example,
On my source the package nvi was not there
but on my destination the package nvi was there
Does this mean that the above method just checks for the missing package and not for additional packages installed on destination system and purges them??

Thanks.
It was my understanding that it did what you wanted but if what you say is correct then obviously it does not. I only ever used it on machines with just a base install then transfer the packages.txt and do the upgrade, I think I am out of ideas on this one.
 
Old 02-15-2006, 10:13 PM   #12
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
You could probably write a script to compare what's on the system to what's on the list, then make a new list of the differences and go into dselect to delete them.
 
Old 02-16-2006, 02:50 AM   #13
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by pljvaldez
You could probably write a script to compare what's on the system to what's on the list, then make a new list of the differences and go into dselect to delete them.
Will the diff or cmp command do the trick? I haven't done this before so was kind of wondering.
 
Old 02-16-2006, 11:45 AM   #14
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
I've never done it either, but I'm sure you can... Try man diff and see if that helps.
 
Old 02-16-2006, 04:13 PM   #15
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
diff worked okay, except that it didn't really tell me which file had the extra packages... But I guess you could search your system to see if they're installed with dpkg -l filename to make sure that's the right system.

The part that didn't make any sense to me is that some of the files were marked as "deinstall" but then when I used dselect to remove them, they remained in the database the next time I did dpkg --get-selections >myselections.txt, still listed as "deinstall", although they were removed...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Method Not Allowed: The requested method POST is not allowed for the URL /writedhcp.p WiWa Linux - Networking 15 01-06-2011 01:20 PM
easy vnc method installation sharadshankar Ubuntu 4 01-23-2006 02:19 PM
installation method majeztik *BSD 1 11-04-2004 11:49 PM
Is the method of installation of Unix and Linux the same??? kallan Linux - Newbie 6 09-01-2004 12:14 PM
Your installation method? (from source) lrt2003 Linux - Newbie 3 06-26-2004 09:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration