For example, if the UUID is 1234-ABCD and you want to mount it at /mnt/mydisk with ext4 filesystem:
UUID=1234-ABCD /mnt/mydisk ext4 defaults 0 0
Save the file and exit the text editor.
Create the mount point directory if it doesn’t exist:
mkdir -p /mnt/mydisk
Mount the filesystem to verify:
mount -a
The fstab entry ensures that the disk is mounted at boot or when you run mount -a. The defaults option refers to the default mount options, and 0 0 at the end are for dump and filesystem check options, which are generally safe to leave as zero.
The dump and pass (also called “check”) are the fifth and sixth fields in the /etc/fstab entry, respectively.
Dump: The dump field is used by the dump utility to decide if a filesystem should be backed up. If the value is 0, the dump utility will ignore the filesystem. If the value is set to 1, it will be included in the backup. dump is not commonly used these days, so this field is usually set to 0.
Pass (Check): The pass field specifies the order in which the fsck utility will check the filesystems at boot time. The root filesystem should have this set to 1, and other filesystems you want to be checked should be set to 2. If this is set to 0, fsck will not check the filesystem. It’s advisable to set the root filesystem to 1 and any additional filesystems to 2 to ensure they’re checked at boot, though not simultaneously, which could slow down the boot process.
In most cases, for additional disks and partitions, setting both dump and pass to 0 is acceptable, which means no backup and no check at boot.
A small note, usually noatime is interpreted as both “no last access time” for files and directories as nodiratime is supposed to be used only if noatime is missing, but I usually add both just in case, as I never found a problem with this redundancy.
The code scans for the UUID’s of all block devices and uses that data to mount all available drives on the previously defined mount points but if you want details you will need to go through the code.
I knew the old code pretty well but now its time to learn the new code!
rebooting does not re-mount the external drive. And the external drive cannot be re-mounted via extrahd.
I can get the extrahd to mount a external drive by removing the needed drive from /var/ipfire/extrahd/devices. And then all is well until the next reboot.
It is not really impractical. You need to do this fstab modification only once. Here’s a tutorial.
First you need to find the device name of your NTFS volume. You can use the lsblk command, which lists all block devices attached to your system. Here’s how to do it:
Open a terminal.
Enter the following command:
lsblk -f
Look for the device with an ntfs or ntfs3 file system type in the output. It will also show you the mount points if they are already mounted.
In this example, sda1 is the partition with an NTFS file system. The device name would be /dev/sda1 if you want to mount this partition.
Remember that you should mount the specific partition (like sda1, sda2, etc.), not the entire disk (sda).
To mount an NTFS volume using the ntfs3 driver in /etc/fstab, you will need to add a new entry to the file that specifies the driver. Here’s how you can do it:
Open the /etc/fstab file with a text editor. You will need root permissions to edit this file. For example, you can use nano:
nano /etc/fstab
Add a new line at the end of the file for your NTFS volume. The entry should look something like this: