How to Auto mount partitions on boot in Fedora

Mount a Disk Automatically on Linux

  1. Open Terminal.
  2. Login as root:
su -
  1. List all disks and note the UUID of the one you want to mount:
blkid

Example output:

/dev/sda5: LABEL="File" UUID="01CCCE1FC7BA38C0" TYPE="ntfs"
  1. Open /etc/fstab in your favorite editor:
vi /etc/fstab
  1. Add a line for your disk to mount automatically at boot. Replace [UUID] and [MountFolder] with your values:
/dev/disk/by-uuid/[UUID] /mnt/[MountFolder] auto nosuid,nodev,nofail,x-gvfs-show 0 0

Example using the output above:

/dev/disk/by-uuid/01CCCE1FC7BA38C0 /mnt/01CCCE1FC7BA38C0 auto nosuid,nodev,nofail,x-gvfs-show 0 0
  1. Save and close the file.
  2. Make sure the mount point exists:
mkdir -p /mnt/01CCCE1FC7BA38C0
  1. Test the mount without rebooting:
mount -a

Your disk should now be accessible at /mnt/01CCCE1FC7BA38C0.


Note:

  • nosuid,nodev,nofail,x-gvfs-show are safe modern options.
  • This works for NTFS, ext4, or most Linux-supported file systems.
  • Always back up /etc/fstab before editing:
cp /etc/fstab /etc/fstab.backup