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 16:03, comrade meowski wrote:
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...
Not even access to DEMETER much less child folders. Curious to note though, when I looked at Permissions in the graphical File Manager although the Owner and Group said 'julian' the Access To Files' option was '---' which probably explains a hell of a lot. It's taken ownership of the folders but not their contents.

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 :]
julian@Cerce:~$ systemctl list-unit-files | grep .mount
media-julian-DEMETER.automount generated       enabled
proc-sys-fs-binfmt_misc.automount static          enabled
-.mount generated       enabled
dev-hugepages.mount static          enabled
dev-mqueue.mount static          enabled
home.mount generated       enabled
media-julian-DEMETER.mount generated       enabled
proc-fs-nfsd.mount static          enabled
proc-sys-fs-binfmt_misc.mount disabled        enabled
run-rpc_pipefs.mount static          enabled
sys-fs-fuse-connections.mount static          enabled
sys-kernel-config.mount static          enabled
sys-kernel-debug.mount static          enabled
sys-kernel-tracing.mount static          enabled
clean-mount-point@.service static          enabled
systemd-remount-fs.service enabled-runtime enabled
umount.target static          enabled

julian@Cerce:~$

Now I'm puzzled. As part of my reinstall procedure I physically create the .mount and .automount files, so when I said they don't exist what I meant was the files I created were inactive, disabled and physically removed. Have I stuffed up what systemd wants by doing that? BTW as far as old school users, I just followed (probably blindly knowing me) what I found online.

Julian

--
“The great tragedy of Science — the slaying of a beautiful hypothesis by an ugly 
fact.”

― Thomas Henry Huxley


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