{"id":515,"date":"2024-03-06T22:30:52","date_gmt":"2024-03-06T21:30:52","guid":{"rendered":"https:\/\/jbsoft.nl\/site\/?p=515"},"modified":"2024-03-11T12:16:37","modified_gmt":"2024-03-11T11:16:37","slug":"home-assistant-on-raspberry-pi-5-with-nvme-pcie-ssd","status":"publish","type":"post","link":"https:\/\/jbsoft.nl\/site\/home-assistant-on-raspberry-pi-5-with-nvme-pcie-ssd\/","title":{"rendered":"Home Assistant on Raspberry Pi 5 with NVMe PCIe SSD"},"content":{"rendered":"\n<p>Recently <a href=\"https:\/\/www.home-assistant.io\/blog\/2024\/02\/26\/home-assistant-os-12-support-for-raspberry-pi-5\/\" target=\"_blank\" rel=\"noreferrer noopener\">Raspberry Pi 5 support was added for Home Assistant OS<\/a>. The new model is twice as fast as its predecessor and add new features like a PCIe bus. The <a href=\"https:\/\/community.home-assistant.io\/t\/expected-support-for-home-assistant-os-on-the-raspberry-pi-5\" target=\"_blank\" rel=\"noreferrer noopener\">discussion started<\/a> on how to use NVMe SSD&#8217;s directly connected to the PCIe bus.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">M2 PCIe <code>hats<\/code> for Raspberry Pi 5<\/h2>\n\n\n\n<p>There are several PCIe hats you can buy, but there is no official Raspberry Pi hat yet, but there is an official Raspberry 5 case and Active Cooler.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"400\" src=\"https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/488f4e12-de49-4297-bbc6-c3753c060d40_CaseWhite.webp\" alt=\"\" class=\"wp-image-517\" style=\"width:223px;height:auto\" srcset=\"https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/488f4e12-de49-4297-bbc6-c3753c060d40_CaseWhite.webp 600w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/488f4e12-de49-4297-bbc6-c3753c060d40_CaseWhite-300x200.webp 300w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/488f4e12-de49-4297-bbc6-c3753c060d40_CaseWhite-18x12.webp 18w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/Active-Cooler-scaled-1-1024x683.jpg\" alt=\"\" class=\"wp-image-518\" style=\"width:223px;height:auto\" srcset=\"https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/Active-Cooler-scaled-1-1024x683.jpg 1024w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/Active-Cooler-scaled-1-300x200.jpg 300w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/Active-Cooler-scaled-1-768x512.jpg 768w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/Active-Cooler-scaled-1-1536x1024.jpg 1536w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/Active-Cooler-scaled-1-2048x1366.jpg 2048w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/Active-Cooler-scaled-1-18x12.jpg 18w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/Active-Cooler-scaled-1-1200x800.jpg 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<p>The Raspberry Pi + Active cooler fits in the case if you remove the standard fan.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/pi-case-active-cooler-1024x683.jpeg\" alt=\"\" class=\"wp-image-519\" style=\"width:589px;height:auto\" srcset=\"https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/pi-case-active-cooler-1024x683.jpeg 1024w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/pi-case-active-cooler-300x200.jpeg 300w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/pi-case-active-cooler-768x512.jpeg 768w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/pi-case-active-cooler-18x12.jpeg 18w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/pi-case-active-cooler-1200x801.jpeg 1200w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/pi-case-active-cooler.jpeg 1400w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<p>An option is to attach an SSD over USB3. This works okay, but the performance is limited  for NVMe PCIe SSD&#8217;s that have higher throughput than SATA SSD drives.<\/p>\n\n\n\n<p>The Raspberry Pi 5 now brings a second alternative by allowing to connect an NVMe SSD directly to the PCIe connector.<\/p>\n\n\n\n<p>An M2 hat exists that directly connects to the PCIe port and also fits inside the original Raspberry Pi 5 case, together with the original Raspberry Pi active cooler.<\/p>\n\n\n\n<p>The <a href=\"https:\/\/wiki.geekworm.com\/X1003\" data-type=\"link\" data-id=\"https:\/\/wiki.geekworm.com\/X1003\" target=\"_blank\" rel=\"noreferrer noopener\">Geekworm X1003<\/a> mounts on top of the Raspberry Pi 5 and active cooler and even allows to install the top cover (if that is desired).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7411-1024x1024.jpg\" alt=\"\" class=\"wp-image-521\" style=\"width:435px;height:auto\" srcset=\"https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7411-1024x1024.jpg 1024w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7411-300x300.jpg 300w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7411-150x150.jpg 150w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7411-768x768.jpg 768w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7411-12x12.jpg 12w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7411-1200x1200.jpg 1200w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7411.jpg 1280w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7418-1024x1024.jpg\" alt=\"\" class=\"wp-image-522\" srcset=\"https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7418-1024x1024.jpg 1024w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7418-300x300.jpg 300w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7418-150x150.jpg 150w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7418-768x768.jpg 768w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7418-12x12.jpg 12w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7418-1200x1200.jpg 1200w, https:\/\/jbsoft.nl\/site\/wp-content\/uploads\/2024\/03\/1280px-X1003-x1003-IMG-7418.jpg 1280w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Install an NVMe SSD<\/h2>\n\n\n\n<p>The Geekworm X1003 fits 2242 (42 mm) and 2230 (30mm) size NMVe SSD&#8217;s. There is a nut at the 2242 position, but you might be needing a soldering iron if you want to move the nut to the 2230 position.<\/p>\n\n\n\n<p>At the moment most nVME SSD&#8217;s are 2280, and for that size you need a different hat, e.g. the Geekworm X1001 or X1002, but those will not fit into the original case. I found a cheap <a href=\"https:\/\/www.amazon.nl\/Samsung-PM991-MZALQ256HAJD-MZ-ALQ2560-behuizing\/dp\/B08K79T9G5\" data-type=\"link\" data-id=\"https:\/\/www.amazon.nl\/Samsung-PM991-MZALQ256HAJD-MZ-ALQ2560-behuizing\/dp\/B08K79T9G5\">SAMSUNG 2242 SSD at Amazon<\/a>. This model uses a feature named HMB (Host Memory Buffer) which requires some extra  attention which I will address later. After we have mounted the SSD (make sure the PCI FFC cable is installed correctly) we can continue with the next step.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Preparing the installation<\/h2>\n\n\n\n<p>To install Home Assistant OS we use the imager that is installed by default on the Raspberry PI OS image.<\/p>\n\n\n\n<p>So to start we need an SD-card with <strong>Raspberry PI OS <\/strong>flashed on it, do not flash Home Assistant OS on the SD card.<\/p>\n\n\n\n<p>We can prepare this using the <a href=\"https:\/\/www.raspberrypi.com\/software\/\" target=\"_blank\" rel=\"noreferrer noopener\">Official Raspberry PI imager<\/a>. After the prepared SD card is installed in or Raspberry Pi 5 we can boot the Raspberry PI OS. When the OS is started we should be able to see if the NVMe SSD is recognized. To make sure the SSD works without issues we can use the <code>dmesg<\/code>  command. If there are issues with you SSD you will see the errors in the bootlog this command shows.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Identify possible NMVe SSD issues<\/h2>\n\n\n\n<p>In my case there were a few issues I needed to address. I needed to &#8230;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>&#8230; disable PCIe power management (at least I thought that was a good idea). <\/li>\n\n\n\n<li>.. enable the <code>pcie<\/code>-port on the Raspberry Pi<\/li>\n\n\n\n<li>&#8230; enable <code>gen3<\/code> mode<\/li>\n\n\n\n<li>.. increase the CMA buffer to ensure enough continues memory for the Host Memory Buffer feature <\/li>\n<\/ul>\n\n\n\n<p>If you see no NVMe SSD popping up at all, then that could be mean that&#8230;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>&#8230; your the FFC cable between board and M2 head is not connected properly.<\/li>\n\n\n\n<li>&#8230; your SDD is not probed correctly and you need to add <code>PCIE_PROBE<\/code> to your EEPROM config first.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>~# sudo rpi-eeprom-config --edit\n# Add the following line if using a non-HAT+ adapter:\nPCIE_PROBE=1<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Disable PCIe power management<\/h3>\n\n\n\n<p>We can disable <code>pcie<\/code> power management. When we know that the SSD is always on, and we see errors like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;22609.179027] nvme 0000:01:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Transmitter ID)\n&#91;22609.179031] nvme 0000:01:00.0: device &#91;1d79:2263] error status\/mask=00009100\/0000e000\n&#91;22609.179035] nvme 0000:01:00.0: &#91; 8] Rollover\n&#91;22609.179039] nvme 0000:01:00.0: &#91;12] Timeout<\/code><\/pre>\n\n\n\n<p>To disable <code>pcie<\/code> power management as <code>root<\/code> we need to edit <code><a href=\"https:\/\/www.raspberrypi.com\/documentation\/computers\/config_txt.html#cmdline\" target=\"_blank\" rel=\"noreferrer noopener\">\/boot\/firmware\/cmdline.txt<\/a><\/code> and add <code>pcie_aspm=off<\/code> to the command line.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Enable the PCIe port on the Raspberry Pi<\/h3>\n\n\n\n<p>Most likely this needed at all times. To enable the <code>pcie<\/code>-port as <code>root<\/code> we need to edit the <code><a href=\"https:\/\/www.raspberrypi.com\/documentation\/computers\/config_txt.html#what-is-config-txt\" target=\"_blank\" rel=\"noreferrer noopener\">config.txt<\/a><\/code> containing the kernel configuration. As root you can also edit the following the file directly: <code>\/boot\/firmware\/config.txt<\/code><\/p>\n\n\n\n<p>To enable <code>pcie<\/code> add the following lines:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dtparam=pciex1\ndtparam=nvme<\/code><\/pre>\n\n\n\n<p>If you still have errors in you log you could also enable <code>gen3<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Enable the PCIe gen3 mode on the Raspberry Pi<\/h3>\n\n\n\n<p>The PCIe <code>gen3<\/code> mode is not officially supported, so only enable this if your SSD does not work correctly without it.<\/p>\n\n\n\n<p>To enable as <code>root<\/code> we need to edit the <code><a href=\"https:\/\/www.raspberrypi.com\/documentation\/computers\/config_txt.html#what-is-config-txt\" target=\"_blank\" rel=\"noreferrer noopener\">config.txt<\/a><\/code> add the following line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dtparam=pciex1_gen=3<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Increase the CMA buffer<\/h3>\n\n\n\n<p>In case <code>dmesg<\/code> shows <code>cma_allocation<\/code> errors like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;    0.514198] nvme nvme0: Shutdown timeout set to 8 seconds\n&#91;    0.516601] nvme nvme0: allocated 64 MiB host memory buffer.\n<strong>&#91;    0.519481] cma: cma_alloc: linux,cma: alloc failed, req-size: 2 pages, ret: -12\n&#91;    0.519494] cma: cma_alloc: linux,cma: alloc failed, req-size: 8 pages, ret: -12\n&#91;    0.519506] cma: cma_alloc: linux,cma: alloc failed, req-size: 2 pages, ret: -12\n&#91;    0.519513] cma: cma_alloc: linux,cma: alloc failed, req-size: 8 pages, ret: -12\n&#91;    0.519523] cma: cma_alloc: linux,cma: alloc failed, req-size: 2 pages, ret: -12\n&#91;    0.519530] cma: cma_alloc: linux,cma: alloc failed, req-size: 8 pages, ret: -12\n&#91;    0.519539] cma: cma_alloc: linux,cma: alloc failed, req-size: 2 pages, ret: -12\n&#91;    0.519546] cma: cma_alloc: linux,cma: alloc failed, req-size: 8 pages, ret: -12<\/strong>\n&#91;    0.519735] nvme nvme0: 4\/0\/0 default\/read\/poll queues\n&#91;    0.525784] nvme nvme0: Ignoring bogus Namespace Identifiers\n&#91;    0.531980]  nvme0n1: p1 p2 p3 p4 p5 p6 p7 p8\n&#91;    0.519735] nvme nvme0: 4\/0\/0 default\/read\/poll queues\n&#91;    0.525784] nvme nvme0: Ignoring bogus Namespace Identifiers\n&#91;    0.531980]  nvme0n1: p1 p2 p3 p4 p5 p6 p7 p8\n&#91;    0.619473] brcm-pcie 1000120000.pcie: link up, 5.0 GT\/s PCIe x4 (!SSC)\n&#91;    0.619497] pci 0001:01:00.0: &#91;1de4:0001] type 00 class 0x020000\n&#91;    0.619514] pci 0001:01:00.0: reg 0x10: &#91;mem 0xffffc000-0xffffffff]\n&#91;    0.619524] pci 0001:01:00.0: reg 0x14: &#91;mem 0xffc00000-0xffffffff]\n&#91;    0.619533] pci 0001:01:00.0: reg 0x18: &#91;mem 0xffff0000-0xffffffff]\n&#91;    0.619605] pci 0001:01:00.0: supports D1\n&#91;    0.619609] pci 0001:01:00.0: PME# supported from D0 D1 D3hot D3cold\n&#91;    0.631479] pci_bus 0001:01: busn_res: &#91;bus 01-ff] end is updated to 01<\/code><\/pre>\n\n\n\n<p>I had these errors due to the HMB (Host Memory Buffer) feature that needed more that the standard configured <code>cma<\/code> memory.<\/p>\n\n\n\n<p>To increase the <code>cma<\/code> memory buffer I increased the default allocation of 64 MB to 96 MB.<\/p>\n\n\n\n<p>As <code>root<\/code> we can edit the <code><a href=\"https:\/\/www.raspberrypi.com\/documentation\/computers\/config_txt.html#what-is-config-txt\" target=\"_blank\" rel=\"noreferrer noopener\">config.txt<\/a><\/code> add the following line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dtoverlay=cma,cma-96<\/code><\/pre>\n\n\n\n<p>It is possible to enable a larger block, but we should not allocate more than needed. To see the free <code>cma<\/code> memory as root we can use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># cat \/proc\/meminfo | grep -i cma\nCmaTotal:          98304 kB\nCmaFree:           15684 kB<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Preparing Home Assistant OS on the NVMe SSD<\/h3>\n\n\n\n<p>When we have configured our SSD and have resolved any issues, then we can flash the NVMe with Home Assistant OS. We use the preinstalled <a href=\"https:\/\/www.home-assistant.io\/installation\/raspberrypi#write-the-image-to-your-sd-card\" data-type=\"link\" data-id=\"https:\/\/www.home-assistant.io\/installation\/raspberrypi#write-the-image-to-your-sd-card\" target=\"_blank\" rel=\"noreferrer noopener\">Raspberry Pi <code>imager<\/code><\/a> that is installed by default on Raspberry Pi OS and can be found in the accessories menu. Note you can set some options that allow to set WiFi and hostname in advance. Other settings we need te set manually after the image has been flashed. Make sure the NVMe SDD is flashed correctly. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Adjusting boot order, kernel parameters and configuration<\/h2>\n\n\n\n<p>After flashing Home Assistant OS, we need to adjust the boot order and the make sure Home Assistant OS uses the same <code>config.txt<\/code> and <code>cmdline.txt<\/code> as we prepped for Raspberry PI OS. There are files in the image we need to adjust before we can boot from the new image, as for now it is not possible yet to apply these settings from the UI. To access the these files we need to mount the right partition. In my case the NVMe was called <code>nvme0n1<\/code>. If you are not sure about the name of your drive as root you can use the command <code>fdisk -l<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>~# fdisk -l\n...\n<em>other drive info<\/em>\n...\nDisk \/dev\/nvme0n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors\nDisk model: SAMSUNG MZAL4256HBJD-00BL2\nUnits: sectors of 1 * 512 = 512 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\nDisklabel type: gpt\nDisk identifier: DFEFDCBD-D15E-4E82-B88C-5E6B46166328\n\nDevice           Start       End   Sectors   Size Type\n\/dev\/nvme0n1p1    2048    133119    131072    64M EFI System\n\/dev\/nvme0n1p2  133120    182271     49152    24M Linux filesystem\n\/dev\/nvme0n1p3  182272    706559    524288   256M Linux filesystem\n\/dev\/nvme0n1p4  706560    755711     49152    24M Linux filesystem\n\/dev\/nvme0n1p5  755712   1279999    524288   256M Linux filesystem\n\/dev\/nvme0n1p6 1280000   1296383     16384     8M Linux filesystem\n\/dev\/nvme0n1p7 1296384   1492991    196608    96M Linux filesystem\n\/dev\/nvme0n1p8 1492992 500118158 498625167 237.8G Linux filesystem<\/code><\/pre>\n\n\n\n<p>To access <code>config.txt<\/code> and <code>cmdline.txt<\/code> we mount the first partition:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>~# mkdir boot\n~# mount -t vfat \/dev\/nvme0n1p1 ~\/boot\n~# cd boot\n~# ls<\/code><\/pre>\n\n\n\n<p>Use the same settings that were okay for Raspberry PI OS, and we should be okay.<\/p>\n\n\n\n<p>Finally we change the boot sequence so the Raspberry Pi will boot from the SSD. The code below shows how to do that:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Edit the EEPROM on the Raspberry Pi 5.\nsudo rpi-eeprom-config --edit\n\n# Change the BOOT_ORDER line to:\nBOOT_ORDER=0xf461\n# This will try SD card first, then NVMe and finally USB\n\n# Add the following line if using a non-HAT+ adapter:\nPCIE_PROBE=1\n\n# Press Ctrl-O, then enter, to write the change to the file.\n# Press Ctrl-X to exit nano (the editor).<\/code><\/pre>\n\n\n\n<p>For me it was not needed to add <code>PCIE_PROBE<\/code>.  The order is read right to left. So <code>0xf416<\/code> will firts try 6=NVMe, then 1=sd card, then 4=USB and finally f=restart the loop. As you can see in the example, I used <code>0xf461<\/code> as boot order, because I prefer I can easily boot from SD card, without the need to remove the NMVe SSD, if that is needed for rescue actions.<\/p>\n\n\n\n<p>More documentation about the boot order options can be found here: <a href=\"https:\/\/www.raspberrypi.com\/documentation\/computers\/raspberry-pi.html#BOOT_ORDER\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.raspberrypi.com\/documentation\/computers\/raspberry-pi.html#BOOT_ORDER<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Boot Home Assistant from NVMe SSD<\/h2>\n\n\n\n<p>When the boot order includes the NMVe as the virst valid boot option, we can try booting the flashed NMVe SSD.<\/p>\n\n\n\n<p>The Home Assistant instance should intialize at <a href=\"http:\/\/homeassistant.local:8123\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/homeassistant.local:8123<\/a>. It may take some minutes to intialize. If you have a suitable HDMI cable and a keyboard and mouse you can get access to the Home Assistant CLI.<\/p>\n\n\n\n<p>To see if there are errors you can excecute <code>dmesg<\/code> to see the boot log. To know if there are any PCIe run time errors you can use <code>ha host logs -f<\/code>. When useing the CLI from the console you can omit <code>ha<\/code>, so <code>host logs -f<\/code> or <code>host logs<\/code> should just work. If you set up SSH when flasing the image, you should also be able to use SSH to open the CLI.<\/p>\n\n\n\n<p>If every thing is fine, you can start setting up Home Assistant or restore from a backup, but make sure that when you restore from a backup that the same supervisor version is used, or the backup restore will fail. To update to specific version from the CLI use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ha supervisor update --version 2024.03.0<\/code><\/pre>\n\n\n\n<p>To just update to the latest version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ha supervisor update<\/code><\/pre>\n\n\n\n<p>Restoring from backup can take quite some time if the backup file is large. The UI does no show much detail on the progress. To see some more details you can check the supervisor logs. If anything went wrong you will able to see it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ha supervisor logs<\/code><\/pre>\n\n\n\n<p>And that is all: Enjoy your Home Assistant installation on Raspberry Pi 5 and NVMe SSD!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently Raspberry Pi 5 support was added for Home Assistant OS. The new model is twice as fast as its predecessor and add new features like a PCIe bus. The discussion started on how to use NVMe SSD&#8217;s directly connected to the PCIe bus. M2 PCIe hats for Raspberry Pi 5 There are several PCIe &hellip; <a href=\"https:\/\/jbsoft.nl\/site\/home-assistant-on-raspberry-pi-5-with-nvme-pcie-ssd\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Home Assistant on Raspberry Pi 5 with NVMe PCIe SSD&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":527,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6],"tags":[9,33,32,31],"class_list":["post-515","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-home-assistant","category-home-automation","tag-homeassistant","tag-how-to","tag-nmve","tag-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/posts\/515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/comments?post=515"}],"version-history":[{"count":12,"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/posts\/515\/revisions"}],"predecessor-version":[{"id":537,"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/posts\/515\/revisions\/537"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/media\/527"}],"wp:attachment":[{"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/media?parent=515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/categories?post=515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jbsoft.nl\/site\/wp-json\/wp\/v2\/tags?post=515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}