Auto-Mounting an NTFS Disk at Boot on Ubuntu
TL;DR
To automatically mount an NTFS disk at startup on Ubuntu, you need to configure /etc/fstab
with the correct UUID and settings. Below are the steps to achieve this.
Steps
-
Find the Disk’s UUID
Run the following command to find the UUID of your NTFS partition:sudo blkid
Locate the UUID for your disk (e.g.,
/dev/sda1
) from the output. -
Create a Mount Point
Create a directory where the disk will be mounted. For example:sudo mkdir /media/$USER
-
Edit
/etc/fstab
Open the/etc/fstab
file to add the new mount entry:sudo vi /etc/fstab
-
Add the Disk to
/etc/fstab
Add the following line to/etc/fstab
to ensure your NTFS disk mounts at boot:UUID=F272D12672D0F079 /dev/nvme0n1p6 ntfs-3g defaults,nofail,x-systemd.automount 0 0
F272D12672D0F079
: UUID of the disk./media/$USER
: The mount point you created.ntfs-3g
: NTFS file system type.defaults,nofail,x-systemd.automount
: Mount options to ensure safe mounting and boot process.
NOTE: If it’s an ext4 partition, use
ext4
instead ofntfs-3g
and removex-systemd.automount
:UUID=xxxx-xxxx /mnt/mydisk ext4 defaults,nofail 0 2
-
Test the Configuration
Run the following command to test if the configuration works:sudo mount -a
If there are no errors, the disk should now mount automatically on boot.
-
Reboot the System
Reboot the system:sudo reboot
Now, the disk should be automatically mounted when the system starts, and any bookmarks pointing to that disk will work right away without manually mounting it.