TIL (actually it was yesterday ... but

I have an 8TB drive in my machine split into 3 partitions. Up until the other day, 2 of those partitions were NTFS. I wanted to migrate them to ext4 because ext4…

I moved the data off the partitions, formatted as ext4, and changed /etc/fstab to reflect the modification.

/dev/sdc4: UUID="5540cf9c-7c13-40ad-89f9-c9e641394a5f" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Basic data partition" PARTUUID="fb82bf2a-45dd-40cc-8694-c118e47b0899" 

Evidently NTFS partitions take the PARTUUID in /etc/fstab, while ext4 partitions take the regular UUID. I did not know this, and suffered a couple of failed boots as a result. lol

Please tell me I’m not the only one who didn’t know this… lol

I had no idea.
I do not even comprehend why there would be 2 UUID’s that point to different things, when there is only one partition to point to.?

Maybe the regular UUID points to the filesystem rather than the partition?

Does anyone know?

This is a pretty good explanation here :

https://bbs.archlinux.org/viewtopic.php?id=249220

however it doesn’t really explain why one worked with one filesystem and the other didn’t.

I extracted this bit

UUID is a function of the filesystem, and anytime you run mkfs on the partition the UUID changes. But PARTUUID is a function of the partition table in GPT partition tables. That will stay static unless you repartition your drive.

so at least we know what they are.
Now
what is the difference between mounting a partition and mounting a filesystem?

I thought we always mount partitions… but we use the filesystem UUID to do it ?

So why was your ntfs filesystem being mounted with the partition UUID?

I know, I am repeating the question… but with more understanding… have you tried mounting an ntfs filesystem using a filesystem UUID?..maybe ntfs works with both?
Clearly ext only works with filesystem UUID.

More questions than answers

2 Likes

Can NTFS partitions be mounted using the UUID?

The UUID reported in GParted for an NTFS partition I load is the same as the UUID I have in fstab, so I guess the answer is yes (unless GParted shows the PARTUUID for NTFS partitions, and the UUID for others - possible, but I doubt it).

2 Likes

anyone know if there’s a way I can change one of them back to NTFS without formatting the partition so I can mess with this? lol

Test it in a VM.
You can make a new filesystem on a partition (mkfs) without
changing the partition table.
The word formatting means a number of different things…
ranging from mkfs to remaking the partition table to low level HD format remarking the sectors.

1 Like

mkfs is the formatting operation. I think, even if you simply reuse exactly the same space, the UUID will change.

Do you have GParted installed (it’s really useful)? If so, you can simply find out the new UUID by right clicking on the partition and selecting Information. If you haven’t, no worries, just use: -

ls -l /dev/disk/by-uuid/

in a terminal.

Then update your fstab with a line something like: -

/dev/disk/by-uuid/XXXXXXXXXXXXXXXX /(desired mount point) auto nosuid,nodev,nofail,x-gvfs-show 0 0

where the string of X’s is replaced by the UUID, and the desired mount point is obviously where you want to see this partition in your filesystem.

2 Likes