Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
0 answers
24 views
Ubuntu keeps remounting /dev/shm with different mounting options periodically
I have a Ubuntu 24.04.2 system where `/dev/shm` gets remounted (I assume) every now and then (roughly each 10 seconds), but I have no idea why. There's no mention of that mounting point in `/etc/fstab` and even if I would add an entry in there it would still be remounted with other options than the...
I have a Ubuntu 24.04.2 system where /dev/shm gets remounted (I assume) every now and then (roughly each 10 seconds), but I have no idea why. There's no mention of that mounting point in /etc/fstab and even if I would add an entry in there it would still be remounted with other options than the one I expect. Here's the output from /proc/self/mountinfo (see final column):
$ while true; do column -t -N mountID,parentID,"major:minor",rootMount,mountPoint,mountOpts,optionalFields,optFieldSeparator,fsType,mountSource,superOpts /proc/self/mountinfo | grep -E 'mountID|shm'; sleep 1; done
mountID  parentID  major:minor  rootMount  mountPoint  mountOpts        optionalFields  optFieldSeparator  fsType  mountSource  superOpts
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
32       26        0:27         /          /dev/shm    rw,nosuid,nodev  shared:4        -                  tmpfs   tmpfs        rw,size=4011076k,nr_inodes=1002769,inode64
I've tried checking dmesg -wH, using strace (though I do not remember the parameters anymore) on pid 1 (not sure if this is sane or not - ChatGPT suggestion), checking journalctl -k -f and even finding all files on the system and executing grep -IHn '/dev/shm' without finding anything useful. There was a couple of mentions of apparmor, although I disabled that service and it still got remounted. I compared this to another system running the same version of Ubuntu (although with a slightly different version of the kernel - 6.8.0-63 vs 6.8.0-71) and the issue do not happen there. How do I troubleshoot this?
mrP (81 rep)
Aug 6, 2025, 07:29 PM • Last activity: Aug 7, 2025, 07:09 AM
2 votes
1 answers
4169 views
Finding correct information to update mtab and fstab?
Is there an automated way to update my `mtab` and `fstab`? Or a command I can run so that I can copy the output into these files? I'm just nervous about tampering with these files because I know they are critical. I previously had a `md0` and `md1` array but they "disappeared." Now my `mtab` and `fs...
Is there an automated way to update my mtab and fstab? Or a command I can run so that I can copy the output into these files? I'm just nervous about tampering with these files because I know they are critical. I previously had a md0 and md1 array but they "disappeared." Now my mtab and fstab is stale and it is giving me problems trying to run this automatic RAID utility, raider . ### fstab # /etc/fstab: static file system information. # # proc /proc proc defaults 0 0 /dev/md0 / ext3 errors=remount-ro 0 1 /dev/md1 none swap sw 0 0 /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0 ### mtab /dev/md0 / ext3 rw,errors=remount-ro 0 0 tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0 proc /proc proc rw,noexec,nosuid,nodev 0 0 sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0 udev /dev tmpfs rw,mode=0755 0 0 tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0 devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0 ### /proc/mounts rootfs / rootfs rw 0 0 none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 none /proc proc rw,nosuid,nodev,noexec,relatime 0 0 none /dev devtmpfs rw,relatime,size=1547340k,nr_inodes=215947,mode=755 0 0 none /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 /dev/sda1 / ext3 rw,relatime,errors=remount-ro,data=ordered 0 0 tmpfs /lib/init/rw tmpfs rw,nosuid,relatime,mode=755 0 0 tmpfs /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0 ## Here's what I think based on observation ### My proposed update to fstab (should it be sda or sda1?) # /etc/fstab: static file system information. # # proc /proc proc defaults 0 0 /dev/sda1 / ext3 errors=remount-ro 0 1 /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0 ### My proposed update to mtab (should it be sda or sda1?) /dev/sda1 / ext3 rw,errors=remount-ro 0 0 tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0 proc /proc proc rw,noexec,nosuid,nodev 0 0 sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0 udev /dev tmpfs rw,mode=0755 0 0 tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0 devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
jaynp (663 rep)
Jul 27, 2013, 05:18 AM • Last activity: Aug 3, 2025, 01:09 PM
1 votes
3 answers
98 views
Unable to mount NFS share from fstab, cmd line works fine
I have an NFS server installed on my PC running KDE Neon (24.04). I installed it so that I could share a folder to a Windows 11 tablet. It worked well, and I was able to create a persistent mount on the tablet. I have removed Windows from the tablet in favor of KDE Neon. Now I can mount the share fr...
I have an NFS server installed on my PC running KDE Neon (24.04). I installed it so that I could share a folder to a Windows 11 tablet. It worked well, and I was able to create a persistent mount on the tablet. I have removed Windows from the tablet in favor of KDE Neon. Now I can mount the share from the cmd line without a problem, but I am not able to get it to mount from fstab. Can anyone suggest why one works and the other doesn't? CMD mount... sudo mount -t nfs 10.0.0.239:/srv/nfs/share /media/media0 In my fstab I have this... /media/media0 /srv/nfs4/media/media0 none bind 0 0 In my exports file I have... /srv/nfs4 10.0.0.0/255.255.255.0(rw,sync,fsid=0,crossmnt,no_subtree_check) Can anyone help me figure out why I the mount works from the command line, but not from fstab? Thanks, Rick Thanks for the suggestions everyone. Unfortunately I have yet to find a complete solution. I've made the suggested changes to my /etc/exports file and the the /etc/fstab file recommended in the last reply. I am still not able to mount the shares at boot. I can mount them manually, and I can mount them with $ sudo mount -a. I thought the issue was timing and my impatience but after a reboot and waiting several minutes the share didn't mount unless I issued sudo mount -a. What am I missing here? Rick Ok, the instructions say to reply to a post I need to edit my post so, here goes... Adding _netdev to the NFS mount commands in my fstab did not work. In fact adding that caused the network to not start, but had no effect on nfs-server.service, at least not that I could see. Thanks, Rick
Rick Knight (19 rep)
Jul 11, 2025, 06:40 PM • Last activity: Jul 25, 2025, 04:20 AM
2 votes
1 answers
2500 views
USB Drive sometimes changes the Drive name
I have two USB Drives. I created partitions and formatted them to ext4. Running `fdisk -l` shows that I have /dev/sda1 and /dev/sdb1 Device Boot Start End Sectors Size Id Type /dev/sda1 /dev/sdb1 Then I mounted both on boot by running `sudo nano /etc/fstab` I use Samba to access them from the differ...
I have two USB Drives. I created partitions and formatted them to ext4. Running fdisk -l shows that I have /dev/sda1 and /dev/sdb1 Device Boot Start End Sectors Size Id Type /dev/sda1 /dev/sdb1 Then I mounted both on boot by running sudo nano /etc/fstab I use Samba to access them from the different computer and most of the time it is working fine, but sometime I can't access the files via samba and running fdisk -l shows the the device for my drives changed to for example /dev/sdc1. Sometimes it changes only per one drive and sometimes it changes both. I have no idea why this is happening. Any help is much appreciated.
Greg (123 rep)
May 2, 2022, 07:35 AM • Last activity: Jul 22, 2025, 02:06 PM
5 votes
1 answers
2833 views
Use fstab to mount luks encrypted drive to subfolder within home
Fresh install of Lubuntu 20.04 on system with Windows 10 and Lubuntu installed on 256GB NVME drive to dual boot. Boot drive is /dev/nvme0n1p2 Home folder is therefore /dev/nvme0n1p2/home/username I have a 1TB HDD with two partitions: /dev/sda1 736GB encrypted ext4/LUKS /dev/sda2 195GB ntfs For conte...
Fresh install of Lubuntu 20.04 on system with Windows 10 and Lubuntu installed on 256GB NVME drive to dual boot. Boot drive is /dev/nvme0n1p2 Home folder is therefore /dev/nvme0n1p2/home/username I have a 1TB HDD with two partitions: /dev/sda1 736GB encrypted ext4/LUKS /dev/sda2 195GB ntfs For context, the purpose of the ntfs partition is so that I can easily share files between my Lubuntu environment and Windows 10. My objective is to be able to: 1) Boot into Lubuntu 2) Log in 3) Open File Manager and navigate to /home/Filestore 4) Be prompted to enter password I have read this guide: https://www.linuxbabe.com/desktop-linux/how-to-automount-file-systems-on-linux And I can successfully automount the ntfs drive to /home/WindowsShare But I cannot mount the LUKS filesystem to /home/Filestore Using 'ext4' as the filesystem gives me this error message:
mount: /home/luke/Filestore: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error.
The entry for the partition in blkid is:
/dev/sda1: UUID="redacted" TYPE="crypto_LUKS" PARTUUID="redacted"
So I therefore tried using "crypto_LUKS" as the filesystem in fstab and got this:
mount: /home/luke/Filestore: unknown filesystem type 'crypto_LUKS'.
I have looked for guides on automounting encrypted filesystems and found numerous. Here is one: https://blog.tinned-software.net/automount-a-luks-encrypted-volume-on-system-start/ Everything I have found involves using a shared key to auto-decrypt the filesystem on boot. I don't want to do this as I don't have an encrypted area on my boot drive in order to store the key. Is my stated aim possible?
Luke Richards (81 rep)
Jan 17, 2021, 10:45 AM • Last activity: Jul 20, 2025, 02:03 AM
1 votes
2 answers
6551 views
Not mounting after restart?
I am mounting a drive via SSH, and then editing the fstab to reflect the changes, however after I reboot, the drive doesnt mount? I dont understand what I'm doing wrong? This is my fstab and its /md0 that isnt mounting after reboot, am I missing something? # /dev/md4 / ext3 errors=remount-ro,usrjquo...
I am mounting a drive via SSH, and then editing the fstab to reflect the changes, however after I reboot, the drive doesnt mount? I dont understand what I'm doing wrong? This is my fstab and its /md0 that isnt mounting after reboot, am I missing something? # /dev/md4 / ext3 errors=remount-ro,usrjquota=quota.user,jqfmt=vfsv0 0 1 /dev/md0 /BACKUP ext3 defaults 0 1 /dev/md1 /boot ext3 errors=remount-ro 0 1 /dev/md2 /var/tmp ext3 usrjquota=quota.user,jqfmt=vfsv0 1 2 /dev/sda3 swap swap defaults 0 0 /dev/sdb3 swap swap defaults 0 0 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts defaults 0 0
Gixxy22 (123 rep)
Mar 3, 2013, 06:19 PM • Last activity: Jul 9, 2025, 05:04 PM
1 votes
1 answers
4563 views
Disk mount failed with result 'dependency'
I mount drive using command `mount` and modify `fstab` file (so disk should be visible after restart). Unfortunately, after system reboot, mount isn't visible in the system `lsblk -a` says, disk is configured but without mounting point. ``` NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 250G 0 di...
I mount drive using command mount and modify fstab file (so disk should be visible after restart). Unfortunately, after system reboot, mount isn't visible in the system lsblk -a says, disk is configured but without mounting point.
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  250G  0 disk 
vda    254:0    0  100G  0 disk 
├─vda1 254:1    0  100G  0 part /
└─vda2 254:2    0    2M  0 part
Here is a log from journalctl:
May 15 09:23:34 srv  systemd: dev-disk-by\x2duuid-XXX\XXX\XXXX\ZZZZZ\YYYY.device: Job dev-disk-by\x2duuid-XXX\XXX\XXXX\ZZZZZ\YYYY.device/start timed >
May 15 09:23:34 srv  systemd: Timed out waiting for device /dev/disk/by-uuid/XXXX-XXXX-XXX-XXX-XXXXXXX.
May 15 09:23:34 srv  systemd: Dependency failed for Mount DO Volume dev-volume.
May 15 09:23:34 srv  systemd: mnt-dev_volume.mount: Job mnt-dev_volume.mount/start failed with result 'dependency'.
How to fix it and mount disk automatically?
Mateusz Przybylek (111 rep)
May 15, 2023, 02:27 PM • Last activity: Jul 7, 2025, 08:09 AM
1 votes
1 answers
176 views
How to avoid "cannot find in /etc/fstab" problem
I have just opened my `GParted` application and did a format for `/dev/sdc1` to `exfat` type. But while trying to mount the drive after formatting is completed I am getting the following error. It is external hard disk connected through USB port to the Linux system. user-1@inc:~$ sudo mount /dev/sdc...
I have just opened my GParted application and did a format for /dev/sdc1 to exfat type. But while trying to mount the drive after formatting is completed I am getting the following error. It is external hard disk connected through USB port to the Linux system. user-1@inc:~$ sudo mount /dev/sdc1 mount: /dev/sdc1: can't find in /etc/fstab.
Dev Anand Sadasivam (131 rep)
Jun 18, 2025, 07:08 PM • Last activity: Jun 19, 2025, 01:22 PM
1 votes
1 answers
9594 views
NAS share not mounting on linux boot through /etc/fstab
I have a NAS share for my Linux server which I mount using the following command. mount -t nfs 172.16.2.115:/shares/OwnCloud /eStore/ now to automate this I added the following line in `/etc/fstab` 172.16.2.115:/shares/OwnCloud /eStore nfs rw,addr=172.16.2.115,auto 0 0 but it is not working and I am...
I have a NAS share for my Linux server which I mount using the following command. mount -t nfs 172.16.2.115:/shares/OwnCloud /eStore/ now to automate this I added the following line in /etc/fstab 172.16.2.115:/shares/OwnCloud /eStore nfs rw,addr=172.16.2.115,auto 0 0 but it is not working and I am not getting any error also. If I execute mount -a then mount is able to mount the NAS based on /etc/fstab configuration. I would like it to mount at boot.
Suyash Jain (191 rep)
May 6, 2016, 10:13 AM • Last activity: Jun 13, 2025, 05:06 PM
1 votes
2 answers
2221 views
Automounting LUKS encrypted external usb when device inserted without error or hanging on boot if not present
## Scenario Have an external device, encrypted with LUKS, automatically mount when inserted and not cause any issues if not present on boot. > Most questions on this topic refer to mounting on boot - this is NOT what I am trying to do Additionally, the mountpoint should be protected from accidental...
## Scenario Have an external device, encrypted with LUKS, automatically mount when inserted and not cause any issues if not present on boot. > Most questions on this topic refer to mounting on boot - this is NOT what I am trying to do Additionally, the mountpoint should be protected from accidental writes when the usb device is not present and I can do this with chattr +i ## Problem 1. When the external device is NOT mounted, any attempt to access the mountpoint will hang until timeout - this can cause system instability. 1. When the device is inserted, the passphrase is prompted for and device unlocked, but not mounted. I then have to mount the device manually with mount /mnt/backup or mount /dev/mapper/fit which appears to correctly use the fstab settings. ## Configuration
# /etc/crypttab
fit   UUID=xxxxxxxx-xxxxx-xxxxxxxx-xxxxxxxxxx none luks,noauto
# /etc/fstab
/dev/mapper/fit    /mnt/backup   ext4    noatime,user,noauto,x-systemd.automount,x-systemd.device-timeout=5ms,x-systemd.mount-timeout=100ms    0   0
> I happen to have a Samsung Fit usb flash drive if anyone was wondering about the name ## Accessing the mountpoint when the external device is NOT present
# Accessing the mountpoint when the drive is NOT plugged in
andy@pop-os:mnt$ ll
ls: cannot access 'backup': No such device
total 0
d????????? ? ? ? ?            ? backup/

