Problems with auto mount/fstab

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
kAIOSHIN

Problems with auto mount/fstab

Post by kAIOSHIN »

Hello there!
So I've followed this tutorial: Auto Mount Partitions on Boot (also Windows partitions).

And everything went well, however, it doesn't always mounts all the partitions correctly at startup.
Errors like:
An error ocurred while mounting... skip...
And another error similar to that occur frequently, while at other times it just mounts everything.

The output from sudo blkid -c /dev/null is:

Code: Select all

/dev/sda1: UUID="5429369b-9d42-40c9-bc9c-06f322bcc5b9" TYPE="ext4" 
/dev/sda5: UUID="9c1a53e2-dbb0-43e4-b738-b935dfb12169" TYPE="swap" 
/dev/sdb1: LABEL="DOWNLOADS" UUID="000F9AAE000FB76E" TYPE="ntfs" 
/dev/sdc1: LABEL="DISCOC" UUID="84389633389623E8" TYPE="ntfs" 
/dev/sdc5: LABEL="DISCOD" UUID="7C0CCFDA0CCF8D98" TYPE="ntfs" 
and from cat /etc/fstab :

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' 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>
proc                                       /proc        proc  nodev,noexec,nosuid  0  0  
# / was on /dev/sdc1 during installation
UUID=5429369b-9d42-40c9-bc9c-06f322bcc5b9  /            ext4  errors=remount-ro    0  1  
# swap was on /dev/sdc5 during installation
UUID=9c1a53e2-dbb0-43e4-b738-b935dfb12169  none         swap  sw                   0  0  
/dev/sdb1 /media/DISCOC ntfs defaults,umask=007,gid=46 0 0
/dev/sdb5 /media/DISCOD ntfs defaults,umask=007,gid=46 0 0
/dev/sda1 /media/DOWNLOADS ntfs defaults,umask=007,gid=46 0 0
from mount:

Code: Select all

/dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
/dev/sdb1 on /media/DISCOC type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/andre/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=andre)
What can I do?
Thank you.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
proxima_centauri

Re: Problems with auto mount/fstab

Post by proxima_centauri »

You have several discrepancies between your blkid output and your /etc/fstab file.

Code: Select all

# / was on /dev/sdc1 during installation
UUID=5429369b-9d42-40c9-bc9c-06f322bcc5b9  /            ext4  errors=remount-ro    0  1  
^^^This UUID, according to blkid, is for /dev/sda1, which you have listed again further down as a NTFS partition in fstab.

/etc/fstab shows lines for /dev/sdb1, /dev/sdb5; yet these should be /dev/sdc* according to blkid.

You should always use UUID's when possible for drive identification, instead of /dev/sdb* or /dev/sdc*. It makes it less prone to error.


You'll need to describe each drive in detail in order for us to advise you. It looks to me like /etc/fstab needs to be edited to reflect the output of bklid.
proxima_centauri

Re: Problems with auto mount/fstab

Post by proxima_centauri »

It doesn't make sense to me why the original fstab file says this:
# / was on /dev/sdc1 during installation ***when it's really on /dev/sda1
# swap was on /dev/sdc5 during installation ***when it's really on /dev/sda5

Anyway, I've corrected fstab based on your blkid output.

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' 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>
proc                                       /proc        proc  nodev,noexec,nosuid  0  0 
# / was on /dev/sdc1 during installation
UUID=5429369b-9d42-40c9-bc9c-06f322bcc5b9  /            ext4  errors=remount-ro    0  1 
# swap was on /dev/sdc5 during installation
UUID=9c1a53e2-dbb0-43e4-b738-b935dfb12169  none         swap  sw                   0  0 

UUID=84389633389623E8 /media/DISCOC ntfs defaults,umask=007,gid=46 0 0
UUID=7C0CCFDA0CCF8D98 /media/DISCOD ntfs defaults,umask=007,gid=46 0 0
UUID=000F9AAE000FB76E /media/DOWNLOADS ntfs defaults,umask=007,gid=46 0 0
kAIOSHIN

Re: Problems with auto mount/fstab

Post by kAIOSHIN »

Thank you for your help.
Wow, there were some really strange things happening on my pc.

Well, I've replaced the content of my fstab file by the one you gave me, rebooted, and everything seems fine! :D

Thank you!
Locked

Return to “Storage”