[–] 2 points 4 months ago* (last edited 4 months ago)

Yeah, and you may very well be giving him the right answer; he very well may be just be accidentally using the term, and actually thinking of a regular mount. I gave a response specific to bind mounts as a top level comment.

EDIT: Yeah, he put a portion of his fstab up there


he's after honest-to-God bind mounts (or at least, that's what he's presently using).

  • source
  • parent
  • context
  • [–] 2 points 4 months ago* (2 children)

    Oh yeah, you're correct. I misinterpreted that. If @linuxPIPEpower@discuss.tchncs.de really does mean a bind mount, then I'm guessing it will require systemd. That can act upon the appearance of a file/folder and trigger another unit. In this case that would be a mount. Upon disappearance the reverse could happen.

    I don't know of a user-friendly way to do it, but if OP is talking about real bind mounts, they aren't a normal user anymore and this is a very specific usecase.

  • source
  • parent
  • context
  • [–] 2 points 4 months ago* (last edited 4 months ago) (3 children)

    mount/unmount everything individually when I plug/unplug the drive.

    Setting aside bind mounts, there is no reliable, safe way to just unplug a USB drive. You always need to, in software, on any OS, manually signal to the OS in some way that you're not using it to ensure that any data is flushed to the drive and the OS isn't using it. Zip drives had a locking mechanism and a button that requested an unmount and eject of the media, but USB drives where you expect to just unplug the thing don't. You might get away with it, and newer filesystems won't have the whole filesystem become corrupt if you just yank it, but you still should unmount it. There are systems to automatically mount. There are systems to automatically unmount filesystems that will go unused for a while, and at that point it is safe to unplug. But USB just doesn't physically support blocking someone unplugging something until all the data is written out; if you just yank the thing out, you always run the risk of losing data, even if it mostly works. True for Windows, Linux, any OS. That's why, for example, Windows has that "eject flash drive" thing in its system tray. And note that most flash drives come formatted with some version of FAT, an older DOS/Windows filesystem, which does have the risk of becoming corrupt (i.e. you could lose everything on the filesystem) if it isn't cleanly unmounted. The risk may be small, but it's there. If you reformat the drive with something like ext3, ext4, btrfs (Linux-native filesystems) or NTFS (a Windows-native filesystem), then that corruption risk goes away, and your risk is just "some data that you recently saved might not have made it to the drive".

    Okay, that being said, normally a bind mount is a mount that is a "virtual copy" of what exists elsewhere on the filesystem. That is, if you have a bind mount of something, it appears to userspace software to be mounted at two different locations. I'm not sure if that's actually what you mean, or if you just want a single mount that is automatically done by software when you plug the drive in. If you do mean "bind mount", I don't know of a way to do that off the top of my head, though there might be a way to achieve it with udev. I'd guess that there's probably a way to set it up to run arbitrary commands when a device is connected, so there's probably a way to run a bind mount command as well as a regular mount command.

    If I were doing this myself and wanted the mount to be at a second location merely for convenience (like, I wanted "shortcuts" that pointed at some drive, when it was plugged in, elsewhere), I would most likely not use a bind mount, but rather just make a symlink aimed at the regular mount point, and access the symlink. Bind mounts are a fairly-exotic thing that one normally uses if one wants to give access to a process to a mount without letting it have access to the directory structure leading up to it, like a containerized system.

    If what you want is not a bind mount, but just a regular mount (you don't want the mount to "exist" at two different places in your filesystem tree), then there are various systems that will automatically mount something when you plug it in. @onlinepersona@programming.dev is, I believe, correct that most desktop environments on Linux have some system for this; I'm not familiar with them, as I don't use a desktop environment, so I'm probably not the best person to advise there. I have used autofs, which is an older, more-general and somewhat-more-complicated-to-set-up system that will try to automatically mount a mount when you try accessing a mountpoint, then unmounts it if it is unused for a while. This tends to be more useful for things like network mounts.

  • source
  • [–] 1 point 4 months ago* (3 children)

    Assuming that OP is using the term correctly, a bind mount is where you have a second "copy" of a mount somewhere else on the filesystem (like, you use mount --bind). So he might specifically want two mountpoints for the mount. I don't use KDE, but I don't know if they do that with whatever system they have going on.

  • source
  • parent
  • context
  • [–] 3 points 4 months ago*

    How to make my changes permanent on my USB stick ?

    My suggestion,

    • get a second fast usb stick (maybe wise to go bigger),

    and

    • do a regular install [from your current live MX usb stick[1]] to that new usb stick.

    Then it's like an install as if to the hard drive, (letting you keep changes between reboots etc) just the same, except it's on your new usb stick. :)

    [1: I presume that MX fluxbox live system has an installer icon to click on for an easy install.]

  • source
  • [–] 1 point 4 months ago

    I do this for my rust box. Nothing but spinning discs for NAS. Boots from a usb stick with an immutable root. Persistence overlay partition keeps config and changes and updates and stuff. I think it was something like a partition for overlayfs defined to mount in grub. Or maybe the only grub stage customization was the wpasupplicant... Been a while since I made it. Something to load boot into ramdisk as well so logging and such doesn't thrash the trash silicon to death. Many ways to skin it!

  • source
  • [–] 4 points 4 months ago

    From your live USB there is an MX Linux software to create another mxlinux on another USB drive which will be persistent,but I don't remember the exact name.

  • source
  • [–] 4 points 4 months ago

    the feature you're looking for is called "persistance". i've never tried it, but i know a tool called Ventoy can be configured for it. (i use ventoy but not with persistance)

  • source
  • [–] 1 point 4 months ago*

    Nobody's getting into the real issue lol. Yes, yes, tab completion. But all you need to do is escape the dollar sign: \$. Or include it inside the single quotes.

    👍👍

  • source
  • [–] [S] 1 point 4 months ago

    After going through my screenshot, Gemini suggested me to download a certain tool from Microsoft and install it, giving me the exact steps to do it. I followed, and then found my newly installed WSL working again.

  • source
  • parent
  • context
  • [–] 2 points 4 months ago* (last edited 4 months ago) (1 child)

    As others have said, tab-complete should be able to do it. If not, here are two other options:

    Is it the only "folder*" in the directory?

    $  ls *folder*
    ‘folder’$‘003’
    

    If you only have that, you should be able to use the wildcards to delete it:

    rm *folder*
    

    Another is just find the inode and delete using that:

    $  ls -li | grep folder
    5120013  .rw-rw-r-- user user  0 B  Fri Jun 19 21:09:02 2026 ‘folder’$‘003’
    
    $ find . -inum 5120013 -delete
    
  • source
  • view more: ‹ prev next ›