andy@pop-os:mnt$ mountpoint /mnt/backup
/mnt/backup is a mountpoint
# journalctl
Jan 21 16:33:34 pop-os systemd: mnt-backup.automount: Got automount request for /mnt/backup, triggered by 5192 (ls)
Jan 21 16:33:34 pop-os systemd: dev-mapper-fit.device: Job dev-mapper-fit.device/start timed out.
Jan 21 16:33:34 pop-os systemd: Timed out waiting for device /dev/mapper/fit.
Jan 21 16:33:34 pop-os systemd: Dependency failed for /mnt/backup.
Jan 21 16:33:34 pop-os systemd: mnt-backup.mount: Job mnt-backup.mount/start failed with result 'dependency'.
Jan 21 16:33:34 pop-os systemd: dev-mapper-fit.device: Job dev-mapper-fit.device/start failed with result 'timeout'.
### Normal Removal Processes
# Absolute path is required if not using sudo (user was set in fstab)
andy@pop-os:mnt$ umount /mnt/backup

andy@pop-os:mnt$ sudo cryptsetup close fit

andy@pop-os:mnt$ sudo eject /dev/sdx
### Temporary Resolution I can unmount the mountpoint (even though no device is mounted anyway) to temporarly fix this issue but it will come back after a system reboot or after mounting/ummounting the device again.
andy@pop-os:mnt$ sudo umount backup

