Originally Posted by
Bashing-om
rellyjelly; hey -
As in my post #5, mount that target partition and have a look at what is present.
we can do that
+1
@rellyjelly>>This my friend will be the most challenging (Hopefully lesson learned) feat you will ever do on linux system, my advice is to back-up what you can and re-install the system.
Fixing this will involve at least reinstalling the packages which provide the missing symlinks...
If you create your symlink like this:
Example only!
Code:
cd /usr/local/etc
ln -s nginx/ /etc/nginx
You will in fact make the link /etc/nginx -> /etc/nginx, because the source path is relative to the link's path. The solution is as simple as using absolute paths:
Example only!
Code:
ln -s /usr/local/etc/nginx /etc/nginx
I like using find's -L option combined with the -type l test allows broken symlinks to be identified; then dpkg -S will identify the corresponding package in most cases:
[/code]
Code:
dpkg -S $(find -L /usr/bin -type l)
Or:
Code:
cd /suspected/directory
find -L ./ -mindepth 15
Filtering this and feeding it to apt-get allows the packages to be reinstalled:
Code:
apt --reinstall install $(dpkg -S $(find -L /usr/bin -type l) | grep -v "diversion by" | cut -d: -f1)
I've only done this once years ago, and I won't do it again. (It took ages to fix and re-fix)
Bookmarks