Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I installed Ubuntu after Windows lost track of its installed components (the list was blank), and realised that I could at least use an OS for which such a problem was fixable without needing a MS technician.


Just wait until you get a corrupt .deb database...


I manage 100+ VM images and 20+ hosts, and we've run Debian on all of them for many years, and I also run Ubuntu on a number of machines. We've never once managed to get a corrupt database, so it's not exactly something that's common. And should it happen, you have backups, right?

Now, some quick searches reveal that if you don't have a backup, it is still just a matter of forcibly install dpkg, debconf, apt and apt-utils with appropriate switches to prevent the dependency resolution from complaining, copying the dpkg.status backups that are automatically copied to /var/backups/ to /var/lib/dpkg, and then force a "reinstall" of all the packages that are listed as installed to get the rest of the data (.info files etc. back).

If you somehow managed to wipe out both /var/lib/dpkg and /var/backups _and_ not have a backup of your system, I'd have little sympathy, but even then you can restore most of a system by getting package lists for your specific distro version and force reinstalls of all the base packages. Restoring dpkg info for any custom installs would be a bit more work, but not worse than getting an iso of the distro, mounting it, and obtaining a list of matching packages for the files in your system directories.

But the latter is not necessary. Your system will keep working. You'll just run into occasional problems installing new packages and having to force installs when something pulls in a package you actually have installed but don't have a record of.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: