Skip to main content
revise
Source Link
Seamus
  • 22.9k
  • 4
  • 38
  • 79

One step you may have overlooked was consulting man fstab - in other words, the system manual for creating & maintaining /etc/fstab. Even though it's a bit dated now (Feb 2015 in my bullseye OS), and has at least one error (re behaviour of nofail), it does mostly reflect the software on your system. At least man fstab does a reasonable job of showing the syntax. TheIn addition, the system manual man mount covers additional details on the options for constructing a correct fstab entry. You should read them both.

One of the problems I saw in your fstab entry was that the third field (third field (fs_vfstype)) is missing. man fstab tells us that there should be an entry in this fieldincorrect. It appears youYou have put the term auto in the third field. AFAIK, but auto is not a proper entry for the type of file systemtype of file system. You should use instead the name of

Your question reveals that you correctly identified the file systemtype of file system used for formatting the drive/partition being mounted. For example:on /dev/sda1 as ext4, using the commands ext3sudo blkid, and vfatsudo lsblk ...,. THEREFORE: The value exfatext4, should be used for the ntfsfs_vfstype, etc, etc field.

Moving on to your 4th fieldAlso note that you could have simplified this by simply using the following command:lsblk --fs. No sudo is required, and the output is in easy-to-read tree format with headings - as shown below: (Note: I've substituted output from my system.)

$ lsblk --fs
NAME        FSTYPE FSVER LABEL  UUID                                 FSAVAIL FSUSE% MOUNTPOINT  
sda
└─sda1      ext4   1.0   PASSPORT2TB 86645948-d127-4991-888c-a466b7722f05    1.5T    10% /mnt/Passport2TB
mmcblk0
├─mmcblk0p1 vfat   FAT32 boot   19E2-67CF                             200.9M    20% /boot
└─mmcblk0p2 ext4   1.0   rootfs 97ca6ca8-5cb1-413f-84d0-569efd4e2c0f   25.8G     7% / 

Your entries in the fourth field (fs_mntops), you have the option string were as follows:

Perhaps you intended that your 3rd field entry auto was to be included here? It would have been a valid entry.

My recommendation for your 4th field (fs_mntops) entries is as follows:

rw: allow read and write on the mounted filesystem 
user: allow a user to mount the filesystem - which would include user pi (typically the same as uid=1000,gid=1000, but not necessarily) 
nofail: don't stop the boot process if this filesystem cannot be mounted. Note that man fstab says do not report errors, but actually it halts the boot process on failure (last I checked anyway) it halts the boot process on failure.

You do not need the noatime option as that is typically used only on devices such as SD cards which have a "wearout mechanism".

Please verify that your HDD is formatted as ext4 before trying this; otherwise replace ext4 with the format used.

Finally, youYou can experimenttest/experiment with various options in your /etc/fstab entry without having to reboot:

FROM: UUID=c6c93d58-8648-4e33-9178-ca6c1d4043e3 /mnt/1TB-PiDrive ext4 rw,user,nofail 0 0
TO: UUID=c6c93d58-8648-4e33-9178-ca6c1d4043e3 /mnt/1TB-PiDrive ext4 rw,user,nofail.

FROM:

UUID=c6c93d58-8648-4e33-9178-ca6c1d4043e3 /mnt/1TB-PiDrive ext4 rw,user,nofail 0 0  

TO:

UUID=c6c93d58-8648-4e33-9178-ca6c1d4043e3 /mnt/1TB-PiDrive ext4 rw,user,nofail

This will attempt to mount all (-a) drives in /etc/fstab and give a verbose (-v) report. For example, on one of my systems (without unmounting anything first):

$ sudo umount /mnt/Passport2TB
$ sudo mount -av
/proc                    : already mounted
/boot                    : already mounted
/                        : ignored
/homemnt/pisdpi/mntThumbDrvboot     : already mounted
/home/pi/mntBackupDrv    : already mounted
/homemnt/pisdpi/mntPassportroot           : already mounted
/home/pimnt/mntNetgearNAS-3Passport2TB         : alreadysuccessfully mounted
$

One step you may have overlooked was consulting man fstab - in other words, the system manual for creating & maintaining /etc/fstab. Even though it's a bit dated now (Feb 2015 in my bullseye OS), and has at least one error (re behaviour of nofail), it does mostly reflect the software on your system. At least man fstab does a reasonable job of showing the syntax. The system manual man mount covers additional details on the options for constructing a correct fstab entry.

One of the problems I saw in your fstab entry was that the third field (fs_vfstype) is missing. man fstab tells us that there should be an entry in this field. It appears you have put the term auto in the third field. AFAIK, auto is not a proper entry for the type of file system. You should use instead the name of the file system used for formatting the drive/partition being mounted. For example: ext4, ext3, vfat, exfat, ntfs, etc, etc.

Moving on to your 4th field entries (fs_mntops), you have the option string:

Perhaps you intended that your 3rd field entry auto was to be included here? It would have been a valid entry.

My recommendation for your 4th field (fs_mntops) entries is as follows:

rw: allow read and write on the mounted filesystem user: allow a user to mount the filesystem - which would include user pi (typically the same as uid=1000,gid=1000, but not necessarily) nofail: don't stop the boot process if this filesystem cannot be mounted. Note that man fstab says do not report errors, but actually it halts the boot process on failure (last I checked anyway).

You do not need the noatime option as that is typically used only on devices such as SD cards which have a "wearout mechanism"

Please verify that your HDD is formatted as ext4 before trying this; otherwise replace ext4 with the format used.

Finally, you can experiment with various options in your /etc/fstab entry without having to reboot:

FROM: UUID=c6c93d58-8648-4e33-9178-ca6c1d4043e3 /mnt/1TB-PiDrive ext4 rw,user,nofail 0 0
TO: UUID=c6c93d58-8648-4e33-9178-ca6c1d4043e3 /mnt/1TB-PiDrive ext4 rw,user,nofail.

This will attempt to mount all (-a) drives in /etc/fstab and give a verbose (-v) report. For example, on one of my systems (without unmounting anything first):

sudo mount -av
/proc                    : already mounted
/boot                    : already mounted
/                        : ignored
/home/pi/mntThumbDrv     : already mounted
/home/pi/mntBackupDrv    : already mounted
/home/pi/mntPassport     : already mounted
/home/pi/mntNetgearNAS-3 : already mounted

One step you may have overlooked was consulting man fstab - in other words, the system manual for creating & maintaining /etc/fstab. Even though it's a bit dated now (Feb 2015 in my bullseye OS), and has at least one error (re behaviour of nofail), it does mostly reflect the software on your system. At least man fstab does a reasonable job of showing the syntax. In addition, the system manual man mount covers additional details on the options for constructing a correct fstab entry. You should read them both.

One of the problems I saw in your fstab entry was that the third field (fs_vfstype) is incorrect. You have put the term auto in the third field, but auto is not a proper entry for the type of file system.

Your question reveals that you correctly identified the type of file system used on /dev/sda1 as ext4 using the commands sudo blkid and sudo lsblk .... THEREFORE: The value ext4 should be used for the fs_vfstype field.

Also note that you could have simplified this by simply using the following command:lsblk --fs. No sudo is required, and the output is in easy-to-read tree format with headings - as shown below: (Note: I've substituted output from my system.)

$ lsblk --fs
NAME        FSTYPE FSVER LABEL  UUID                                 FSAVAIL FSUSE% MOUNTPOINT  
sda
└─sda1      ext4   1.0   PASSPORT2TB 86645948-d127-4991-888c-a466b7722f05    1.5T    10% /mnt/Passport2TB
mmcblk0
├─mmcblk0p1 vfat   FAT32 boot   19E2-67CF                             200.9M    20% /boot
└─mmcblk0p2 ext4   1.0   rootfs 97ca6ca8-5cb1-413f-84d0-569efd4e2c0f   25.8G     7% / 

Your entries in the fourth field (fs_mntops) were as follows:

My recommendation for your 4th field (fs_mntops) entries is as follows:

rw: allow read and write on the mounted filesystem 
user: allow a user to mount the filesystem - which would include user pi (typically the same as uid=1000,gid=1000, but not necessarily) 
nofail: don't stop the boot process if this filesystem cannot be mounted. Note that man fstab says do not report errors, but actually (last I checked) it halts the boot process on failure.

You do not need the noatime option as that is typically used only on devices such as SD cards which have a "wearout mechanism".

You can test/experiment with various options in your /etc/fstab entry without having to reboot:

FROM:

UUID=c6c93d58-8648-4e33-9178-ca6c1d4043e3 /mnt/1TB-PiDrive ext4 rw,user,nofail 0 0  

TO:

UUID=c6c93d58-8648-4e33-9178-ca6c1d4043e3 /mnt/1TB-PiDrive ext4 rw,user,nofail

This will attempt to mount all (-a) drives in /etc/fstab and give a verbose (-v) report. For example, on one of my systems:

$ sudo umount /mnt/Passport2TB
$ sudo mount -av
/proc                    : already mounted
/boot                    : already mounted
/                        : ignored
/mnt/sdpi/boot           : already mounted
/mnt/sdpi/root           : already mounted
/mnt/Passport2TB         : successfully mounted
$
added 15 characters in body
Source Link
Seamus
  • 22.9k
  • 4
  • 38
  • 79

One step you may have overlooked was checkingconsulting man fstab - in other words, the system manual for creating & maintaining /etc/fstab. Even though it's a bit dated now (Feb 2015 in my bullseye OS), and has at least one error (re behaviour of nofail), it does mostly reflect the software on your system. I've always found the fstab incantations a bit arcane, andAt least man fstab at least does a reasonable job of showing the syntax. The system manual man mount covers additional details on the options for constructing a correct fstab entry.

One of the problems I saw in your fstab entry was that the third field (fs_vfstype) is missing. man fstab tells us that there should be an entry in this field. It appears you have put the term auto in the third field. AFAIK, auto is not a proper entry for the type of file system. You should use instead the name of the file system used for formatting the drive/partition being mounted. For example: ext4, ext3, vfat, exfat, ntfs, etc, etc. The system manual man mount has additional details on the options.

One step you may have overlooked was checking man fstab - in other words, the system manual for creating & maintaining /etc/fstab. Even though it's a bit dated now (Feb 2015), and has at least one error (re behaviour of nofail), it does reflect the software on your system. I've always found the fstab incantations a bit arcane, and man fstab at least does a reasonable job of showing the syntax.

One of the problems I saw in your fstab entry was that the third field (fs_vfstype) is missing. man fstab tells us that there should be an entry in this field. It appears you have put the term auto in the third field. AFAIK, auto is not a proper entry for the type of file system. You should use instead the name of the file system used for formatting the drive/partition being mounted. For example: ext4, ext3, vfat, exfat, ntfs, etc, etc. The system manual man mount has additional details on the options.

One step you may have overlooked was consulting man fstab - in other words, the system manual for creating & maintaining /etc/fstab. Even though it's a bit dated now (Feb 2015 in my bullseye OS), and has at least one error (re behaviour of nofail), it does mostly reflect the software on your system. At least man fstab does a reasonable job of showing the syntax. The system manual man mount covers additional details on the options for constructing a correct fstab entry.

One of the problems I saw in your fstab entry was that the third field (fs_vfstype) is missing. man fstab tells us that there should be an entry in this field. It appears you have put the term auto in the third field. AFAIK, auto is not a proper entry for the type of file system. You should use instead the name of the file system used for formatting the drive/partition being mounted. For example: ext4, ext3, vfat, exfat, ntfs, etc, etc.

Source Link
Seamus
  • 22.9k
  • 4
  • 38
  • 79

One step you may have overlooked was checking man fstab - in other words, the system manual for creating & maintaining /etc/fstab. Even though it's a bit dated now (Feb 2015), and has at least one error (re behaviour of nofail), it does reflect the software on your system. I've always found the fstab incantations a bit arcane, and man fstab at least does a reasonable job of showing the syntax.

One of the problems I saw in your fstab entry was that the third field (fs_vfstype) is missing. man fstab tells us that there should be an entry in this field. It appears you have put the term auto in the third field. AFAIK, auto is not a proper entry for the type of file system. You should use instead the name of the file system used for formatting the drive/partition being mounted. For example: ext4, ext3, vfat, exfat, ntfs, etc, etc. The system manual man mount has additional details on the options.

Moving on to your 4th field entries (fs_mntops), you have the option string:

nofail,uid=1000,gid=1000,noatime

Perhaps you intended that your 3rd field entry auto was to be included here? It would have been a valid entry.

My recommendation for your 4th field (fs_mntops) entries is as follows:

rw,user,nofail

rw: allow read and write on the mounted filesystem user: allow a user to mount the filesystem - which would include user pi (typically the same as uid=1000,gid=1000, but not necessarily) nofail: don't stop the boot process if this filesystem cannot be mounted. Note that man fstab says do not report errors, but actually it halts the boot process on failure (last I checked anyway).

You do not need the noatime option as that is typically used only on devices such as SD cards which have a "wearout mechanism"

Finally, the two 0 (zero) values at the end of your /etc/fstab entry are the fifth and sixth fields. They are fine as is, but 0 is the default for both so they aren't actually needed in your case.

If you'll try this entry in /etc/fstab, I hope it will work. If not, let us know & we'll fix that:

UUID=c6c93d58-8648-4e33-9178-ca6c1d4043e3 /mnt/1TB-PiDrive ext4 rw,user,nofail 0 0

Please verify that your HDD is formatted as ext4 before trying this; otherwise replace ext4 with the format used.

Testing your /etc/fstab entries:

Finally, you can experiment with various options in your /etc/fstab entry without having to reboot:

  1. unmount the drive (if it's mounted):
sudo umount /mnt/1TB-PiDrive
  1. make a change to your /etc/fstab entry; e.g.:

FROM: UUID=c6c93d58-8648-4e33-9178-ca6c1d4043e3 /mnt/1TB-PiDrive ext4 rw,user,nofail 0 0
TO: UUID=c6c93d58-8648-4e33-9178-ca6c1d4043e3 /mnt/1TB-PiDrive ext4 rw,user,nofail.

  1. have mount re-read /etc/fstab to verify this works (it still mounts):
sudo mount -av

This will attempt to mount all (-a) drives in /etc/fstab and give a verbose (-v) report. For example, on one of my systems (without unmounting anything first):

sudo mount -av
/proc                    : already mounted
/boot                    : already mounted
/                        : ignored
/home/pi/mntThumbDrv     : already mounted
/home/pi/mntBackupDrv    : already mounted
/home/pi/mntPassport     : already mounted
/home/pi/mntNetgearNAS-3 : already mounted