Score:1

How can I prevent auto-mount of 2nd internal drive? (Ubuntu-MATE 20.04.3)

ua flag

When I log in to my main Ubuntu-MATE 20.04.3 (nvme0) OS, my secondary OS install (/dev/sda) is somehow already auto-mounted on the desktop.

I'd like it not to be.

/dev/sda is an internal SSD on which I also have a bootable Ubuntu-MATE 20.04.3 installation.

In my top panel, I've placed the "Disk Mounter" applet, (put there by right-clicking on the top panel and choosing "Add to Panel." Disk Mounter is one of the many applets that users can put in the panel).

Via Disk Mounter, I have a disk-icon in the top panel that I can click on to mount another internal SSD that is for storage only.

Normally I should also have a second, identical-looking disk-icon there right beside it to click on that mounts the /dev/sda SSD.

In fact, I do have that second disk-icon for /dev/sda, but for some reason it's oversized -- larger (in fact, it's a different icon) than the one beside it, and it has the small lime-green triangle lit up below it, indicating that the /dev/sdadrive is already mounted (until I unmount it).

This is on a desktop workstation running (as indicated above) Ubuntu-MATE 20.04.3, kernel 5.4.0-96-generic.

Here is my /etc/fstab file:

(UUID 07041... is the main OS's ext4 partition, and UUID 2BD2... is the main OS's EFI partition)

  1 # /etc/fstab: static file system information.
  2 #
  3 # Use 'blkid' to print the universally unique identifier for a
  4 # device; this may be used with UUID= as a more robust way to name devices
  5 # that works even if disks are added and removed. See fstab(5).
  6 #
  7 # <file system>  <mount point>  <type>  <options>       <dump>  <pass>
  8 UUID=07041e0f-1cde-4caf-9b1d-86851e9601ed   /   ext4    errors=remount-ro   0   1
  9 /swapfile                                 none            swap    sw     0   0
 10 UUID=2BD2-4199   /boot/efi    vfat     defaults      0       1

                               

And here is the output of:

--> lsblk -e 7 -o name,fstype,size,fsused,label,partlabel,mountpoint,uuid,partuuid                                  pts/2  Tuesday  2022-01-25  14:29:20 
NAME        FSTYPE   SIZE FSUSED LABEL         PARTLABEL                  MOUNTPOINT UUID                                 PARTUUID
sda                894.3G                                                                                                 
├─sda1      vfat   550.3M        SSD_ESP       ssd_EFI-system-partition              6DE5-0FF8                            684141f2-20c3-41be-b2c4-7058d9488896
└─sda2      ext4   893.7G        20.04.3-ssd   UbuntuMATE-20.04.3                    21697ef7-83e3-4414-a859-91841f61dce8 7cc6f822-eb23-4829-9039-6d09e6e0ca55
sdb                894.3G                                                                                                 
└─sdb1      ext4   894.3G        WeirdBeard    WeirdBeard                            70e15e24-a75c-4115-9c83-29cb585676f6 5ab70820-78e7-466e-9c0f-101054d5df9b
nvme0n1            931.5G                                                                                                 
├─nvme0n1p1 vfat     402M   9.7M NVME0_ESP     nvme0_EFI-system-partition /boot/efi  2BD2-4199                            337ce8d2-65a0-4051-8c12-55cc22666e7e
└─nvme0n1p2 ext4   931.1G    40G 20.04.3-nvme0 UbuntuMATE-20.04.3         /          07041e0f-1cde-4caf-9b1d-86851e9601ed 0657b873-53c2-4a40-9e60-3b26c891fd1b
nvme1n1            931.5G                                                                                                 
├─nvme1n1p1 vfat     402M        NVME1_ESP     nvme1_EFI-system-partition            E23B-29C2                            90af4214-eca8-4265-8e5f-9c2e3301bba9
└─nvme1n1p2 ext4   931.1G        EMPTY-nvme1   The-next-LTS-UbuntuMATE               a3cb2757-686f-4c5c-92ca-a43b3a223207 77706804-715d-4276-9824-a184ed00df4f

(sdb1 -- "WeirdBeard" -- is the storage drive; nvme1 is empty at the moment. They can both be ignored.)

(I tried the answer posted here (from 2014) -- it prevented the auto-mount, but this only made it so I couldn't mount /dev/sda at all.)

One problem that I'm not sure what to do about is that the /dev/sda drive, after a few minutes, reverts (on its own) to being mounted at /run/timeshift/backup (that is, if I don't leave it mounted on the desktop).

sudo timeshift --check shows:

/dev/sda2 is mounted at: /run/timeshift/backup, options: rw,relatime,stripe=8191

So: sda2 is always either

(a) mounted upon login at /media/<myusername>/20.04.3-ssd <-- (the label I gave this partition) until I un-mount it;

(b) mounted at /run/timeshift/backup; (during which time its icon does not appear in the top panel) or

(c) not mounted.

My question: How can I get the /dev/sda drive to NOT automount at login (but TO mount when I click its icon in the panel), and how can I get the top-panel icon uniform with, and same size as, the other disk-icon there?

in flag
To have a partition *not* mount at startup, you’ll want to use `noauto` in the options section of `fstab`. This will allow you to mount the partition when you request it. As for icon sizes, you’ll want to file a bug with the development team of the applet
nobody avatar
gh flag
Maybe i miss something but no filesystem from /dev/sda is mounted in my opinion.
Melvin Q. Watchpocket avatar
ua flag
@matigo Easier said than done. I added this line to fstab & on reboot, the drive was not mounted and the disk icon disappeared from the panel: ```UUID=21697ef7-83e3-4414-a859-91841f61dce8 /media/rj/ssd ext4 noauto,defaults,umask=007,uid=1000,gid=1000 0 2```
Organic Marble avatar
us flag
Did disabling the mount from `fstab` cause problems with `timeshift`?
Melvin Q. Watchpocket avatar
ua flag
No, it was not enabled there in the first place. I momentarily enabled it to see what it would do (THAT caused problems), then disabled it. Soemthing is up with timeshift not releasing its target from /run/timeshift/backup: https://github.com/teejee2008/timeshift/issues/653
Melvin Q. Watchpocket avatar
ua flag
I now believe that the problem I'm having with this comes down to a bug in Timeshift, which doesn't seem to want to let go of its target after doing a backup, as discussed here: https://github.com/teejee2008/timeshift/issues/653
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.