Install and configure locate (mlocate) on CoreOS

The locate package is useful for getting acquianted with a filesystem. As usual, the easiest way to achieve this on CoreOS is via toolbox (instructions for using the default Fedora image):

$ toolbox
$ yum install -ty mlocate

locate ignores the /media mount point by default. These commands will update the /etc/updatedb.conf file so we can search the CoreOS host's filesystem:

$ sed 's/^PRUNE_BIND_MOUNTS.*/PRUNE_BIND_MOUNTS = "no"/' -i /etc/updatedb.conf
$ sed -e '/^PRUNEPATHS/!b' -e 's# /media # #' -i /etc/updatedb.conf

Then update the database:

$ updatedb
$ locate andy/.bashrc
/media/root/home/andy/.bashrc
/media/root/home/andy/.bashrc.bak