Summary of how to connect an M.2 SSD to a Raspberry Pi 5 and set it as a boot disk, and also tested compatible SSDs and differences in transfer speeds for each SSD
Raspberry Pi 5 – Raspberry Pi
https://www.raspberrypi.com/products/raspberry-pi-5/
NVMe SSD boot with the Raspberry Pi 5 - Geekworm Wiki
https://wiki.geekworm.com/NVMe_SSD_boot_with_the_Raspberry_Pi_5
·table of contents
◆1: Preface to technical standards
◆2: HAT that converts PCIe to M.2
◆3: Steps to set M.2 SSD as boot disk
◆4: Check compatibility with 5 types of SSDs
◆5: I measured the transfer speed
◆1: Preface to technical standards
The Raspberry Pi 5 used this time was sent directly to the GIGAZINE editorial department by the Raspberry Pi Foundation and has not been certified as conforming to technical standards. Therefore, we are filing a notice under the ' Special System for Experiments Using Uncertified Equipment .' In Japan, the Raspberry Pi 5 is scheduled to be released after the agency applies for technical standards.
◆2: HAT that converts PCIe to M.2
To make the Raspberry Pi recognize the M.2 SSD, you need a PCIe to M.2 conversion board (HAT). This time, I bought the Geekworm 'X1000 Pcie M.2 Key-M NVMe SSD PIP PCIe Peripheral Board for Raspberry Pi 5 (hereinafter referred to as X1000)'.
Geekworm X1000 Pcie M.2 Key-M NVMe SSD PIP PCIe Peripheral Board for R
The X1000 package looks like this.
Inside the box were the X1000 unit itself, a connection cable, and screws for fixing the SSD.
This is what it looks like when you attach the X1000 to a Raspberry Pi.
I installed a
◆3: Steps to set M.2 SSD as boot disk
Once you have connected the SSD, you will be able to boot from the SSD by following the steps: 'Get Raspberry Pi to recognize the SSD,' 'Install Raspberry Pi OS on the SSD,' and 'Switch the startup disk.'
・Get Raspberry Pi to recognize the SSD
First, insert the SSD and the microSD card with Raspberry Pi OS installed into the Raspberry Pi and boot it up.
Once the system has booted, add the following two lines to '/boot/config.txt'.
[code]dtparam=pciex1
dtparam=nvme
[/code]
After adding the two lines and saving, reboot your system.
・Install Raspberry Pi OS on SSD
Next, install the Raspberry Pi OS onto the SSD. There are several ways to install the OS, but this time we will install it by 'copying the entire contents of the microSD card to the SSD'.
First, click “SD Card Copier” in the “Accessories” menu of the Raspberry Pi to launch it.
When SD Card Copier starts, specify the source microSD card in 'Copy From Device' and the destination SSD in 'Copy To Device'. Then check 'New Partition UUIDs' and click 'Start'.
When the warning 'All contents of the SSD will be erased' appears, click 'Yes'.
Wait a while until the copy is complete.
Once copying is complete, click 'OK' to exit SD Card Copier.
Switching the startup disk
Once the SSD is prepared, you can rewrite the EEPROM to make the system bootable from the SSD. To rewrite the EEPROM, run the following command:
[code]sudo rpi-eeprom-config --edit[/code]
Once the configuration file is open in an editor, change 'BOOT_ORDER=0xf41' to 'BOOT_ORDER=0xf416' and save the file.
After rewriting the EEPROM, shut down the system, remove the microSD card, and boot again.
This should have allowed the system to boot from the SSD, but this time an error occurred and it would not boot.
After checking the Geekworm forum, I found
[code]sudo rpi-eeprom-config --edit[/code]
I rebooted the computer and the OS started up successfully.
◆4: Check compatibility with 5 types of SSDs
When combining Raspberry Pi with the X1000, it may not be possible to recognize some types of SSDs. Therefore, we prepared five types of SSDs, '
As a result of the testing, the three types of drives, 'Solidigm P41 Plus 512GB', 'Samsung 950 PRO 256GB', and 'WD Black SN750', were able to boot the system without any problems.
On the other hand, the Monster Storage MS950 2TB and Intel Optane 16GB were not recognized. Note that the X1000 shipped at the time of writing has a different design from the one used this time, so there may be differences in the SSDs that can be recognized.
◆5: I measured the transfer speed
To verify how much faster it is possible to boot the system from an SSD, we will compare the transfer speeds of the microSD card 'SUNEAST ULTIMATE PRO 64GB' with three types of SSDs.
The transfer speed is measured using a benchmark tool
[code]sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash[/code]
First, the measurement results for the microSD card 'SUNEAST ULTIMATE PRO 64GB' are as follows.
test | SUNEAST ULTIMATE PRO 64GB |
---|---|
HDParm Disk Read | 90.06 MB/s |
HDParm Cached Disk Read | 84.92MB/s |
DD Disk Write | 73.9MB/s |
FIO 4k random read | 6301 IOPS (25206 KB/s) |
FIO 4k random write | 2760 IOPS (11040 KB/s) |
IOZone 4k read | 28098 KB/s |
IOZone 4k write | 14015 KB/s |
IOZone 4k random read | 20072 KB/s |
IOZone 4k random write | 13969 KB/s |
Score | 3905 |
Next, the test results for the Solidigm P41 Plus 512GB are as follows. In all items, it recorded values that were overwhelmingly faster than the microSD card.
test | Solidigm P41 Plus 512GB |
---|---|
HDParm Disk Read | 436.50 MB/s |
HDParm Cached Disk Read | 433.61 MB/s |
DD Disk Write | 254MB/s |
FIO 4k random read | 105567 IOPS (422268 KB/s) |
FIO 4k random write | 55501 IOPS (222005 KB/s) |
IOZone 4k read | 124515 KB/s |
IOZone 4k write | 145062 KB/s |
IOZone 4k random read | 68056 KB/s |
IOZone 4k random write | 153531 KB/s |
Score | 33144 |
Although the Raspberry Pi 5 officially supports PCIe 2.0, you can force it to connect with PCIe 3.0 by adding the line 'dtparam=pciex1_gen=3' to '/boot/config.txt'. The results of measuring the transfer speed of the 'Solidigm P41 Plus 512GB' with a PCIe 3.0 connection are shown below. All items are faster than PCIe 2.0.
test | Solidigm P41 Plus 512GB |
---|---|
HDParm Disk Read | 750.34MB/s |
HDParm Cached Disk Read | 737.25MB/s |
DD Disk Write | 355MB/s |
FIO 4k random read | 113149 IOPS (452596 KB/s) |
FIO 4k random write | 59708 IOPS (238833 KB/s) |
IOZone 4k read | 153439 KB/s |
IOZone 4k write | 184383 KB/s |
IOZone 4k random read | 74630 KB/s |
IOZone 4k random write | 232813 KB/s |
Score | 43776 |
Since we found that the PCIe 3.0 connection enables faster transfer speeds, we also measured the transfer speeds of the 'Samsung 950 PRO 256GB' and 'WD Black SN750' using PCIe 3.0 connections, and summarized the transfer speeds of the four types of storage in a table.
test | SUNEAST ULTIMATE PRO 64GB | Solidigm P41 Plus 512GB | Samsung 950 PRO 256GB | WD Black SN750 |
---|---|---|---|---|
HDParm Disk Read | 90.06 MB/s | 750.34MB/s | 681.17MB/s | 847.31 MB/s |
HDParm Cached Disk Read | 84.92MB/s | 737.25MB/s | 629.75MB/s | 827.47MB/s |
DD Disk Write | 73.9MB/s | 355MB/s | 371MB/s | 371MB/s |
FIO 4k random read | 6301 IOPS (25206 KB/s) | 113149 IOPS (452596 KB/s) | 172100 IOPS (688403 KB/s) | 96603 IOPS (386415 KB/s) |
FIO 4k random write | 2760 IOPS (11040 KB/s) | 59708 IOPS (238833 KB/s) | 59362 IOPS (237449 KB/s) | 59708 IOPS (238833 KB/s) |
IOZone 4k read | 28098 KB/s | 153439 KB/s | 185135 KB/s | 177499 KB/s |
IOZone 4k write | 14015 KB/s | 184383 KB/s | 134749 KB/s | 169424 KB/s |
IOZone 4k random read | 20072 KB/s | 74630 KB/s | 50434 KB/s | 53822 KB/s |
IOZone 4k random write | 13969 KB/s | 232813 KB/s | 149835 KB/s | 219808 KB/s |
Score | 3905 | 43776 | 36818 | 41236 |
The graph below shows the data in units of 'MB/s.' Click on the graph to see a larger image. Although the speed varies depending on the type of SSD, all SSDs were able to transfer data at a much faster rate than microSD cards.
Continued
The official Raspberry Pi SSD was released on October 23, 2024. A review article on combining the official SSD and the official HAT to connect to the Raspberry Pi 5 can be found at the following link.
Summary of steps to connect the official SSD to Raspberry Pi 5 and set it as a boot disk & speed comparison of SSD and microSD card - GIGAZINE
◆Please tell us what you would like us to review about the Raspberry Pi 5!
Please tell us at the links below what you would like us to try, such as 'Try doing this and see what happens!', 'Can you do this?', or 'What happens in this situation?', as we will actually be using the product. It's okay if the content overlaps with that of other people, in fact the more we hear the more helpful it is, because it lets us know 'I guess these are the points that people are concerned about after all.' And it will be reflected in the next review article and will be useful!
• Discord | 'The Raspberry Pi 5 has arrived at the GIGAZINE editorial department, so we're going to review it, but what do you want to know?' | GIGAZINE
Related Posts: