So I have two SSDs in my laptop running FedoraKDE, and every time I mount the one used for storage, I have to type the luks password and then my root password. So, looking it up, I found that to not need root to mount the drive I need to add it to fstab.

I added (as was told by the internet since I’m flying by the seat of random stackoverflow help in absence of real knowledge):

UUID=uuid-string-goes-here   /path/to/directory ext4 defaults 0 0

To fstab (and forgot to chown the directory, oops!) and rebooted, aaaaaaand now I get booted into “emergency mode” with root disabled and have no clue what to do.

I think I used the right uuid, it was nvme0p1 (or whatever that drive said the right name was, can’t check now!) In any case, I didn’t use the uuid of the drive my system was running on, for sure.

Boot hangs on

job dev-disk-by\x2duuid- [Something something]

Edit: Still taking any advice on how to actually not have to use root to mount this drive, though my boot issue is solved and it looks like I have some links to peruse already!

  • ArcaneSlime@lemmy.dbzer0.comOP
    link
    fedilink
    arrow-up
    2
    ·
    3 days ago

    Woof ok looks like I have some research to do, thanks! Hopefully I can find a handy youtube tut or stackoverflow on it, because that’s about my level of expertise on “linux stuff I haven’t done at least twice” haha.

    • flatbield@beehaw.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      3 days ago

      You could ask duck.ai too then verify the commands with the man command so you know what they do.

      Edit: Also crypttab and fstab are documented in man too as are cryptsetup, mount, and umount.

      Edit: Good to not fully trust ai.

      • ArcaneSlime@lemmy.dbzer0.comOP
        link
        fedilink
        arrow-up
        1
        ·
        3 days ago

        Hmm AI my old nemesis. Still, perhaps it may be necessary for me and AI to work out our differences momentarily, as I am so far unable to find the answers I seek.

        Seems I’m the only one who wants it not to auto-mount, but rather to simply be able to be mounted not as root and still require the luks pass.

        Plenty of people seem to want to do the exact opposite though, auto mount it and bypass the luks password (which imo almost defeats the purpose, though I get it, still protected at rest and all, but my way it’s still protected until you specifically call upon it!)

        • flatbield@beehaw.org
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 days ago

          That is interesting. You can do that by the command line. Basically run cryptsetup to map the encrypted partition, then run mount. Those commands could also be place in a bash script too. You may need sudo access to run cryptsetup. You will need sudo access for mount unless you configure it as user mountable and not auto mounted in fstab.

          You also want script to umount it and unmap it with cryptsetup when done.

          Graphically, maybe the Disks gnome tool can do.

          • ArcaneSlime@lemmy.dbzer0.comOP
            link
            fedilink
            arrow-up
            1
            ·
            3 days ago

            unless you configure it as user mountable and not auto mounted in fstab.

            Maybe all I have to do is this actually, I need to read that fstab man page. I absolutely did not understand that I could use things like noauto and nofail instead of default until this thread.