MOUNT.LOCKFS(8)

πŸ’– MOUNT.LOCKFS(8) β€” the glow-up edition πŸ’–

okay bestie, gather round, because we're talking about mount.lockfs(8) from the bilibop system administration manual and honestly? she's a helper, she's a symlink, she's giving backstage-pass energy. πŸŽ€


✨ NAME ✨

mount.lockfs β€” a little helper script that does the behind-the-scenes work for the mount command. no cap, she's support staff but she's iconic support staff. πŸ‘‘


🌸 SYNOPSIS 🌸

mount.lockfs FILESYSTEM MOUNTPOINT [MOUNTFLAGS] -o MOUNTOPTIONS

that's the shape of it, bestie β€” filesystem, mountpoint, maybe some mount flags, and then the -o mount options. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea. /usr/sbin/mount.lockfs is literally a symlink pointing at /usr/libexec/bilibop/lockfs_mount_helper. 🫢

she works as an helper program for the mount(8) command, specifically for the lockfs filesystem type entries in /etc/fstab.

BIG warning, bestie: this script cannot be run manually. not even a little. and she fails if the root filesystem isn't already being managed by bilibop-lockfs. so like, don't just vibe-launch her from your terminal, she will simply not. 😭

the expected way to run her, and how she does her whole job, goes like this:

  1. Enable bilibop-lockfs: set the BILIBOP_LOCKFS variable to true in bilibop.conf(5) and reboot the computer; or reboot the computer and append the lockfs kernel parameter to the boot commandline. ✨
  2. one time the future / is set as an union filesystem mountpoint from into the initramfs environment, the temporary and writable fstab(5) on it is modified to replace filesystem types of some entries by lockfs. options are also modified to remember the original fstype. πŸ“
  3. one time the union mount is the new root filesystem, initscripts are executed: fstab(5) is parsed by mount -a, and then mount(8) calls mount.lockfs with the proper arguments when a lockfs fstype is encountered. πŸ”₯
  4. mount.lockfs parses arguments and checks if the filesystem has been whitelisted in bilibop.conf(5), or not. if it is the case, the filesystem is mounted normally and the fstab entry is modified to reflect the actual mount call. if neither the filesystem nor the mountpoint have been whitelisted, then the filesystem is mounted elsewhere and readonly, a temporary filesystem is mounted with proper options, size, permissions and ownership, and an aufs or overlay filesystem (depending on the version of your kernel) is mounted on the MOUNTPOINT given as argument with the lower/readonly and upper/writable branches previously set. the fstab entry is replaced by three lines reflecting the actual mount calls. if something fails, mount.lockfs acts as if the filesystem was whitelisted. see /usr/share/doc/bilibop-lockfs/README.Debian for details. πŸ’œ

⭐ OPTIONS ⭐

lockfs_mount_helper uses options and arguments as they are given by mount(8) after it has parsed the corresponding fstab(5) entry. so, options and arguments are mandatory, mount flags are optional, and all come in the following order:

  • FILESYSTEM β€” corresponding to the first field in fstab. this must be a block device, or a symlink to a block device. if this field is given with one of the UUID=* or LABEL=* formats, then the mount command translates it to the corresponding device name before to call the helper program. πŸ’«
  • MOUNTPOINT β€” corresponding to the second field in fstab.
  • [MOUNTFLAGS] β€” generic flags passed to the mount commandline (the most usual being -v and -n). these are the optional ones, bestie, the little sprinkle on top. πŸ“
  • -o MOUNTOPTIONS β€” corresponding to the fourth field in fstab. the mount options are parsed by the helper script: if fstype=* is encountered, it is removed from the options and used to mount the readonly branch with this filesystem type. if ro, noexec, nosuid or nodev options are encountered, they are added to the list of mount options of the writable branch. 🧚

πŸŽ€ FILES πŸŽ€

  • /etc/fstab
  • /usr/libexec/bilibop/lockfs_mount_helper
  • /usr/share/doc/bilibop-lockfs/README.Debian

🌈 SEE ALSO 🌈

aufs(5), bilibop(7), bilibop.conf(5), fstab(5), mount(8)

like, go read those too, iykyk. πŸ“š


πŸ‘‘ AUTHOR πŸ‘‘

this manual page has been written by Bilibop Project <quidame@poivron.org>. absolute legends, honestly. 🫢


and that's the whole page, bestie!! this was the bilibop version dated 2020-02-02 β€” thanks for reading, you ate that, periodt. πŸ’…βœ¨πŸŒΈ