duplicate install via equo for new HD or machine? [Solved]

Discussion in general that pertains to Sabayon Linux - Must Pertain to Sabayon Linux

Moderator: Moderators

Post Reply
anomaly65
Technological Hen
Posts: 305
Joined: Sat Nov 17, 2007 15:37

duplicate install via equo for new HD or machine? [Solved]

Post by anomaly65 » Sat Jan 21, 2012 0:56

Hi all,

Was wondering if there is a sane way to copy a previous install (e.g. I don't want a disk copy due to problems or whatever in previous install; just want the same set of apps/etc installed via equo on a fresh install).

such as "equo install --from myoldlist.txt"

After 3-4 major releases, or setting up a new machine on new hardware, would be nice to do so.

Is this possible?

Thanks,
andy
Last edited by anomaly65 on Sat Jan 21, 2012 17:36, edited 1 time in total.
--
Use handrails on stairs. A nasty fall face first changes your point of view quickly, and mine permanently :-)

joost
Sagely Hen
Posts: 2676
Joined: Fri Nov 17, 2006 12:11
Location: The Netherlands
Contact:

Re: duplicate install via equo for new HD or machine??

Post by joost » Sat Jan 21, 2012 14:05

I'd do something like this:

To collect what your old install has now:

Code: Select all

equo query installed --quiet > my_list.txt
Then on your new installed and updated system:

Code: Select all

equo install $(cat my_list.txt) --ask
Image
My blog | Twitter | Please support Sabayon: Image

BHReach
Growing Hen
Posts: 193
Joined: Thu Jan 31, 2008 20:40

Re: duplicate install via equo for new HD or machine??

Post by BHReach » Sat Jan 21, 2012 16:08

joost wrote:I'd do something like this:

To collect what your old install has now:

Code: Select all

equo query installed --quiet > my_list.txt
Then on your new installed and updated system:

Code: Select all

equo install $(cat my_list.txt) --ask
That will reinstall the packages that Sabayon just installed. See my next post for a solution that avoids reinstalling those.

BHReach
Growing Hen
Posts: 193
Joined: Thu Jan 31, 2008 20:40

Re: duplicate install via equo for new HD or machine??

Post by BHReach » Sat Jan 21, 2012 16:23

Yes it is possible but unless you kept track of everything you installed (always keep good notes on all changes you make to your base installation), it will require some work on your part.

Code: Select all

cat /var/log/entropy/entropy.log |grep -i 'installing package' >installedPackagesByDate.txt
The above command extracts all, packages installed from the entropy log and saves them to a file.

Open the file and notice at the top of the file is a large number of packages installed very close together in time. These are the packages that the Sabayon installer installed.

Delete all those lines from the file and save it.

Code: Select all

cat installedPackagesByDate.txt |cut -d: -f 5 |sed -e "s/\(.*\)-[0-9].*/\1/" |sort -u |tr '\n' ' ' >packagesFormatted4Equo.txt
The above command will extract the package names and save them in a file in a form that equo can use.

Save that file on a flash drive, install the latest version of Sabayon. Copy the file from the flash drive and run:

Code: Select all

equo install --ask `cat packagesFormatted4Equo.txt`
That command will install the packages you added. There may be a few errors reported due to packages you installed that are no longer available or some unconventionally named packages that my sed regex didn't extract correctly but 99% should work OK.

Also to avoid downloading all the packages again, run:

Code: Select all

tar cvf packages.tar /var/lib/entropy/client/packages/packages/amd64/5/
This will tar all the packages you already downloaded. Save packages.tar to a flash drive then copy it back and untar to the correct directory before running the equo install command.

anomaly65
Technological Hen
Posts: 305
Joined: Sat Nov 17, 2007 15:37

Re: duplicate install via equo for new HD or machine??

Post by anomaly65 » Sat Jan 21, 2012 17:20

WOW, brilliant. thanks so very much!
--
Use handrails on stairs. A nasty fall face first changes your point of view quickly, and mine permanently :-)

Post Reply