Is there a file that lists all installed packages in Ubuntu
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Is there a file that lists all installed packages in Ubuntu
Hi there,
The other day I had a hard drive failure. I'm trying to rescue what information I can off the failed drive using another computer before reinstalling (on a new drive, of course). I can't boot into the installation on the failed drive, otherwise I would use dpkg --list, so I am wondering if there is a log file anywhere in Ubuntu that tells me which packages were installed. Under Slackware, if I remember rightly, there is a complete list of installed packages under /var/log/packages, I'm looking for something similar to that.
This isn't too important, if I can't get a list of the packages I had installed it's not the end of the world, no doubt I'll notice if there's one missing after reinstallation that I realise I want to use! I'm just curious about this, and I wasn't able to find the answer by doing a web search.
By the way, before anyone says it, I did keep backups, there shouldn't be any data loss, it's just going to be annoying reinstalling and reconfiguring everything (even if it is mostly just a case of copying in the old conf files).
just fyi, even if you can't boot the disk, it may be possible to mount it and chroot into it from a working disk (either livecd or the working disk)...
Since you say it isn't important, you probably don't want to do this, but if you were to run SpinRite on the failed drive, you probably would get it back to a usable state for at least a short time. This would give you time to get your data off, or maybe even enough time to image the drive.
It's not important enough to me to justify spending the license fee for SpinRite, but thanks for the suggestion. The wikipedia page on SpinRite also mentioned ddrescue, which I hadn't heard of before and is free, so that might be worth looking into if necessary. I think I've managed to get all the important data off the drive now though, apart from configuration data nearly all of it was in the last backup I took before the drive failed.
I don't think that ddrescue does the same thing as spinrite in one critical area. Ddrescue doesn't abort on I/O errors, but it also doesn't do much of a job of trying to read the block that has the error. IF it can't read it, it'll just fill it in with something in the output file.
Spinrite will read the damaged block over and over, and perform a statistical analysis of the data it reads in, attempting to reconstruct the real data that is in the block. More often than not, this works - although it can take a long time. If it recovers the data, it remaps the drive to remove the bad block and puts the data into one of the drive's spare blocks.
Sometimes after recovering the data, it then can rewrite that block, and test it, and find it to be OK. In this case it will then restore that block to the "active" list.
Presuming the heads move and the platter spins, it has been my experience that usually spinrite will return the drive to a serviceable state. If the drive is failing, the drive won't remain serviceable for long but it usually will last long enough to get the data off (perhaps with ddrescue). If the drive, for instance, experienced a soft head crash (like when one of your kids is playing, slips and falls, and knocks over the computer) then spinrite will save your bacon, recovering the drive with no data loss. If such an event didn't do hardware damage to the HD, you can just keep on going.
I do not know of any other product that can do this, and I have to say that it has been an invaluable tool for me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.