Page 2 of 2 FirstFirst 12
Results 11 to 11 of 11

Thread: Won’t boot-too many levels of symbolic links

  1. #11
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Won’t boot-too many levels of symbolic links

    Quote Originally Posted by Bashing-om View Post
    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)
    Last edited by 1fallen; July 23rd, 2019 at 06:48 PM. Reason: fixxed tags
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •