[Solved]Suggested actions to undelete essential header files
Posted: 2. May 2016, 10:50
Greetings Salixers.
I am facing a serious issue, caused by a bug in a project's malfunctioning Makefile. In short, an included Makefile was accidentally moved to another directory, and a "make uninstall" in main Makefile deleted EVERYTHING in /usr/include. Of course, the one to blame is me and not Salix itself. That being said, I wonder what I can do to recover deleted content.
Note that the disk has an Intel(MBR) partition table, and Salix is installed in /dev/sda1 with personal data stored in /dev/sda2. There are no other operating systems installed in that machine, so the only partitions in the disk are those two, plus the swap..
Now, the options I think I have are:
(1) Use a rescue LiveCD/stick to recover the huge amount of header files deleted. Thankfully, I realized the mistake shortly after it happened. plus personal data are in a different partition. This means not much disk activity happened in /dev/sda1 after the deletion of /usr/include, so I guess most of the deleted files would still be recoverable. Not all of them, however - and go figure which ones are lost forever. Furthermore, I am not familiar with rescue LiveCDs, so not sure which one is best for undeleting files. I am thinking about Gparted live cd (which contains the program "Testdisk" for that purpose), but I am not sure really.
(2) Copy /usr/include/* from another computer running same operating system (Salix 14.1 64-bit). Most of the content should be the same, but I'm sure some header files would still be missing, and I have no idea which ones.
(3) Best solution would be a system integrity check program, something that would scan all packages installed in my system and, if those packages install header files, check if the corresponding content in /usr/include exists (if not, solve the issue by reinstalling header files that should be there). I have no idea if such a tool exists though.
Any suggestions/ideas more than welcome.
I am facing a serious issue, caused by a bug in a project's malfunctioning Makefile. In short, an included Makefile was accidentally moved to another directory, and a "make uninstall" in main Makefile deleted EVERYTHING in /usr/include. Of course, the one to blame is me and not Salix itself. That being said, I wonder what I can do to recover deleted content.
Note that the disk has an Intel(MBR) partition table, and Salix is installed in /dev/sda1 with personal data stored in /dev/sda2. There are no other operating systems installed in that machine, so the only partitions in the disk are those two, plus the swap..
Now, the options I think I have are:
(1) Use a rescue LiveCD/stick to recover the huge amount of header files deleted. Thankfully, I realized the mistake shortly after it happened. plus personal data are in a different partition. This means not much disk activity happened in /dev/sda1 after the deletion of /usr/include, so I guess most of the deleted files would still be recoverable. Not all of them, however - and go figure which ones are lost forever. Furthermore, I am not familiar with rescue LiveCDs, so not sure which one is best for undeleting files. I am thinking about Gparted live cd (which contains the program "Testdisk" for that purpose), but I am not sure really.
(2) Copy /usr/include/* from another computer running same operating system (Salix 14.1 64-bit). Most of the content should be the same, but I'm sure some header files would still be missing, and I have no idea which ones.
(3) Best solution would be a system integrity check program, something that would scan all packages installed in my system and, if those packages install header files, check if the corresponding content in /usr/include exists (if not, solve the issue by reinstalling header files that should be there). I have no idea if such a tool exists though.
Any suggestions/ideas more than welcome.