Page 1 of 1

updatedb / locate Fails in Live USB Authored Snapshot (SOLVED)

Posted: Fri Apr 19, 2024 2:26 pm
by calinb
I made a snapshot of an up-to-date MX-23 system with a bunch of compiled and installed ham radio applications and a WINE environment too (no ~/ files included from the original system). Then I used MX Live USB Maker to create USB sticks with a new "demo" logon to share with friends.

However, I found that one of my staple utilities, updatedb / locate (plocate) no longer functioned. After running "sudo updatedb", "locate <filename>" failed to find any files anywhere in the system. Eventually I tracked the problem down to an entry in the /etc/updatedb.conf file. A "yes" entry must be changed to "no."

Change

Code: Select all

PRUNE_BIND_MOUNTS="yes"
to

Code: Select all

PRUNE_BIND_MOUNTS="no"
I don't know anything about BIND_MOUNTS but, apparently, the entire live boot system uses them!

man updatedb.conf produced:

Code: Select all

       PRUNE_BIND_MOUNTS
              One  of  the strings 0, no, 1 or yes.  If PRUNE_BIND_MOUNTS is 1 or yes, bind mounts are not scanned by
              updatedb(8).  All file systems mounted in the subtree of a bind mount are skipped as well, even if they are
              not bind mounts.  As an exception, bind mounts of  a  directory on  itself are not skipped.  Note that Btrfs
              subvolume mounts are handled internally in the kernel as bind mounts (see btrfs-subvolume(8)), and thus,
              may get skipped if you have also mounted the filesystem root itself.  To counteract this, make your root
              directory a Btrfs subvolume, too.

              By default, bind mounts are not skipped.

It would be nice if a fix could somehow be supported by Snapshot (an option) or Live USB Maker. I did not find any help on this subject in my online searches here or elsewhere either.

Cal