ayufan-pine64 / linux-build

Pine64 Linux build scripts, tools and instructions (based on Longsleep work)
MIT License
154 stars 36 forks source link

Connect External HDD #92

Closed danilo-jlle closed 3 years ago

danilo-jlle commented 3 years ago

Hi. I'm trying to connect a External HDD with no luck on my Pine64 board with Xenial Minimal. It is a Seagate Drive with external power source, so even it is a USB3 drive, it should work.

lsusb
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 0bc2:3320 Seagate RSS LLC SRD00F2 [Expansion Desktop Drive]
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsblk -f
NAME        FSTYPE LABEL   UUID                                 MOUNTPOINT
sda                                                             
`-sda1      ext4   Externo fe99ceef-8716-4304-a4aa-74539ee98581 
zram0                                                           [SWAP]
zram1                                                           [SWAP]
zram2                                                           [SWAP]
zram3                                                           [SWAP]
mmcblk0                                                         
|-mmcblk0p1 vfat   BOOT    D53B-9C84                            /boot
`   -mmcblk0p2 ext4   rootfs  0cd17b3d-39ae-4b12-a1c7-9b0a96daefe2 /

However, when I try to mount it:

sudo mount -t ext4 /dev/sda1 /mnt/Teste
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.

And then dmesg only shows a bunch of codes:

sudo dmesg | tail
[  553.198551] x17: 0000007f7b81fc30 x16: 00000000027bfc78 
[  553.198557] x15: ffffffffffffffff x14: 0000000000000018 
[  553.198566] x13: 000000000294bd40 x12: 0000000000000000 
[  553.198572] x11: 0000007fdf176d48 x10: 000000000000000c 
[  553.198578] x9 : 0000000022dc1d7d x8 : 0000000000000123 
[  553.198587] x7 : 616e732f64616572 x6 : 616e732f64616572 
[  553.198593] x5 : 0000007fdf17674b x4 : 0000007fdf176310 
[  553.198599] x3 : 0000000000000fff x2 : 0000000000000000 
[  553.198608] x1 : 0000007fdf176720 x0 : 00000000ffffff9c

Checking for errors:

sudo fsck -y /dev/sda
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda
The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem.  If the device is valid and it really contains an ext2/ext3/ext4 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>

Also tested on my PC (Manjaro), checked for errors with e2fsck and it is all ok.

For the record, this HDD was connected to a Raspi 1 and working just fine.

Am I missing something?

Thanks in advance.

danilo-jlle commented 3 years ago

Update: After recreating the partition table (fdisk) and recreating the filesystem (mkfs -t ext4) it mounts perfectly.

danilo-jlle commented 3 years ago

After recreating the partition table (fdisk) and recreating the filesystem (mkfs -t ext4) it mounts perfectly.