Recently, my Ubuntu server had a disk failure, after a LiveCD & fsck.ext4, it seems many inodes are lost. Most of them should be program files of installed apt packages.
Before I'm going to reinstall the whole system, I need to reboot the server and run some server applications to backup some data&configurations. And, sure enough, I couldn't boot the server again because some files are lost.
I think something like apt-cache might remember those program files installed from deb packages. I want it scan over the disk and found out which program files are missing, and then refetch them from the ubuntu repository.
This may just look like the Windows sfc
utility, which just re-copy all incorrect versioned system files from the CDROM. But I'm not sure if aptitude support this kind of recovery.
You can force packages to reinstall using
apt-get install --reinstall <packages>
; the problem is that if you can't runapt-get
on the machine, you can't do that, and it sounds like you might be just that broken.Consider this failure an object lesson in maintaining good risk management and disaster recovery plans, installation and setup documentation, automated build practices (where cost-effective), and superlative backups.