On 20/01/11 04:14, Philip Amadeo Saeli wrote:
* Tejas Guruswamy <tejas.guruswamy@opensuse.org> [2011-01-19 10:04:27 +0000]:
On 19/01/11 05:46, Philip Amadeo Saeli wrote:
What should be my next move from here? Is it possible to rescue this install? If not, is there a way to obtain a copy of the package list and import it into a new, fresh install so I don't have to go thru all the packages looking for the ones I need (a time consuming and tedious process for me).
I found the y2log and the zypp/history log files which contain millions of lines of status between them and which appear to contain all of the packages selected. However, I was not able to locate a simple package list anywhere. If there is not list, anyone know the required format so I could possibly format, e.g., the zypp/history log contents into a suitable file?
Any help would be appreciated!
If all you want is a list of installed packages, try:
rpm -qa > installed-pkgs.txt
or if you just want the names (don't care about versions):
rpm -qa --queryformat="%{NAME}\n" > installed-pkgs.txt
You can do this from a chroot as well, if you're not able to boot the actual system. From the sound of it though, the attempted upgrades may have already mixed up your package list - YMMV
Regards, Tejas
Thanks for the response. This is my second fresh try, so things should not be messed up at this point.
However, does anyone know how I can import the list of packages from this failed install into a newly initiated install? I do have a disk partition where I can store the file. I just don't know how to format the file or what info is needed in it. My wish is that there is a file somewhere that I can simply save and import into the new install (hah!).
--Phil
That's exactly what I was explaining - you run the commands I gave on your failed system, it will create a file with a list of all installed packages. First you need to get a console (text-based, don't bother with trying to get X to start)\ login on the failed installation. If it boots to runlevel 3 (put "3" at the end of the grub kernel options when booting), use that. At the console login, login as whatever works, preferably root. Then run (don't include the "> ", that's just to distinguish the commands from message text):
rpm -qa --queryformat="%{NAME}\n" > installed-pkgs.txt
mkdir /mnt/root mount /dev/sda1 /mnt/root (assuming /dev/sda1 is the
The package list "installed-pkgs.txt" will be in the current directory (probably the home folder for whatever user you logged in as, /root if you logged in as root), copy it away however you can. Otherwise, if you can't get the failed system to boot, you need to do a chroot recovery. This means, from a console prompt on a livecd/or other working installation on the same computer: partition with the failed install)
mount --bind /dev /mnt/root/dev chroot /mnt/root mount /proc mount /sys
Now you will be logged in, as root, to the failed install. Next execute the rpm command - a file "installed-pkgs.txt" will appear in the current directory.
rpm -qa --queryformat="%{NAME}\n" > installed-pkgs.txt
Exit the chroot
exit The file with all the installed packages will be in /mnt/root/installed-pkgs.txt. Use whatever method you're comfortable with to get it copied to your working install.
On your new system, to use this file, try something like:
cat installed-pkgs.txt | xargs zypper in
Regards, Tejas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org