Note

Hello, welcome to the SunFounder Raspberry Pi & Arduino & ESP32 Enthusiasts Community on Facebook! Dive deeper into Raspberry Pi, Arduino, and ESP32 with fellow enthusiasts.

Why Join?

  • Expert Support: Solve post-sale issues and technical challenges with help from our community and team.

  • Learn & Share: Exchange tips and tutorials to enhance your skills.

  • Exclusive Previews: Get early access to new product announcements and sneak peeks.

  • Special Discounts: Enjoy exclusive discounts on our newest products.

  • Festive Promotions and Giveaways: Take part in giveaways and holiday promotions.

👉 Ready to explore and create with us? Click [here] and join today!

Copy OS from Micro SD to NVMe SSD

If you have an NVMe SSD but lack an adapter to connect it to your computer, you can opt for a third approach: initially install the system on your Micro SD card. After the Pironman 5 successfully boots up, you can then transfer the system from your Micro SD card to your NVMe SSD.

Complete the above steps before proceeding with the instructions below.

1. Enabling PCIe

By default the PCIe connector is not enabled.

  • To enable it you should open the /boot/firmware/config.txt file.

    sudo nano /boot/firmware/config.txt
    
  • Then add the following line to the file.

    # Enable the PCIe External connector.
    dtparam=pciex1
    
  • A more memorable alias for pciex1 exists, so you can alternatively add dtparam=nvme to the /boot/firmware/config.txt file.

    dtparam=nvme
    
  • The connection is certified for Gen 2.0 speeds (5 GT/sec), but you can force it to Gen 3.0 (10 GT/sec) if you add the following lines to your /boot/firmware/config.txt.

    # Force Gen 3.0 speeds
    dtparam=pciex1_gen=3
    

    Warning

    The Raspberry Pi 5 is not certified for Gen 3.0 speeds, and connections to PCIe devices at these speeds may be unstable.

  • Press Ctrl + X, Y and Enter to save the changes.

2. Install the OS on the SSD

There are two ways to install an operating system on the SSD:

Copying the System from the Micro SD Card to the SSD

  1. Connect a display or access the Raspberry Pi desktop through VNC Viewer. Then click Raspberry Pi logo -> Accessories -> SD Card Copier.

    ../_images/ssd_copy.png
  2. Make sure to select the correct Copy From and Copy To devices. Be careful not to mix them up.

    ../_images/ssd_copy_from.png
  3. Remember to select “NEW Partition UUIDs” to ensure the system can correctly distinguish devices, avoiding mounting conflicts and boot issues.

    ../_images/ssd_copy_uuid.png
  4. After selection, click Start.

    ../_images/ssd_copy_click_start.png
  5. You will be prompted that the content on the SSD will be erased. Make sure to back up your data before clicking Yes.

    ../_images/ssd_copy_erase.png
  6. Wait for some time, and the copying will be completed.

Installing the System with Raspberry Pi Imager

If your Micro SD card has a desktop version of the system installed, you can use an imaging tool (like Raspberry Pi Imager) to burn the system to the SSD. This example uses Raspberry Pi OS bookworm, but other systems might require installing the imaging tool first.

  1. Connect a display or access the Raspberry Pi desktop through VNC Viewer. Then click Raspberry Pi logo -> Accessories -> Imager.

    ../_images/ssd_imager.png
  2. Within the Raspberry Pi Imager, click Raspberry Pi Device and select the Raspberry Pi 5 model from the dropdown list.

    ../_images/ssd_pi5.png
  3. Select Operating System and opt for the recommended operating system version.

    ../_images/ssd_os.png
  4. In the Storage option, select your inserted NVMe SSD.

    ../_images/nvme_storage.png
  5. Click NEXT and then EDIT SETTINGS to tailor your OS settings.

    Note

    If you have a monitor for your Raspberry Pi, you can skip the next steps and click ‘Yes’ to begin the installation. Adjust other settings later on the monitor.

    ../_images/os_enter_setting.png
  6. Define a hostname for your Raspberry Pi.

    Note

    The hostname is your Raspberry Pi’s network identifier. You can access your Pi using <hostname>.local or <hostname>.lan.

    ../_images/os_set_hostname.png
  7. Create a Username and Password for the Raspberry Pi’s administrator account.

    Note

    Establishing a unique username and password is vital for securing your Raspberry Pi, which lacks a default password.

    ../_images/os_set_username.png
  8. Configure the wireless LAN by providing your network’s SSID and Password.

    Note

    Set the Wireless LAN country to the two-letter ISO/IEC alpha2 code corresponding to your location.

    ../_images/os_set_wifi.png
  9. To remotely connect to your Raspberry Pi, enable SSH in the Services tab.

    • For password authentication, use the username and password from the General tab.

    • For public-key authentication, choose “Allow public-key authentication only”. If you have an RSA key, it will be used. If not, click “Run SSH-keygen” to generate a new key pair.

    ../_images/os_enable_ssh.png
  10. The Options menu lets you configure Imager’s behavior during a write, including playing sound when finished, ejecting media when finished, and enabling telemetry.

    ../_images/os_options.png
  11. When you’ve finished entering OS customisation settings, click Save to save your customisation. Then, click Yes to apply them when writing the image.

    ../_images/os_click_yes.png
  12. If the NVMe SSD contains existing data, ensure you back it up to prevent data loss. Proceed by clicking Yes if no backup is needed.

    ../_images/nvme_erase.png
  13. When you see the “Write Successful” popup, your image has been completely written and verified. You’re now ready to boot a Raspberry Pi from the NVMe SSD!

    ../_images/nvme_install_finish.png

3. Configure boot from the SSD

In this section, we’ll configure your Raspberry Pi to boot directly from an NVMe SSD, providing faster boot times and improved performance over an SD card. Follow these steps carefully:

  1. First, open a terminal on your Raspberry Pi and run the following command to access the configuration interface:.

    sudo raspi-config
    
  2. In the raspi-config menu, use the arrow keys to navigate and select Advanced Options. Press Enter to access the advanced settings.

    ../_images/nvme_open_config.png
  3. Inside Advanced Options, select Boot Order. This setting allows you to specify the order in which your Raspberry Pi looks for bootable devices.

    ../_images/nvme_boot_order.png
  4. Then, choose NVMe/USB boot. This tells the Raspberry Pi to prioritize booting from USB-connected SSDs or NVMe drives over other options, such as the SD card.

    ../_images/nvme_boot_nvme.png
  5. After selecting the boot order, press Finish to exit raspi-config. You may also use the Escape key to close the configuration tool.

    ../_images/nvme_boot_ok.png
  6. To apply the new boot settings, reboot your Raspberry Pi by running sudo reboot.

    sudo raspi-config
    
    ../_images/nvme_boot_reboot.png

After rebooting, the Raspberry Pi should now attempt to boot from your connected NVMe SSD, providing you with enhanced performance and durability for your system.