blue-ox.nl From coffee-fueled fruity tech to fast runs—think different, let’s run them.

Troubleshooting: When your Raspberry Pi won’t boot from SD-card with M.2 SSD via HAT+ is attached

T

The Problem

When using a Raspberry Pi with an M.2 SSD connected via HAT+, you might encounter a situation where the Pi refuses to boot from the SD card. This becomes particularly problematic if there’s an issue with the SSD’s FSTAB configuration, potentially leaving your Pi unbootable.

Initial Symptoms

  • Pi only boots from M.2 SSD via HAT+
  • SD card boot works only when M.2 SSD is disconnected
  • Traditional solutions (Raspi-Config, boot file modifications) ineffective
  • Invalid FSTAB mount on M.2 SSD blocking boot process

Solution: Bootloader Update Process

Prerequisites

  • Raspberry Pi (Model 4 or 5)
  • Blank SD card
  • Raspberry Pi Imager software
  • Monitor and keyboard
  • Optional: M.2-SSD to USB-C adapter (for recovery purposes)

Step 1: Download and Prepare Recovery Image

# No actual commands needed - use Raspberry Pi Imager GUI:
# 1. Launch Raspberry Pi Imager
# 2. Click "Choose OS"
# 3. Navigate: Misc utility images > Bootloader (Pi 5 family) > Boot Recovery

Step 2: Flash and Update Bootloader

  • Write the recovery image to SD card
  • Insert SD card into Pi
  • Power on with only essential peripherals connected (screen/keyboard)
  • Wait for LED indicators:
Normal pattern: Rapid blinking > Solid light (10 seconds)
Note: Some units may continue blinking - proceed after 30-60 seconds

Step 3: Recovery Process

# Sequential boot process:
1. Power off Pi
2. Remove recovery SD card
3. Insert normal SD card and test boot
4. If successful, shutdown:
sudo shutdown -h now

5. Connect M.2 SSD via HAT+
6. Boot should now prioritize SD card

Additional Recovery Tips

  • Consider keeping an M.2 SSD to USB-C adapter for emergency repairs
  • Useful for:
    • Formatting SSD via Raspberry Pi Imager
    • Repairing/formatting from regular computer
    • Clean OS installations

Technical Notes

  • This issue may arise from DD copy operations when cloning SD to SSD ??!! And all boot-order settings derived/needed to support that
  • Affects primarily Pi 4 and 5 models due to EEPROM-based boot code
  • Earlier Pi models store boot code on SD card

sources (references) & credits

Basically all input/information came from the websites below. So credits and thanks to those content creators and subject matter experts. The only reason I mainly copy/paste their content is to guarantee I have a backup for myself and because multiple times I had to change and adapt. So archiving the “scripts” as I executed it succesfully is inportant for me.

MakeTechEasier > Solution 5 (by David Morelo)

About the author

Add comment

By Erik
blue-ox.nl From coffee-fueled fruity tech to fast runs—think different, let’s run them.

Pages

Tags