andy@pop-os:mnt$ ll
total 4.0K
drwxr-xr-x 2 root root 4.0K Jan 19 10:16 backup/

andy@pop-os:mnt$ lsattr
----i---------e------- ./backup

andy@pop-os:~$ mountpoint /mnt/backup
/mnt/backup is not a mountpoint
If I use noauto and don't include x-systemd.automount then I avoid the problem of the directory being a mountpoint on boot when no device is present, but I also don't get automounting - although the device still unlocks. ## Mounting the external device Passphrase is prompted for and device unlocked
andy@pop-os:mnt$ lsblk -f
NAME            FSTYPE      FSVER    LABEL     UUID                                   FSAVAIL FSUSE% MOUNTPOINTS
sdb             crypto_LUKS 2                  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx                  
└─fit           ext4        1.0                yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy                  

andy@pop-os:mnt$ ll backup/
ls: cannot access 'backup/': No such device
> Note that MOUNTPOINTS is empty
# journalctl -f
Jan 21 17:17:26 pop-os kernel: usb 6-2: new SuperSpeed USB device number 2 using xhci_hcd
Jan 21 17:17:26 pop-os kernel: usb 6-2: New USB device found, idVendor=090c, idProduct=1000, bcdDevice=11.00
Jan 21 17:17:26 pop-os kernel: usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 21 17:17:26 pop-os kernel: usb 6-2: Product: Flash Drive FIT
Jan 21 17:17:26 pop-os kernel: usb 6-2: Manufacturer: Samsung
Jan 21 17:17:26 pop-os kernel: usb 6-2: SerialNumber: 0123456789123
Jan 21 17:17:26 pop-os kernel: usb-storage 6-2:1.0: USB Mass Storage device detected
Jan 21 17:17:26 pop-os kernel: scsi host7: usb-storage 6-2:1.0
Jan 21 17:17:26 pop-os mtp-probe: checking bus 6, device 2: "/sys/devices/pci0000:00/0000:00:08.1/0000:0b:00.4/usb6/6-2"
Jan 21 17:17:26 pop-os mtp-probe: bus: 6, device: 2 was not an MTP device
Jan 21 17:17:26 pop-os mtp-probe: checking bus 6, device 2: "/sys/devices/pci0000:00/0000:00:08.1/0000:0b:00.4/usb6/6-2"
Jan 21 17:17:26 pop-os mtp-probe: bus: 6, device: 2 was not an MTP device
Jan 21 17:17:29 pop-os kernel: scsi 7:0:0:0: Direct-Access     Samsung  Flash Drive FIT  1100 PQ: 0 ANSI: 6
Jan 21 17:17:29 pop-os kernel: sd 7:0:0:0: Attached scsi generic sg1 type 0
Jan 21 17:17:29 pop-os kernel: sd 7:0:0:0: [sdb] 501253132 512-byte logical blocks: (257 GB/239 GiB)
Jan 21 17:17:29 pop-os kernel: sd 7:0:0:0: [sdb] Write Protect is off
Jan 21 17:17:29 pop-os kernel: sd 7:0:0:0: [sdb] Mode Sense: 43 00 00 00
Jan 21 17:17:29 pop-os kernel: sd 7:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesnt support DPO or FUA
Jan 21 17:17:29 pop-os kernel:  sdb: sdb1
Jan 21 17:17:29 pop-os kernel: sd 7:0:0:0: [sdb] Attached SCSI removable disk
Jan 21 17:17:41 pop-os systemd: Starting Cryptography Setup for fit...
Jan 21 17:17:41 pop-os systemd-cryptsetup: Volume fit already active.
Jan 21 17:17:41 pop-os systemd: Finished Cryptography Setup for fit.
Jan 21 17:17:41 pop-os systemd: Reached target Block Device Preparation for /dev/mapper/fit.
Jan 21 17:17:41 pop-os gnome-shell: Unable to mount volume 257 GB Encrypted: Gio.IOErrorEnum: Operation was cancelled
Jan 21 17:17:41 pop-os udisksd: Unlocked device /dev/sdb1 as /dev/dm-4
> Note that the second to last line "Operation was cancelled" is happening just before udisksd reports "Unlock device..." I've tried this with two different devices, one with whole disk block encryption and the other with an encrypted partition, it makes no difference. Sometimes moments later...
andy@pop-os:mnt$ mount /mnt/backup
mount: /mnt/backup: /dev/mapper/fit already mounted on /mnt/backup.
... but usually this just mounts the device as expected. ## Other Issues - If I do not set [x-systemd.device-timeout](https://www.freedesktop.org/software/systemd/man/systemd.mount.html#x-systemd.automount) to something much less than the default 90s then my system will slowly become unresponsive and then crash. I thought systemd might be timing out waiting for me to type in my passphrase but longer timeouts didn't seem to help - I copied the configuration from an old Ubuntu 22.04 system to Pop!_OS 22.04, I would sometimes see the question marks while listing the directory in the unmounted state but the auto-mount worked perfectly. On the old system I didn't set the immutable attribute on the mountpoint. ## Related - [mount-error-when-automounting-a-luks-encrypted-usb-flashdrive](https://unix.stackexchange.com/questions/281349/mount-error-when-automounting-a-luks-encrypted-usb-flashdrive) - different errors and method of mounting - [Automounting USB sticks on Debian](https://unix.stackexchange.com/a/346830/458741) - uses a slightly different method with nofail instead of noauto but unfortunately doesn't answer my question - I can get more information with systemctl show mnt-backup.mount but this hasn't helped me - The man page for [fstab](https://wiki.archlinux.org/title/fstab) says what to do for external devices but these settings don't auto mount the device and do cause the boot process to hang --- So, why does accessing the mountpoint try to access the device after it has been unmounted resulting in ?????????, and why does it not automount correctly when the device is inserted? Between the old fstab and new systemd I can't seem to find the magic variables. Would also be useful to know why the system crashes if I don't set the device timeout? --- ### Update August 2023 [mount-vs-automount-systemd-units...](https://unix.stackexchange.com/questions/570958/mount-vs-automount-systemd-units-which-one-to-use-for-what) explains the ????? as the .automount unit attempts to open the mountpoint on access. I have still been unable to achieve the behaviour I want though, and wonder if it because without configuring anything udev is used and then the only problem is being able to customise the directory used as a mountpoint. As soon as an fstab entry is made, /run/systemd/generator systemd units are made and the behaviour changes. There also seems to be a problem on my new system with plymouth as this spits out errors while systemd uses 100% CPU and hangs the system. This doesn't happen on my old laptop.
a2k42 (131 rep)
Jan 22, 2023, 12:21 AM • Last activity: Jun 10, 2025, 01:06 PM
1 votes
0 answers
16 views
Ocfs2: link between cluster and device?
I am having 2 servers (Debian 12) that use a storage-disk (SD). Both see this SD as a device via fdisk. I have no details about the storage-device itself or the connection type - for me it is just a disk that is connected to 2 servers. To use the disk simultaneously I need to use a cluster filesyste...
I am having 2 servers (Debian 12) that use a storage-disk (SD). Both see this SD as a device via fdisk. I have no details about the storage-device itself or the connection type - for me it is just a disk that is connected to 2 servers. To use the disk simultaneously I need to use a cluster filesystem. That is not provided by the storage-device itself. I am running Ocfs2 on both servers to get that. cluster: name = myshare heartbeat_mode = local node_count = 2 node: cluster = myshare number = 1 ip_port = 7777 ip_address = 9.9.9.101 name = S1 node: cluster = myshare number = 2 ip_port = 7777 ip_address = 9.9.9.102 name = S2 Both servers have this fstab. UUID=xxxx /myshare ocfs2 defaults 0 3 **It is working great - I can mount and use it on both servers.** Now I try to get a 2nd SD up and running for both servers. It appears as a different device with fdisk. So I am not sure how to do it - because I do not see a "logical connection" between the defined Ocfs2 cluster and the storage-device - beside the fact that is is mounted as an ocfs2 type on a server that is running an Ocfs2 node. Is that enought?? Is it enought to have anouther line in fstab with the other UUID and also the type ocfs2 to make it work (both SDs are controlled by the Ocfs2 cluster)?
chris01 (869 rep)
Jun 5, 2025, 03:28 AM
-1 votes
1 answers
59 views
Why does the position of `exec` flag in `/etc/fstab` matter?
I find it peculiar, that I could not execute binaries / scripts on my new RAMdisk (tmpfs). **1)** tmpfs /ramdisk tmpfs exec ,size=3G,noauto,sync,user,rw,x-gvfs-show,x-gvfs-name=RAM 0 0 versus **2)** tmpfs /ramdisk tmpfs size=3G,noauto,sync,user,rw,x-gvfs-show,x-gvfs-name=RAM, exec 0 0 *** **In the f...
I find it peculiar, that I could not execute binaries / scripts on my new RAMdisk (tmpfs). **1)**
tmpfs  /ramdisk  tmpfs  exec,size=3G,noauto,sync,user,rw,x-gvfs-show,x-gvfs-name=RAM  0  0
versus **2)**
tmpfs  /ramdisk  tmpfs  size=3G,noauto,sync,user,rw,x-gvfs-show,x-gvfs-name=RAM,exec  0  0
*** **In the first case**, I can't execute anything, as in the exact error message: > bash: ./a.sh: Permission denied and returned code 126 to my Bash shell. *** Created the file as follows, for completeness:
vlastimil@rog-g713pi /ramdisk $ cat a.sh
#!/bin/sh
echo A
EOF
and I tried to run it directly as follows:
chmod 755 a.sh; ./a.sh; echo $?
*** Why does the position of exec flag matter? (And is there possibly some other mystery waiting for me... :)) Thanks OS: Linux Mint 22.1 (Cinnamon), based on Ubuntu 24.04.
Vlastimil Burián (30505 rep)
May 29, 2025, 08:20 PM • Last activity: May 30, 2025, 05:46 AM
1 votes
1 answers
1976 views
/etc/fstab entries missing "defaults" option, is it implicit?
My automatically generated `/etc/fstab` file has most of it's entries like so # /dev/sda9 UUID=8de1f4d1-4620-49f0-aeaf-a499f7cb6c21 /home ext4 rw,relatime 0 2 It's missing the `defaults` option. My system works fine, but I am not sure if: 1) Default values are implicitly set, if so, why is `rw` ther...
My automatically generated /etc/fstab file has most of it's entries like so # /dev/sda9 UUID=8de1f4d1-4620-49f0-aeaf-a499f7cb6c21 /home ext4 rw,relatime 0 2 It's missing the defaults option. My system works fine, but I am not sure if: 1) Default values are implicitly set, if so, why is rw there? I can't see any notice that they are implicit in the man page. 2) My system is mis-configured and just happens to be running ok (for months) and I should insert the defaults option (maybe for async, etc). My system is Arch with Systemd, maybe that is picking up the slack.
markson edwardson (111 rep)
Aug 8, 2021, 01:26 PM • Last activity: May 27, 2025, 12:01 AM
3 votes
5 answers
1050 views
How can I automatically have the system periodically retry a failed mount from fstab?
I had an NFS share go down and backup due to power outage but the machine that mounts it in fstab just sees it goes down and doesn't try to remount it. I had to remount it manually with.. sudo systemctl daemon-reload sudo mount -a **Is there a way to have fstab automatically, periodically retry to m...
I had an NFS share go down and backup due to power outage but the machine that mounts it in fstab just sees it goes down and doesn't try to remount it. I had to remount it manually with.. sudo systemctl daemon-reload sudo mount -a **Is there a way to have fstab automatically, periodically retry to mount it.** This is my fstab entry.. mycomputer://home/myusername/share/media/ /mnt/media nfs rw,hard,intr,rsize=8192,wsize=8192,timeo=14 0 0
slowcoder (71 rep)
Mar 3, 2025, 10:06 PM • Last activity: May 25, 2025, 08:14 PM
0 votes
1 answers
2914 views
Not mounting Multiple NFS Share Directories using fstab on RHEL 7
**Hello everyone i am not able to mount multiple NFS Share Directories using fstab on RHEL 7. Check out my LAB configuration.** **I want to ask question using nfs and mounting by fstab only one nfs directory can be mount. if no how to mount multiple directory.** **LAB** **server.example.com 192.168....
**Hello everyone i am not able to mount multiple NFS Share Directories using fstab on RHEL 7. Check out my LAB configuration.** **I want to ask question using nfs and mounting by fstab only one nfs directory can be mount. if no how to mount multiple directory.** **LAB** **server.example.com 192.168.2.2/24** **client.example.com 192.168.2.1/24** On Server ---------- **nfs share folder are** /test1 /test2 **Disable firewalld and selinux is in permissive mode on server and client.** **On Server** [root@server ~]# yum install nfs-utils [root@server ~]# systemctl enable rpcbind [root@server ~]# systemctl start rpcbind [root@server ~]# systemctl start nfs-server [root@server ~]# systemctl start nfs-secure [root@server ~]# mkdir /test1 [root@server ~]# mkdir /test2 [root@server ~]# ls /test* /test1: /test2: [root@server ~]# chmod 777 /test1 [root@server ~]# chmod 777 /test2 [root@server ~]# vim /etc/exports [root@server ~]# cat /etc/exports /test1 192.168.2.1(rw,sync,no_root_squash) /test2 192.168.2.1(rw,sync,no_root_squash) **[root@server ~]# exportfs -r** [root@server ~]# exportfs -v /test1 192.168.2.1(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash) /test2 192.168.2.1(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash) [root@server ~]# systemctl stop firewalld.service [root@server ~]# systemctl disable firewalld.service [root@server ~]# sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: permissive Mode from config file: permissive **ON Client** [root@client ~]# systemctl enable rpcbind [root@client ~]# systemctl start rpcbind [root@client ~]# setenforce 0 [root@client ~]# vim /etc/sysconfig/selinux [root@client ~]# sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: permissive Mode from config file: permissive [root@client ~]# systemctl stop firewalld [root@client ~]# systemctl disble firewalld [root@client ~]# showmount -e 192.168.2.2 Export list for 192.168.2.2: /test2 192.168.2.1tes /test1 192.168.2.1 [root@client ~]# mkdir /mnt/nfstest1 [root@client ~]# mkdir /mnt/nfstest2 [root@client ~]# chmod 777 /mnt/nfstest1 [root@client ~]# chmod 777 /mnt/nfstest2 **Check fstab file** [root@client ~]# vim /etc/fstab [root@client ~]# cat /etc/fstab # # /etc/fstab # Created by anaconda on Wed Apr 26 08:01:03 2017 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # UUID=8cfced80-d77a-41a6-a7ee-9b41ebea88b2 / xfs defaults 1 1 UUID=ad9e8442-335f-478c-81af-b77e1ac88549 /boot xfs defaults 1 2 UUID=e55cb2d8-4461-4792-944c-1b76225dd13a /home xfs defaults 1 2 UUID=ffbc9edf-42ce-4d82-af5c-b2ff1cff5a68 /usr xfs defaults 1 2 UUID=556f0e53-bfa3-4639-9d47-ba1c70299393 /var xfs defaults 1 2 UUID=a855e109-f05f-4bfe-bfc9-a06f10d294f1 swap swap defaults 0 0 192.168.2.2:/test1 /mnt/nfstest1 nfs rw,sync 0 0 192.168.2.2:/test2 /mnt/nfstest2 nfs rw,sync 0 0 **[root@client ~]# mount -a** **df -h show only one nfs directory mounted /mnt/nfstest1** [root@client ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 9.8G 70M 9.7G 1% / devtmpfs 354M 0 354M 0% /dev tmpfs 363M 0 363M 0% /dev/shm tmpfs 363M 5.2M 357M 2% /run tmpfs 363M 0 363M 0% /sys/fs/cgroup /dev/sda5 9.8G 2.8G 7.0G 29% /usr /dev/sda3 9.8G 33M 9.8G 1% /home /dev/sda1 2.0G 107M 1.9G 6% /boot /dev/sda6 9.8G 3.8G 6.1G 39% /var 192.168.2.2:/test1 9.8G 71M 9.7G 1% /mnt/nfstest1 **but on mount command show both nfs directory** [root@client ~]# mount | grep nfstest* 192.168.2.2:/test1 on /mnt/nfstest1 type nfs4 (rw,relatime,sync,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.2.1,local_lock=none,addr=192.168.2.2) 192.168.2.2:/test2 on /mnt/nfstest2 type nfs4 (rw,relatime,sync,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.2.1,local_lock=none,addr=192.168.2.2) **i have reboot** *check my status again,again only one nfs share directory is mounted and i.e is /mnt/nfstest2 and /mnt/nfstest1 gone. why is this happing i have fire Right option in /etc/fstab. can some one tell me is that right.* login as: root root@192.168.2.1's password: Last login: Wed May 10 22:37:20 2017 from 192.168.2.100 [root@client ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 9.8G 70M 9.7G 1% / devtmpfs 354M 0 354M 0% /dev tmpfs 363M 0 363M 0% /dev/shm tmpfs 363M 5.2M 357M 2% /run tmpfs 363M 0 363M 0% /sys/fs/cgroup /dev/sda5 9.8G 2.8G 7.0G 29% /usr /dev/sda1 2.0G 107M 1.9G 6% /boot /dev/sda3 9.8G 33M 9.8G 1% /home /dev/sda6 9.8G 3.8G 6.1G 39% /var 192.168.2.2:/test2 9.8G 71M 9.7G 1% /mnt/nfstest2 [root@client ~]# mount | grep nfstest* 192.168.2.2:/test2 on /mnt/nfstest2 type nfs4 (rw,relatime,sync,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.2.1,local_lock=none,addr=192.168.2.2) 192.168.2.2:/test1 on /mnt/nfstest1 type nfs4 (rw,relatime,sync,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.2.1,local_lock=none,addr=192.168.2.2) [root@client ~]# cat /etc/fstab # # /etc/fstab # Created by anaconda on Wed Apr 26 08:01:03 2017 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # UUID=8cfced80-d77a-41a6-a7ee-9b41ebea88b2 / xfs defaults 1 1 UUID=ad9e8442-335f-478c-81af-b77e1ac88549 /boot xfs defaults 1 2 UUID=e55cb2d8-4461-4792-944c-1b76225dd13a /home xfs defaults 1 2 UUID=ffbc9edf-42ce-4d82-af5c-b2ff1cff5a68 /usr xfs defaults 1 2 UUID=556f0e53-bfa3-4639-9d47-ba1c70299393 /var xfs defaults 1 2 UUID=a855e109-f05f-4bfe-bfc9-a06f10d294f1 swap swap defaults 0 0 192.168.2.2:/test1 /mnt/nfstest1 nfs rw,sync 0 0 192.168.2.2:/test2 /mnt/nfstest2 nfs rw,sync 0 0 **Here multiple nfs share directory is not mounting at once . On client /etc/fstab** 192.168.2.2:/test1 /mnt/nfstest1 nfs rw,sync 0 0 192.168.2.2:/test2 /mnt/nfstest2 nfs rw,sync 0 0 **after fireing mount -a** **i am getting /mnt/nfstest1** 192.168.2.2:/test1 9.8G 71M 9.7G 1% /mnt/nfstest1 **but after restarting client i am getting vice-versa . WHY** **Can some one help me to solve this problem** **Note NFS directory are made on single / file system on server.** **And mounted on /mnt/test1 and /mnt/test2 on client.** **Thank You** **Sagar Dalvi**
Sagar Dalvi (501 rep)
May 10, 2017, 07:11 PM • Last activity: May 25, 2025, 06:03 AM
9 votes
1 answers
4434 views
How can I make my ExFAT partition unmount cleanly?
I've got Raspbian running on a Raspberry Pi 4 B. I have a USB hard disk that I'm using with it. The hard disk is a 1TB drive formatted with a single partition using ExFAT. I've got `exfat-fuse` and `exfat-utils` installed. The problem is that every time I unmount the partition, when I run `fsck` on...
I've got Raspbian running on a Raspberry Pi 4 B. I have a USB hard disk that I'm using with it. The hard disk is a 1TB drive formatted with a single partition using ExFAT. I've got exfat-fuse and exfat-utils installed. The problem is that every time I unmount the partition, when I run fsck on that partition, it gives me this warning:
WARN: volume was not unmounted cleanly.
That makes me nervous. This happens no matter how the partition is unmounted. It happens on shutdown and subsequent bootup, it happens on reboots, it happens if I just manually sudo umount /dev/sda1 and sudo mount /dev/sda1 Here's some system information:
Linux rpi4b 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux
exfat-fuse/stable,now 1.3.0-1 armhf [installed]
exfat-utils/stable,now 1.3.0-1 armhf [installed]
This is the line concerning the partition in my /etc/fstab.
UUID=BE1B-4EFA  /media/BE1B-4EFA      exfat   defaults,auto,users,rw,nofail  0       0
Why isn't my partition unmounting cleanly? How can I make sure it does?
user403386
Apr 1, 2020, 03:34 PM • Last activity: May 18, 2025, 11:07 PM
1 votes
1 answers
2333 views
Failed to start systemd service during boot
I'm trying to start the systemd service during boot once fstab entries mounted. I have followed https://unix.stackexchange.com/questions/246935/set-systemd-service-to-execute-after-fstab-mount/570837#570837 and added below details # cat /etc/fstab /dev/mmcblk1p11 /data ext4 defaults 0 2 # systemctl...
I'm trying to start the systemd service during boot once fstab entries mounted. I have followed https://unix.stackexchange.com/questions/246935/set-systemd-service-to-execute-after-fstab-mount/570837#570837 and added below details # cat /etc/fstab /dev/mmcblk1p11 /data ext4 defaults 0 2 # systemctl list-units | grep '/data' | awk '{ print $1 }' data.mount # cat /usr/lib/systemd/system/data.service [Unit] Description=My system After=data.mount [Service] Type=oneshot ExecStartPre=mountpoint -q /data ExecStart=/usr/etc/data.sh RemainAfterExit=yes [Install] WantedBy=multi-user.target Problem is, it won't start during boot. However, the manual restart seems working. # systemctl status data.service data.service - My system Loaded: loaded (/usr/lib/systemd/system/data.service; disabled; vendor preset: enabled) Active: inactive (dead) # systemctl enable data.service Created symlink /etc/systemd/system/multi-user.target.wants/data.service ��→ /usr/lib/systemd/system/data.service. # systemctl restart data.service Starting My system... [ OK ] Started My system. Did I miss anything?
Jagan Teki (11 rep)
Mar 3, 2020, 11:55 AM • Last activity: May 14, 2025, 05:04 PM
0 votes
1 answers
68 views
How to actually configure GRUB to not set the filesystem as read-only at boot?
During a boot, Debian failed to start a lot of services. While checking for the cause, I found that it mounted `/` in read-only mode. I also found that I need to run `fsck` to check the disk and fix potential issues—I ran it and it fixed something. I then edited `/etc/fstab` by replacing `ro` mode b...
During a boot, Debian failed to start a lot of services. While checking for the cause, I found that it mounted / in read-only mode. I also found that I need to run fsck to check the disk and fix potential issues—I ran it and it fixed something. I then edited /etc/fstab by replacing ro mode by defaults. Then I found that this change is not enough, since Grub would need to mount / first, in order for Debian to be able to read /etc/fstab. Makes sense. I found out that read-only mode is also specified in /etc/grub.d/10_linux. I thought that I need to change this file as well, but [it seems that it's a really bad idea](https://askubuntu.com/a/468855/229568) . It seems that I need to [“simply configure GRUB to supply the kernel boot option rw instead of the usual ro.”](https://unix.stackexchange.com/a/616087/11229) How exactly do I do it? In other words, what *exactly* should I do in order for Debian to mount / in read-write mode now?
Arseni Mourzenko (1382 rep)
May 12, 2025, 10:18 PM • Last activity: May 12, 2025, 11:46 PM
0 votes
0 answers
66 views
systemd fails to mount CIFS share at boot with _netdev option: "mount error(101): Network is unreachable"
I'm trying to automatically mount a CIFS network share at `/mnt/Share` using systemd on boot, with the _netdev option in `/etc/fstab`. However, the mount fails with the following error in `journalctl`: May 11 13:11:52 laptop-jonte systemd[1]: Mounting /mnt/Share... May 11 13:11:52 laptop-jonte mount...
I'm trying to automatically mount a CIFS network share at /mnt/Share using systemd on boot, with the _netdev option in /etc/fstab. However, the mount fails with the following error in journalctl: May 11 13:11:52 laptop-jonte systemd: Mounting /mnt/Share... May 11 13:11:52 laptop-jonte mount: mount error(101): Network is unreachable May 11 13:11:52 laptop-jonte mount: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg) May 11 13:11:52 laptop-jonte systemd: mnt-Share.mount: Mount process exited, code=exited, status=32/n/a May 11 13:11:52 laptop-jonte systemd: mnt-Share.mount: Failed with result 'exit-code'. May 11 13:11:52 laptop-jonte systemd: Failed to mount /mnt/Share. It seems like the network isn't up yet when the mount is attempted. The share mounts fine manually after boot. My /etc/fstab looks like the following: //192.168.178.33/share /mnt/Share cifs credentials=/etc/smbcredentials/.smbcredentials,uid=1000,gid=1000,iocharset=utf8,auto,_netdev,vers=3.0 0 0 Note that x-systemd.automount is not an option for me, as it causes the share to mount at boot, but with root ownership instead of the intended user. So the question is simple: **How can I mount a smb share at boot with user permissions consistently?**
NLion74 (1 rep)
May 11, 2025, 11:23 AM
0 votes
1 answers
108 views
x-systemd.automount and noauto causes CIFS mount to ignore uid/gid and mount as root
I'm trying to mount a CIFS (Samba) share using /etc/fstab, and I want it to be owned by a specific user (myuser), not root. My current fstab line is: # //server/share /mnt/share cifs credentials=/home/myuser/.smbcred,uid=myuser,gid=myuser,noauto,x-systemd.automount 0 0 However, when I include x-syst...
I'm trying to mount a CIFS (Samba) share using /etc/fstab, and I want it to be owned by a specific user (myuser), not root. My current fstab line is: # //server/share /mnt/share cifs credentials=/home/myuser/.smbcred,uid=myuser,gid=myuser,noauto,x-systemd.automount 0 0 However, when I include x-systemd.automount and noauto, the mount happens as root, and the uid/gid options appear to be ignored. Here's what I see after accessing the mount point: $ ls -lah /mnt/share drwxrwx--- 1 root root 0 ... -rw-rw---- 1 root root ... But if I remove x-systemd.automount and noauto and mount the share mount manually, the ownership is correct: $ ls -lah /mnt/share drwxrwx--- 1 myuser myuser 0 ... -rw-rw---- 1 myuser myuser ... So it seems that using x-systemd.automount causes the mount to be performed by root, ignoring uid and gid. Is this expected behavior? Is there a way to use automounting and still preserve the correct ownership? I'm on the regular 6.14.4-arch1-1 kernel with systemd and cifs-utils.
NLion74 (1 rep)
May 4, 2025, 04:30 PM • Last activity: May 4, 2025, 06:09 PM
Showing page 1 of 20 total questions