Lixold
Posts: 4
Joined: Tue Feb 20, 2024 3:50 pm

NVMe storage not recognized

Tue Feb 20, 2024 3:58 pm

Hello everyone,

I am new to the world of Raspberry and have bought a Raspberry Pi 5. I need more storage space for my projects than the SD cards can offer me, which is why I wanted to connect an alternative storage medium to the Raspberry. Thanks to the new PCIe connection on the Raspberry Pi 5, I saw the option of using it to connect a storage device. For this I bought an NVMe Hat from Pineberry (see https://pineberrypi.com/products/hat-to ... 0-for-rpi5) and an NVMe storage from Transcend MTS400S 1 TB Internal M.2 PCIe NVMe SSD 2242.

Before I started installing the Hat and NVMe storage, I first set up the Raspberry Pi 5 using the SD card slot. I use RasPI OS Lite in the latest version and use the Raspberry purely via SSH. Everything has worked great so far and I can access and configure the OS properly. Then I started working on the Hat and NVME memory. I screwed these onto the Raspberry and connected them with the PCIe FPC cable. Then I switched on the Raspberry again and immediately saw that the Hat was receiving power, as there is a corresponding LED on the Hat.

I then have to configure the OS so that the memory is recognized. I followed the instructions from RaspberryOS itself (see https://www.raspberrypi.com/documentati ... bling-pcie) and also from the manufacturer of the Hat (see https://docs.pineberrypi.com/tutorial-c ... r-hatdrive). Unfortunately, the memory was not recognized after the restart. After rummaging through several videos, forums and blogs to solve the problem myself, I have to admit defeat after several days and hope that someone in this forum can help me. To analyze the problem, I provide some information in the following sections that may help.

Current configuration of the boot/firmware/config.txt:

Code: Select all

...

[all]
# Enable the PCIe external connector
dtparam=pciex1

# Force Gen 3.0 speeds
dtparam=pciex1_gen=3
I had already tried it without PCIe Gen 3.0, the problem remains identical.
Current configuration of the rpi-eeprom-config:

Code: Select all

[all]
BOOT_UART=1
POWER_OFF_ON_HALT=0
BOOT_ORDER=0xf416
It is not currently booting from the NVMe storage because nothing has been copied or installed on it yet, so the RaspberryPi starts, tries to boot and then jumps to the SD card.

Code: Select all

dmesg | grep pcie

[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1  smsc95xx.macaddr=D8:3A:DD:E2:0F:A3 vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000  console=ttyAMA10,115200 console=tty1 root=PARTUUID=d2e5f867-02 rootfstype=ext4 fsck.repair=yes rootwait
[    1.501713] brcm-pcie 1000110000.pcie: host bridge /axi/pcie@110000 ranges:
[    1.508725] brcm-pcie 1000110000.pcie:   No bus range found for /axi/pcie@110000, using [bus 00-ff]
[    1.517842] brcm-pcie 1000110000.pcie:      MEM 0x1b00000000..0x1bfffffffb -> 0x0000000000
[    1.526154] brcm-pcie 1000110000.pcie:      MEM 0x1800000000..0x1affffffff -> 0x0400000000
[    1.534468] brcm-pcie 1000110000.pcie:   IB MEM 0x0000000000..0x0fffffffff -> 0x1000000000
[    1.543959] brcm-pcie 1000110000.pcie: setting SCB_ACCESS_EN, READ_UR_MODE, MAX_BURST_SIZE
[    1.552269] brcm-pcie 1000110000.pcie: Forcing gen 3
[    1.557297] brcm-pcie 1000110000.pcie: PCI host bridge to bus 0000:00
[    2.035799] brcm-pcie 1000110000.pcie: link down
[    2.060725] pcieport 0000:00:00.0: PME: Signaling with IRQ 39
[    2.066588] pcieport 0000:00:00.0: AER: enabled with IRQ 39
[    2.084051] brcm-pcie 1000120000.pcie: host bridge /axi/pcie@120000 ranges:
[    2.091046] brcm-pcie 1000120000.pcie:   No bus range found for /axi/pcie@120000, using [bus 00-ff]
[    2.100152] brcm-pcie 1000120000.pcie:      MEM 0x1f00000000..0x1ffffffffb -> 0x0000000000
[    2.108462] brcm-pcie 1000120000.pcie:      MEM 0x1c00000000..0x1effffffff -> 0x0400000000
[    2.116784] brcm-pcie 1000120000.pcie:   IB MEM 0x1f00000000..0x1f003fffff -> 0x0000000000
[    2.125094] brcm-pcie 1000120000.pcie:   IB MEM 0x0000000000..0x0fffffffff -> 0x1000000000
[    2.134589] brcm-pcie 1000120000.pcie: setting SCB_ACCESS_EN, READ_UR_MODE, MAX_BURST_SIZE
[    2.142901] brcm-pcie 1000120000.pcie: Forcing gen 2
[    2.147919] brcm-pcie 1000120000.pcie: PCI host bridge to bus 0001:00
[    2.307806] brcm-pcie 1000120000.pcie: link up, 5.0 GT/s PCIe x4 (!SSC)
[    2.424358] pcieport 0001:00:00.0: enabling device (0000 -> 0002)
[    2.430521] pcieport 0001:00:00.0: PME: Signaling with IRQ 40
[    2.436371] pcieport 0001:00:00.0: AER: enabled with IRQ 40

Code: Select all

lsusb

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Code: Select all

blkid

/dev/mmcblk0p1: LABEL_FATBOOT="bootfs" LABEL="bootfs" UUID="5DF9-E225" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="d2e5f867-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="3b614a3f-4a65-4480-876a-8a998e01ac9b" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="d2e5f867-02"
Thank you very much for your help,

Lixold

Paul-WB5AGF
Posts: 12
Joined: Thu Feb 22, 2024 1:28 am
Location: near Dallas, Texas

Re: NVMe storage not recognized

Sat Feb 24, 2024 12:10 am

Friday Afternoon
23 February 2024

Lixold;

Are you still having the problem ?

- Paul in Texas

destrybud
Posts: 1
Joined: Sat Feb 24, 2024 2:52 am

Re: NVMe storage not recognized

Sat Feb 24, 2024 3:05 am

Hello,

I'd be interested in hearing your solution om the matter. I'm about to try this out and interested in the same M.2 SSD.

-destrybud

Lixold
Posts: 4
Joined: Tue Feb 20, 2024 3:50 pm

Re: NVMe storage not recognized

Sat Feb 24, 2024 6:22 pm

Paul-WB5AGF wrote:
Sat Feb 24, 2024 12:10 am
Friday Afternoon
23 February 2024

Lixold;

Are you still having the problem ?

- Paul in Texas
Hello Paul,

yes i still facing the issue. I have now also ordered an m2 slot for my pc to plug the m2 memory into my main pc, but the slot is not there yet. I haven't found any other solutions yet.

Paul-WB5AGF
Posts: 12
Joined: Thu Feb 22, 2024 1:28 am
Location: near Dallas, Texas

Re: NVMe storage not recognized

Sun Feb 25, 2024 12:24 pm

Lixold;

I do not know if this (what I am about to mention) is relevant to the problem you are having.

I find that if I boot my Raspberry Pi 5 into UBUNTU 23.10 via USB from an external drive that the nvme memory device is not seen but if I boot into Raspberry Pi OS, also from a USB port (with the microSD card (containing Raspberry Pi OS) in an adapter) that the nvme memory device IS seen. This happens with dtparam=pciex1 set in the config.txt file in both the external drive containing the UBUNTU OS and the Raspberry Pi OS on the microSD card.

- Paul

Lixold
Posts: 4
Joined: Tue Feb 20, 2024 3:50 pm

Re: NVMe storage not recognized

Tue Feb 27, 2024 8:57 pm

Paul-WB5AGF wrote:
Sun Feb 25, 2024 12:24 pm
Lixold;

I do not know if this (what I am about to mention) is relevant to the problem you are having.

I find that if I boot my Raspberry Pi 5 into UBUNTU 23.10 via USB from an external drive that the nvme memory device is not seen but if I boot into Raspberry Pi OS, also from a USB port (with the microSD card (containing Raspberry Pi OS) in an adapter) that the nvme memory device IS seen. This happens with dtparam=pciex1 set in the config.txt file in both the external drive containing the UBUNTU OS and the Raspberry Pi OS on the microSD card.

- Paul
Hello Paul,

thank you very much for your advice. I have now tried different things again.

On the one hand I followed your advice and took a usb adapter with SD card slot and plugged it into the pi with the sd card, which I can already use successfully via the direct sd slot of Raspberry pi. but nothing happened at all, the boot process did not work. Even after I set the boot order and a sleep time in the boot process, this did not work and I could not finally try your tip.

The second thing I did was to get an NVME M2 enclosure with a USB port so that I could get the hard disk running without a PCIe HAT. But here too I have massive problems. I was able to connect and recognize the SSD on my "normal" computer and formatted it first (with exFAT). Then I plugged it into the Raspberry pi and it was recognized for the first time. I was also able to mount it and copy data to it. Then I installed it again in HAT and it was not recognized again. Now I thought I would leave it in the external housing with USB port and boot from it. I transferred the entire OS system to the SDD from the SD card and introduced the boot sequence and a sleep on boot, but the Raspberry PI does not boot via the USB port either. I don't know what the problem is, no matter which way I try to boot, it fails, except via the direct SD card slot of the Raspberry PI directly.

timg236
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1506
Joined: Thu Jun 21, 2018 4:30 pm

Re: NVMe storage not recognized

Tue Feb 27, 2024 9:28 pm

This sounds like an issue with how you are copying the data rather than it being an issue with the HAT. If so, you may get more help on the General Forum.

Please can you describe in detail how you copied the data from the SD to the NVMe drive.

Lixold
Posts: 4
Joined: Tue Feb 20, 2024 3:50 pm

Re: NVMe storage not recognized

Sat Mar 02, 2024 8:23 pm

timg236 wrote:
Tue Feb 27, 2024 9:28 pm
This sounds like an issue with how you are copying the data rather than it being an issue with the HAT. If so, you may get more help on the General Forum.

Please can you describe in detail how you copied the data from the SD to the NVMe drive.
I have never been able to copy anything to the NVME memory via PCIe because it is not recognized by the Raspberry at all, as described in my first post.

I have only managed to connect the memory via a USB adapter and have it recognized. I have tried two methods of copying so far. Once as a backup via "sudo dd bs=4M if=/dev/mmcblk0 of=/dev/sda" and once via "rpi-clone". However, in both cases I cannot boot the OS via USB using the NVME memory via USB.

User avatar
thagrol
Posts: 11319
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK

Re: NVMe storage not recognized

Sun Mar 03, 2024 1:18 am

This SSD: https://www.transcend-info.com/product/ ... sd/mts400s ?

That appears to be a SATA interfaced M.2 drive not an NVMe one. Those won't work with the Pi 5's PCIe as they require a SATA controller and there isn't one.
Knowledge, skills, & experience have value. If you expect to profit from someone's you should expect to pay for them.

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

Return to “HATs and other add-ons”