Inserting and removing
When an external USB drive is inserted, it is automatically mounted, i.e. it becomes visible in the file manager and it appears as a subdirectory in /media/username/.
Before removing it, click on the red symbol next to it so that Trisquel stops any read or write operation to it.
Avoid mounting a device at insertion
If you need to insert a USB drive but without mounting automatically (e.g. to examine it with ddrescue after it had problems when previously used):
1. In a terminal, run
$ sudo systemctl stop udisks2.service
2. Insert the device
3. In a terminal, run
$ sudo systemctl start udisks2.service
Stopping the udsisks2.service prevents automatically mounting devices but also has side effects (e.g. gnome-disks won't work properly) hence why the above advice is restarting it after the USB drive was inserted.
Avoiding mounting a specific device at every insertion
To always prevent a specific device from being mounted automatically at insertion, a possibility is to add an entry for it in /etc/fstab with the option "noauto". For example:
UUID=2023-05-03-14-46-00 none mac noauto 0 0
Obtain the UUID with the blkid command.
Revisions
05/03/2023 - 13:30
01/13/2024 - 16:41