Automount NTFS HDD on boot using UUID

I would like to automount my external HDD (NTFS volume) on boot by using its UUID.
However it is only working by specifying the partition I would like to mount (sdb2) .

both fstab configs
config mount ---> auto mount on boot NOT working
        option uuid 'B2AC6857AC6817DD'
        option enabled '1'
        option target '/mnt/ext_hdd'
        option fstype 'ntfs'
        option options 'rw,noatime,async,big_writes'

config mount ---> auto mount on boot working
        option enabled '1'
        option target '/mnt/ext_hdd'
        option fstype 'ntfs'
        option options 'rw,noatime,async,big_writes'
        option device '/dev/sdb2'
root@OPENWRT-ROUTER:~# block info
/dev/sda1: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" VERSION="1.0" MOUNT="/boot" TYPE="ext4"
/dev/sda2: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" VERSION="1.0" MOUNT="/" TYPE="ext4"
/dev/sdb2: UUID="B2AC6857AC6817DD" MOUNT="/mnt/ext_hdd" TYPE="ntfs"

when i try to manually mount it by uuid, i get this

root@OPENWRT-ROUTER:~# mount -t ntfs-3g UUID="B2AC6857AC6817DD" /mnt/ext_hdd -o rw,noatime,async,big_writes
ntfs-3g: Failed to access volume 'UUID=B2AC6857AC6817DD': No such file or directory

On the Mount Options page at Mount Points it also shows "UUID: B2AC6857AC6817DD ( not present )"

There is an issue with UUID for NTFS. Not sure it's exactly what you have, as your UUID looks a bit different, but you could check the following

3 Likes

I don't know if it's the best solution or not, but if the disk isn't changing, you could just do it like the following

ntfs-3g /dev/sda1 /HP -o rw,sync

blkid showed indeed more results.

root@OPENWRT-ROUTER:~# blkid
/dev/sda1: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4" PARTUUID="c1e0f78c-01"
/dev/sda2: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4" PARTUUID="c1e0f78c-02"
/dev/sdb1: PARTLABEL="Microsoft reserved partition" PARTUUID="5a572bcf-6575-48bd-ac0a-419cedcf5b44"
/dev/sdb2: UUID="B2AC6857AC6817DD" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="6c2522bc-3f16-474f-953e-e3a5fcc47858"

However it also won't let me mount it by using the partuuid.

root@OPENWRT-ROUTER:~# mount -t ntfs-3g PARTUUID="5af5aec1-d53d-4f5b-8e06-8f6cb599a8a7" /mnt/ext_hdd -o rw,noatime,async
,big_writes
ntfs-3g: Failed to access volume 'PARTUUID=5af5aec1-d53d-4f5b-8e06-8f6cb599a8a7': No such file or directory

The disk won't be changing much. But since there is the possibility to mount using the devices uuid, I would like to do so.

Try to verify the bug:
https://bugs.openwrt.org/index.php?do=details&task_id=2129

I can confirm this bug. So it is a global issue and not just for me?

It's a known issue, as you saw in the referenced post and the reported bug. Though, it set to a low priority as it's not a security threat, doesn't affect functionality much, and is only about NTFS disks.

2 Likes