I used to place some mount commands into /etc/init.d/boot.local but that file is GONE. I want to mount my data partition /dev/sdaXY under /0/saXY but cannot get Yast to do it into /etc/fstab (I haven’t tried to edit fstab manually so far, want the partition world writable). Next attempt was to put it into ~/.profile with a few other commands. The other commands all execute but not the mount command even though the user IS mount authorised in sudoers.
What I would really like is a place for a bash script executed as root if possible with echo statements during, just like boot.local USED to be. What can I do?
Speaking of echo, how do I once and for all get rid of all flash or masking screens? I want to see all processes scroll by until “I” log into X.
I want to mount my data partition /dev/sdaXY under /0/saXY but cannot get Yast to do it into /etc/fstab (I haven’t tried to edit fstab manually so far, want the partition world writable).
A bit too vague for anyone to assist meaningfully. If you can mount manually from a terminal, then post the working mount command, and someone can show you how to enter this as an /etc/fstab entry.
If you really want to mount via a script executed at boot, you could still create a custom unit eg /etc/systemd/system/mount.service (similar to the deprecated rc-local.service)…
[Unit]
Description=custom mount service
After=basic.target
[Service]
Type=forking
ExecStart=/path/to/your/script
TimeoutSec=0
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Once you have a working executable script, point the service at it ‘ExecStart=’, and then enable and start it
As you earlier mounted it through init.d, you most probably want to have it mounted at boot. But the normal way to mount a file system at boot is of course through /etc/fstab. And that has not changed.
Thus I translate your request into: please help me to create a correct entry in /etc/fstab (something that should have been done long ago). And as you apparently managed to mount it to your wish, your mount statement must only be translated into an fstab entry. So do as suggested, tell how you mount.
What you say is <mostly> true that a standard way to mount on boot is an fstab entry.
But, there are also new systemd mount services of which I only pay passing interest because they have changed significantly at least once historically… Yes, the last time I checked now there are several mount services.
An example where a systemd mount service is used is in VMware, mounting shared folders.
So,
With a little research you <could> identify the systemd mount service that’s most appropriate and add an entry for what you want to do.
As noted…
What you’re now trying to do by adding an entry to ~/.profile is not similar to what you were doing before.
It should be possible to do what you’re trying to do, but you need to provide concrete details about what you’re trying that is failing.
I forgot to say that I’m using Splashma5, it is a factor in that Dolphin is running under it (later).
The reason I had this
mount /dev/sda14 /0/sa14
in /etc/boot.local was that I had a lot of other lines in there as well so it was a matter of convenience. I know how to edit fstab or how to use Yast Partitioner to have IT edit fstab. It’s this Yast bit that had me doing flips the last couple of times together with Dolphin. At a given point in trying to get Yast to mount the partition I now get
Mounting /dev/sda14 at /0/sa14
Device not found. sid 77
Continue despite the error?
Continue - Abort
However at this point in time Yast has already mounted /dev/sda14 and kdf shows it mounted. When I click Continue it gets entered into fstab but Dolphin still cannot open on it because for some reason Dolphin is getting to be so useless that it needs to be relaunched just about every time something gets mounted or unmounted. Anyway, I’ve got what I want, I could edit fstab from
/dev/sda14 /0/sa14 ext4 data=ordered 0 0
to
/dev/sda14 /0/sa14 ext4 users, data=ordered 0 0
but it’s not required now.
All the other methods involving systemd are too complicated as far as I’m concerned, not wanting to get any deeper into the systemd topic at all.
As far as ~/.profile goes it DOES execute other commands so I’m back to the original question: why does it not execute mount if the user is listed in sudoers for urestricted /bin/mount or umount? Does splashma5 ignore something as central as sudoers?
Everything is about systemd now. Your command entry in boot.local fails probably because the targets that needs to manage the device/file system is not yet running so it does not find the device that you’re trying to mount. Now since you mentioned about Dolphin, dolphin can mount disk as a normal user and afaik dolphin is using udisksctl.
udisksctl mount -b /dev/sda1
To unmount just replace mount with unmount.
udisksctl unmount -b /dev/sda1
To find more info
udisksctl --help
or try the man page.
man udisksctl
About the sudo part, I can’t say anything about it since i don’t usually use that utility, sorry old habits
Everything is about systemd now. Your command entry in boot.local fails probably because the targets that needs to manage the device/file system is not yet running so it does not find the device that you’re trying to mount. Now since you mentioned about Dolphin, dolphin can mount disk as a normal user and afaik dolphin is using udisksctl.
Suse-13.2 still uses the boot.local file and the command there works, in TW it just isn't there anymore, it doesn't fail. I tried this udisksctl but it doesn't let me set the mountpoint which just doesn't cut it.
About the sudo part, I can't say anything about it since i don't usually use that utility, sorry old habits
No sweat, thanks for he input. Sudoers empower common mortals for the use of root authority. The problem (I think) is that Splashma like all KDE before simply ignores it.
I don’t think I have but it’s really not a problem. Boot.local is toast and !/.profile cannot do it so for now I’ll just edit fstab. I also have bash scripts that mount/unmount things all over the place to predefined dedicated mountpoints on a click but /dev/sda14 is such a general data partition that I was happy with it being mounted right off the bat for the entire session. Actually the root problem wasn’t that it cannot be mounted by boot.local but that boot.local is gone, period. I’ll just use ~/.profile for what it CAN do and my clickable scripts for anything else.
Yes, but I already showed you how to create a custom systemd service (based on the rc-local.service with boot.local). Point is at one of your mount scripts, and it should achieve the same operation as before.