1

I am unable to mount my USB drive in the bash. First, I formated it with parted:

GNU Parted 3.2
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mkpart
Partition name?  []? backup
File system type?  [ext2]? ext4
Start? 1m
End? 100%
(parted) q

Then, I obtained the UUID of the partition:

sudo blkid /dev/sdc1
/dev/sdc1: PARTLABEL="backup" PARTUUID="29e0527b-b182-46ff-b8d4-b457f2cbd19c"

Next, I put the PARTUUID into /etc/fstab:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p1 during installation
UUID=96a4c1cc-8681-45a9-b3f7-634803e2c6fa /               ext4    errors=remount-ro 0       1
UUID=29e0527b-b182-46ff-b8d4-b457f2cbd19c /media/backup1        ext4    noauto,defaults 0       2

So far so good. However, mounting does not work:

sudo mount /media/backup1
mount: can't find UUID=29e0527b-b182-46ff-b8d4-b457f2cbd19c

So, mount does not seem to find this UUID. But it is there, I can still query it with sudo blkid /dev/sdc1. Also, sudo fdisk -l also seems to find it:

sudo fdisk -l

[...]    

Disk /dev/sdc: 2.7 TiB, 3000592982016 bytes, 732566646 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 66AC3C98-AAF8-4E3B-90F3-2813B52F69DA

Device     Start       End   Sectors  Size Type
/dev/sdc1    256 732566527 732566272  2.7T Linux filesystem

One interesting thing I noted is that the entry is not in blkid but only in sudo blkid:

blkid
/dev/nvme0n1p1: UUID="96a4c1cc-8681-45a9-b3f7-634803e2c6fa" TYPE="ext4" PARTUUID="d02d7331-01"
/dev/sdb1: LABEL="datapool" UUID="7111675423553490798" UUID_SUB="13772573515660158653" TYPE="zfs_member" PARTLABEL="zfs-6e73ce37d37e2e96" PARTUUID="f46820b7-8b06-f947-bdad-c63d50404137"
/dev/sda1: LABEL="datapool" UUID="7111675423553490798" UUID_SUB="11975018375513471305" TYPE="zfs_member" PARTLABEL="zfs-ab8eb30bd084e717" PARTUUID="d29dadab-f6e7-dd4a-b7d6-442544920142

sudo blkid
/dev/nvme0n1p1: UUID="96a4c1cc-8681-45a9-b3f7-634803e2c6fa" TYPE="ext4" PARTUUID="d02d7331-01"
/dev/sdb1: LABEL="datapool" UUID="7111675423553490798" UUID_SUB="13772573515660158653" TYPE="zfs_member" PARTLABEL="zfs-6e73ce37d37e2e96" PARTUUID="f46820b7-8b06-f947-bdad-c63d50404137"
/dev/sda1: LABEL="datapool" UUID="7111675423553490798" UUID_SUB="11975018375513471305" TYPE="zfs_member" PARTLABEL="zfs-ab8eb30bd084e717" PARTUUID="d29dadab-f6e7-dd4a-b7d6-442544920142"
/dev/sda9: PARTUUID="403ede0a-5e26-4244-8a0c-5de2f00e2526"
/dev/nvme0n1: PTUUID="d02d7331" PTTYPE="dos"
/dev/sdb9: PARTUUID="91eb1b79-fc3d-6847-9b52-c2f46d04b7c6"
/dev/sdc1: PARTLABEL="backup" PARTUUID="29e0527b-b182-46ff-b8d4-b457f2cbd19c"

UPDATE: Okay, now I managed to get rid of the above error by using PARTUUID= instead of UUID=. However, now I get the following error:

sudo mount /media/backup1/
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

The output of dmesg | tail is as follows:

[ 3349.566573] EXT4-fs (sdc1): VFS: Can't find ext4 filesystem

What is the problem now?

  • What's the output of sudo dmesg | tail (as suggested in the error message) just after trying to mount the file system? – David Foerster Jan 31 '17 at 3:26
  • @DavidFoerster: I have appended the output. – gexicide Jan 31 '17 at 8:23
  • I seriously doubt that this is all the output of the above command (tail prints the last 10 lines of its input by default). That one line is a hint but some more context would be very helpful. – David Foerster Jan 31 '17 at 12:24
  • @DavidFoerster: You are right, but all other lines had a much older time stamp, so they were from before the execution of the command. I therefore omitted them. – gexicide Jan 31 '17 at 21:10
  • Just to exclude some stuff, could you please try to run sudo mount /dev/disk/by-uuid/29e0527b-b182-46ff-b8d4-b457f2cbd19c /media/backup1? Thanks. – David Foerster Jan 31 '17 at 22:07
0

Did you disconnect/reconnect the USB drive or reboot the machine since you partitioned the drive and created the file system? If not please run

sudo partprobe /dev/sdc

to tell the kernel to update its information about the partition table and file system UUIDs on the drive.

  • I tried this and it didin't help. Also, rebooting didn't help. – gexicide Jan 30 '17 at 21:20
  • Okay, fixed the problem, now another problem. See above. – gexicide Jan 30 '17 at 21:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.