darthstevenus
Posts: 15
Joined: Sat Aug 26, 2017 9:13 pm

Cannot mount external hard drive on RPi4

Thu Oct 17, 2019 9:18 pm

I just bought a Raspberry Pi 4 that I've set up as a LAMP stack web server. The OS is Raspbian GNU/Linux 10 (buster). I had an external hard drive that was mounted on my old RPi2b+. I'm trying to mount it on my RPi4 to /mnt/hdd1, but it's not working. When I run

Code: Select all

sudo mount /dev/sda2 /mnt/hdd1
I get this error in response:

Code: Select all

mount: /mnt/hdd1: wrong fs type, bad option, bad superblock on /dev/sda2, missing codepage or helper program, or other error.
I ran this command after some Googling:

Code: Select all

sudo fdisk -l
and got this response:

Code: Select all

Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram4: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram5: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram6: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram7: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram8: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram9: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram10: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram11: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram12: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram13: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram14: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram15: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mmcblk0: 29.8 GiB, 32010928128 bytes, 62521344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0000c7e5

Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk0p1         8192  4615234  4607043  2.2G  e W95 FAT16 (LBA)
/dev/mmcblk0p2      4615235 62521343 57906109 27.6G  5 Extended
/dev/mmcblk0p5      4620288  4685821    65534   32M 83 Linux
/dev/mmcblk0p6      4685824  5210109   524286  256M  c W95 FAT32 (LBA)
/dev/mmcblk0p7      5210112 62521343 57311232 27.3G 83 Linux


Disk /dev/sda: 3.7 TiB, 4000752599040 bytes, 7813969920 sectors
Disk model: My Passport 25E2
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 557F352A-C376-42EB-B14C-AE57A8503763

Device      Start        End    Sectors  Size Type
/dev/sda1      34     262177     262144  128M Microsoft reserved
/dev/sda2  264192 7813967871 7813703680  3.7T Microsoft basic data

Partition 1 does not start on physical sector boundary.
And running this command:

Code: Select all

sudo blkid
gave me this response:

Code: Select all

/dev/mmcblk0p1: LABEL_FATBOOT="RECOVERY" LABEL="RECOVERY" UUID="9016-4EF8" TYPE="vfat" PARTUUID="0000c7e5-01"
/dev/mmcblk0p5: LABEL="SETTINGS" UUID="6b1ce41a-4c1a-4e0f-a739-174002f10cdd" TYPE="ext4" PARTUUID="0000c7e5-05"
/dev/mmcblk0p6: LABEL_FATBOOT="boot" LABEL="boot" UUID="04D8-CE80" TYPE="vfat" PARTUUID="0000c7e5-06"
/dev/mmcblk0p7: LABEL="root" UUID="3f266bc3-aedc-47c5-b995-bdb9b72e0740" TYPE="ext4" PARTUUID="0000c7e5-07"
/dev/sda2: LABEL="SMR_BACKUP" UUID="3E30785B30781C59" TYPE="ntfs" PTTYPE="atari" PARTLABEL="Basic data partition" PARTUUID="bd055116-9e2f-48cb-ba38-895a1ffa4a18"
/dev/mmcblk0: PTUUID="0000c7e5" PTTYPE="dos"
/dev/sda1: PARTLABEL="Microsoft reserved partition" PARTUUID="80e4f497-3551-43d0-8cf4-dd105c597780"
I'm kind of out of my depth on this one. Something to do with the way the drive is partitioned I guess? It's a Western Digital if that matters. And I need to be able to use the drive on Windows 7 and up as well if that makes a difference.

Kendek
Posts: 127
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: Cannot mount external hard drive on RPi4

Thu Oct 17, 2019 9:55 pm

I think you just need to install the ntfs-3g package:

Code: Select all

sudo apt install ntfs-3g
The performance and compatibility will not be as good as with a native Linux filesystem. Ext4 is recommended.

LTolledo
Posts: 2030
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Cannot mount external hard drive on RPi4

Thu Oct 17, 2019 9:58 pm

do you have ntfs-3g installed in your Raspbian Buster? (IIRC, 2019-09-26 Raspian Buster image has this by default)

checked mine and it was mounting properly
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

darthstevenus
Posts: 15
Joined: Sat Aug 26, 2017 9:13 pm

Re: Cannot mount external hard drive on RPi4

Thu Oct 17, 2019 11:37 pm

That did the trick, thanks everyone!

EDIT: Specifically this:

Code: Select all

sudo apt install ntfs-3g

Return to “Advanced users”