Problem configuring a new 1TB drive on Ubuntu 20.04.3 using fstab

Bo Berglund bo.berglund at gmail.com
Mon Jan 3 23:06:33 UTC 2022


I had to expand storage on my HP Laptop running Ubuntu 20.04.3 Desktop since the
main disk is way too small.
So I have ordered a 1TB drive and put it into the disk carrier that plugs into
the laptop replacing the DVD drive.

With Gparted I have created one data partition using 400 GB out of the 1TB. It
is formatted as ext4.

If I mount it using this command it is visible:
sudo mount /dev/sdb1 /mnt/data

I can list the content of /mnt/data (nothing except lost+found)

Now I wanted to make the mount automatic via /etc/fstab so I retrieved the ID of
the drive using:
sudo blkid
....
/dev/sdb1: UUID="b8dae32b-cb17-41f7-8e56-e3a5e49c1992" TYPE="ext4"
PARTLABEL="home" PARTUUID="5ac54f4c-0819-4595-b457-f7d144df8076"

So I have 2 identifiers UUID and PARTUUID

Now I unmount the drive and edit /etc/fstab so it contains this:

#Below is the 1TB drive sdb partition data
#PARTUUID=5ac54f4c-0819-4595-b457-f7d144df8076 /mnt/data   ext4  0 0
#UUID=b8dae32b-cb17-41f7-8e56-e3a5e49c1992 /mnt/data   ext4  0 0

First I uncomment the line with PARTUUID and then I get an error:
sudo mount -a
mount: /mnt/data: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error.

Then instead I uncomment the second line instead and I get the same error
message and no mount done.

What am I doing wrong here?
A simple 
sudo mount /dev/sdb1 /mnt/data
on the command line succeeds but not when using fstab....


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list