[opensuse] List all installed packages for a new install
Hi all- I'm re-installing openSUSE on a new (bigger) drive. My thought is (after backing up my home directory) to use zypper to list all installed packages to a file and then later use that file (and zypper) to re-install those packages on the new drive. Has anyone done this? What would be the zypper commands to do so? -- Cheers, Trey ---- For the judgement of mankind is as relentless to the weakness that falls short of a recognized renown, as it is jealous of the arrogance that aspires higher than its due. Pericles as quoted by Thucydides, Book II of his history of the Peloponnesian War Linux antergos 4.18.10-arch1-1-ARCH x86_64 19:00:40 up 7 days, 3:07, 1 user, load average: 0.73, 0.63, 0.62 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Em sex, 5 de out de 2018 às 20:03, Trey Sizemore <trey@fastmail.fm> escreveu:
Hi all-
I'm re-installing openSUSE on a new (bigger) drive. My thought is (after backing up my home directory) to use zypper to list all installed packages to a file and then later use that file (and zypper) to re-install those packages on the new drive.
Has anyone done this? What would be the zypper commands to do so?
-- Cheers, Trey
I have this, but it uses rpm, not zypper: $ rpm -qa --qf '%{name}\n' | sort > installed_packages.txt Customize the query format (qf argument) to your like. Cheers, Antonio The Linux Kamarada Project http://kamarada.github.io/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am Samstag, 6. Oktober 2018, 01:03:09 CEST schrieb Trey Sizemore:
Hi all-
I'm re-installing openSUSE on a new (bigger) drive. My thought is (after backing up my home directory) to use zypper to list all installed packages to a file and then later use that file (and zypper) to re-install those packages on the new drive.
Has anyone done this? What would be the zypper commands to do so?
to list all packages: rpm -qa --queryformat="%{name}\n" > file.txt to install them again later: cat file.txt|xargs -r zypper in --recommends that being said, do you *have* to reinstall? if you used LVM you could just migrate from one drive to the other. hth Mathias -- Mathias Homann Senior Systems Engineer, IT Consultant. IT Trainer Mathias.Homann@openSUSE.org http://www.tuxonline.tech gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
On 06/10/2018 01.03, Trey Sizemore wrote:
Hi all-
I'm re-installing openSUSE on a new (bigger) drive. My thought is (after backing up my home directory) to use zypper to list all installed packages to a file and then later use that file (and zypper) to re-install those packages on the new drive.
Has anyone done this? What would be the zypper commands to do so?
You can obtain the list of packages, yes, but you can not reproduce an installation that way, for several reasons. The main one, IMHO, is that you don't get the information as to what package did each rpm come from. And there are files that were created and modified after installation, that will not be the same in the second install - for instance, the list of repositories. It is far easier, in fact: just copy every file from original disk to new disk, using rsync in Linux: basically: OPTIONS="--archive --acls --xattrs --hard-links --sparse --stats --human-readable " rsync $OPTIONS --one-file-system --exclude=/lost+found \ $FROM/ $DEST Then chroot the destination drive (assuming it is mounted on /mnt): mount --bind /proc /mnt/proc mount --bind /sys /mnt/sys mount --bind /dev /mnt/dev chroot /mnt yast Will run in text mode. Select the boot module, and make sure settings point to new drive. Change one setting, the timeout, and this will force yast to reinstall grub to new drive. That's all. :-) Note: I assume you are not using btrfs. If you are, then reinstall instead. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
* Trey Sizemore <trey@fastmail.fm> [10-05-18 19:05]:
Hi all-
I'm re-installing openSUSE on a new (bigger) drive. My thought is (after backing up my home directory) to use zypper to list all installed packages to a file and then later use that file (and zypper) to re-install those packages on the new drive.
Has anyone done this? What would be the zypper commands to do so?
to list installed pgms: zypper se -si -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/10/2018 02:03, Trey Sizemore wrote:
Hi all-
I'm re-installing openSUSE on a new (bigger) drive. My thought is (after backing up my home directory) to use zypper to list all installed packages to a file and then later use that file (and zypper) to re-install those packages on the new drive.
Has anyone done this? What would be the zypper commands to do so?
- perhaps someone knowledgeable can explain : - suspect this can be done , as root , running : #yast2 clone_system which will produce a file named "autoinst.xml" - that file autoinst.xml can be used to do what you want [ i suspect ] .......... regards -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/10/2018 09.55, ellanios82 wrote:
On 06/10/2018 02:03, Trey Sizemore wrote:
Hi all-
I'm re-installing openSUSE on a new (bigger) drive. My thought is (after backing up my home directory) to use zypper to list all installed packages to a file and then later use that file (and zypper) to re-install those packages on the new drive.
Has anyone done this? What would be the zypper commands to do so?
- perhaps someone knowledgeable can explain :
- suspect this can be done , as root , running :
#yast2 clone_system
which will produce a file named "autoinst.xml"
- that file autoinst.xml can be used to do what you want [ i suspect ]
No. AFAIK it does not store the repository list, nor does it store from what repo was each package installed from. It only works well if you do not use any extra repo, like packman. Only oss/non-oss. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
participants (6)
-
Carlos E. R.
-
ellanios82
-
Linux Kamarada
-
Mathias Homann
-
Patrick Shanahan
-
Trey Sizemore