SATA mounts only every second start

I have Banana pi M3 with:

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.4 LTS
Release:	22.04
Codename:	jammy

I wanted to mount an external drive on SATA port, but it is mounting only every second start. Trying to mount it manuel fails with hanging of the mount process. dmesg -T shows the disk:

[So Feb 18 09:12:15 2024] scsi 0:0:0:0: Direct-Access     ST500LT0 12-1DG142        0016 PQ: 0 ANSI: 4
[So Feb 18 09:12:15 2024] sd 0:0:0:0: Attached scsi generic sg0 type 0
[So Feb 18 09:12:15 2024] sd 0:0:0:0: [sda] 976773164 512-byte logical blocks: (500 GB/466 GiB)
[So Feb 18 09:12:15 2024] sd 0:0:0:0: [sda] Write Protect is off
[So Feb 18 09:12:15 2024] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[So Feb 18 09:12:15 2024] sd 0:0:0:0: [sda] No Caching mode page found
[So Feb 18 09:12:15 2024] sd 0:0:0:0: [sda] Assuming drive cache: write through
[So Feb 18 09:12:16 2024]  sda: sda1
[So Feb 18 09:12:16 2024] sd 0:0:0:0: [sda] Attached SCSI disk

First i thought the drive has a damage, but other drives failed too. Can anybody confirm that behavior ?

Kernel is communicating with Hardware, not “Ubuntu”. Nobody know what you are running …

Sorry, uname -a say: Linux bananapim3 5.16.11-sunxi #22.02.1 SMP Sun Feb 27 09:17:03 UTC 2022 armv7l armv7l armv7l GNU/Linux

Some very old kernel that nobody knows much about … Try here for start: Bananapi M3 – Armbian Not warranty that it will work, but this is what you should try first.

Ok, it starts from SD, but it is not for EMMC ? I tried Armbian Jammy with:

dd if=/path/to/image.img of=/dev/mmcblk2

But it does not start. Did i miss something ?

No idea, this is very old stuff. In any case, installation to eMMC works this way. https://docs.armbian.com/User-Guide_Getting-Started/#how-to-install-to-emmc-sata-nvme-usb

If not, then its possible that emmc chip is not supported by boot loader, something else … attache UART and see what you get.

Ok, i deleted the /dev/mmcblk2 and made a new partition with ext4 filesystem. Then i have new Options in armbian-install named: “Boot from eMMC - system on eMMC” but it gives me Errors:

Error: Could not stat device mmcblk2 /dev/mmcblk2 - No such file or directory. Error: Could not stat device mmcblk2 /dev/mmcblk2 - No such file or directory. mount: /mnt/armbian-install.cgBDNB/rootfs: special device mmcblk2 /dev/mmcblk2p1 does not exist. mount: /mnt/armbian-install.cgBDNB/bootfs: special device mmcblk2 /dev/mmcblk2p1 does not exist.

fdisk -l say:

Disk /dev/mmcblk2: 7,28 GiB, 7818182656 bytes, 15269888 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: 0x8aa5ce97

Device Boot Start End Sectors Size Id Type

/dev/mmcblk2p1 2048 15269887 15267840 7,3G 83 Linux

Disk /dev/mmcblk2boot0: 4 MiB, 4194304 bytes, 8192 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

Disk /dev/mmcblk2boot1: 4 MiB, 4194304 bytes, 8192 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

But armbian-install is just a bash script, maybe i can find the error there.

Edit: After rebooting i can try one time with armbian-install, if it fails i have to reboot to give another try. After deleting some big files. it is copying to eMMC now. Finished, but not booting without SD. I will use eMMC as Swap.

It must work. Please consider consulting armbian forum for further advices. HW makers has little to do with this.

I tried again, but it does not work. Then i choose boot from SD and system on SATA, this works. Choosing boot on SD and system on eMMC works. But not booting without SD. I made dist-upgrade, Banana Pi hangs by installing u-boot. No reaction, even with keyboard. I flash SD again, but now Banana Pi does not boot anymore. Not from SD or other. I think, the upgrade killed something. But thanks for your help.