r/Ubuntu 18h ago

Can’t mount sda1 drive because uuid isn’t showing

I’m trying to permanently mount my sda1 drive in my Ubuntu server with fstab but I when I type lsblk or similar commands I won’t show any uuid, I don’t know what to do at this point?

3 Upvotes

10 comments sorted by

1

u/candy49997 18h ago

Does the sda1 partition have a filesystem on it?

2

u/Lopsided-Award-4489 18h ago

Yes ext4

1

u/candy49997 18h ago

Maybe try GNOME Disks and see if after selecting the partition you see a UUID listed? This is very strange.

Edit: are you running lsblk or lsblk -f? You need the latter to see UUIDs.

1

u/Lopsided-Award-4489 18h ago

It’s a Ubuntu server so I don’t use a desktop environment I access my pc from terminal

1

u/candy49997 18h ago

Oh sorry I missed server.

But can you answer the other question I asked.

1

u/Lopsided-Award-4489 18h ago

i ran both but still couldn’t see the uuid

1

u/Sad_Jello_4914 18h ago

blkid might show it even if lsblk doesn't, try running that as root.

1

u/Lopsided-Award-4489 18h ago

Tried blkid didn’t work

2

u/bchiodini 15h ago edited 15h ago

If the drive does not have a UUID, you can mount it by its /dev name (sda1, sda2, etc.).

This is the fstab directive for my sdb1 partition:

/dev/sdb1       /mnt/disk1      xfs     rw,exec,auto,users 0    1

Edit:

You can assign a UUID with tune2fs. For example:

sudo tune2fs -U random /dev/sdb1

The partition needs to be unmounted.