Yes, this is a question about debian, but I have searched extensively for the solution to this problem on the internet.
There are a (very) few hits about this kind of a problem, but none with an answer. Most simply suggest fstab, but that does not work, is overridden somehow.
User objections to this behaviour turn up in Ubuntu questiions, debian questions, AV Linux questions, among maybe a couple others, without arriving at the solution.
So, I decided to ask here, where we have better support. (Obviously, since openSUSE does not do this, someone here must also know the answer.)openSUSE devs are smarter?
I have a multi-boot system. Besides openSUSE, I have AV Linux (debian-based) for music production, and in the future I want more systems, such as I am right now preparing to install 15 for testing and QA.
The problem? When I boot into AV Linux, it insists on mounting ALL partitions on ALL installed drives!
This cannot be stopped in fstab, it is obviously being overridden.
I cannot find any udev .unit files that are forcing this, in etc (highest priority), run (next highest), nor in /usr/lib.
Here is what I tried in fstab (comments and commented out should show you what has failed). I have changed names and paths in this to protect my true paths:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# SWAP
UUID=47dff67a-48d7-46a1-84fa-adacbxxxxxxx none swap sw 0 0
# /
UUID=3e0086c8-57d4-401c-b7dd-d93bcxxxxxxx / ext4 noatime,errors=remount-ro 0 1
# /home
UUID=e865fa1f-070a-4253-8613-89844xxxxxxx /home ext4 noatime 0 2
# THIS FAILED TO PREVENT MOUNTING AT BOOT
# UUID=faa296a1-d1d6-4739-8022-14a7fxxxxxxx /media/the_label_name_of_my_openSUSE_system_partition ext4 noauto,ro 0 2
# UUID=80fc8014-f1cc-48df-b57b-782b5xxxxxxx /media/the_label_name_of_my_openSUSE_label_partition ext4 noauto,ro 0 2
# THIS ALSO FAILED TO PREVENT MOUNTING AT BOOT
# LABEL=the_label_name_of_my_openSUSE_system_partition /media/the_label_name_of_my_openSUSE_system_partition ext4 noauto,ro 0 2
# LABEL=the_label_name_of_my_openSUSE_label_partition /media/the_label_name_of_my_openSUSE_label_partition ext4 noauto,ro 0 2
#THIS FAILED AS WELL, ALSO FAILED TO MOVE THE MOUNT POINT TO THE DESIRED PATH
# LABEL=my_shared_data /run/media/my_username/my_shared_data ext4 noauto 0 2
#THIS ALSO FAILED TO MOVE IT TO MY DESIRED MOUNT PATH
# LABEL=DATA /run/media/my_username/my_shared_data ext4 default 0 2
#YET, THIS SUCCEEDED IN MOUNTING IT AS I DESIRED
LABEL=DATA /run/media/my_username/my_shared_data ext4 noatime 0 2
#THESE ALSO FAILED TO PREVENT MOUNTING OF THE OPENSUSE SYSTEM AND HOME PARTITIONS
# /dev/sdXN /media/DIRECTORY_NAME ext4 noauto,ro 0 2
# /dev/sdXN /media/DIRECTORY_NAME ext4 noauto,ro 0
I have not found the answer, yet, as I said.
In the meantime, I have created this workaround, a script I named “fixmount” in /bin, which I run from a root console as soon as I log in:
#!/bin/sh
# Tested with this, first, but, No need to unmount all
# umount -a
umount /media/the_label_name_of_my_openSUSE_system_partition
umount /media/the_label_name_of_my_openSUSE_label_partition
umount /media/boot
Of course, this means I have to update the script any time I add new partitions to the drive, such as those for 15. Also, it requires the step of dropping to a root console to run the script each time I boot into AV Linux, which is a minor problem, but still undesired if it can be avoided.
This brings up a couple possible approaches.
- Does anybody here know where this is being controlled, and how to fix it? or;
- Does anyone know how to write the udev .unit file I can put in /etc to stop this behaviour?
I am trying to decipher the instructions for writing the necessary udev rules, if that is the route I need to go, but the support information is somewhat vague and a bit confusing to decipher.