D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Hate computers. Hate systemd. [Was Re: Hate computers. Hate HP. Hate USB.

 

On 11/11/2021 15:44, Julian Hall wrote:

NB: They shouldn't even exist much less be active. As I said I'm trying to only use fstab.

julian@Cerce:~$ sudo systemctl umount /media/julian/DEMETER
Unknown operation umount.
julian@Cerce:~$ sudo umount /media/julian/DEMETER
umount: /media/julian/DEMETER: not mounted.
julian@Cerce:~$
julian@Cerce:~$ sudo ls -alh /media/julian
total 20K
drwxr-xr-x 5 root root 4.0K Oct 25 16:49 .
drwxr-xr-x 3 root root 4.0K Sep  9 16:09 ..
drwxr-xr-x 2 root root 4.0K Sep  9 16:09 DEMETER
drwxr-xr-x 2 root root 4.0K Sep 18 09:55 HESTIA
drwxr-xr-x 2 root root 4.0K Sep 18 09:56 PERSEPHONE
julian@Cerce:~$ sudo chown julian:julian /media/julian/DEMETER
julian@Cerce:~$ sudo ls -alh /media/julian
total 20K
drwxr-xr-x 5 root   root   4.0K Oct 25 16:49 .
drwxr-xr-x 3 root   root   4.0K Sep  9 16:09 ..
drwxr-xr-x 2 julian julian 4.0K Sep  9 16:09 DEMETER
drwxr-xr-x 2 root   root   4.0K Sep 18 09:55 HESTIA
drwxr-xr-x 2 root   root   4.0K Sep 18 09:56 PERSEPHONE

*saving reply to reboot*

Still the same. Boots, mounts, refuses to let me see the content :(

Ok, at least you've got ownership of the mountpoint now which should have fixed it but well, I guess it didn't.

Next, I don't need to see the output but use sudo ls to check the contents under /media/julian/DEMETER - cherry pick a folder that is already definitely showing as owned by julian:julian along with it's contents. See if you can do:

ls -alh /media/julian/DEMETER/blah

Where blah is the target folder. We want to ascertain if you can access certain child folders under the mount point _without_ having to use sudo. Try a couple if possible and report back. I think the next step is to reluctantly just hammer it after all. I feel a sudo chown -R coming on at this rate...

Also I messed up some of the prior commands, good job fixing them.

Also also I keep trying to explain this but it doesn't seem to be taking. fstab no longer works as old skool users think it does: it serves only to be read and ingested by the special tool systemd-mount-generator, part of systemd obviously. The mount generator scans fstab and generates native systemd mount units dynamically which are then fed to the mount process during boot. There is NO way around this and nor do you want one: systemd can handle complex scenarios such as layered disks/datasets, ZFS or BTRFS subvol or snapshot manipulation, iscsi and many other things. Systemd orders everything during boot and it does that partly by reading fstab so yes, you ARE using systemd mount units.

You can actually tell if you look at your own command output:

julian@Cerce:~$ sudo systemctl stop media-julian-DEMETER.mount
Warning: Stopping media-julian-DEMETER.mount, but it can still be activated by:
  media-julian-DEMETER.automount

So if media-julian-DEMETER.mount and media-julian-DEMETER.automount don't exist what is your system(d) talking about there then eh?

Hint:

systemctl list-unit-files | grep .mount

Those are all the other systemd mount units that "don't exist" on your computer lol :]

--
The Mailing List for the Devon & Cornwall LUG
https://mailman.dcglug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq