Skip to content

Instantly share code, notes, and snippets.

@Zeitwaechter
Last active April 30, 2022 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zeitwaechter/118a0234354e2e039b23330b923fc4ed to your computer and use it in GitHub Desktop.
Save Zeitwaechter/118a0234354e2e039b23330b923fc4ed to your computer and use it in GitHub Desktop.
rpi4-boot-from-ssd

Warning

No warranties, it's all on you.

Pay attention to not touch any pins/contacts, if you do not own a enclosure/case for this RPi4 Setup.

Also.. 5 Volt stings a bit.

Now.. you have been warned.

Origin

This is fully based on one of Tom's Hardware's articles so all credits go to them.

Why copy-pasting it then? My GitHub Gists vs. SERPs.

Introduction

As there are currently limitations to the bootloader/EEPROM of the RPi4(b) 2GB/4GB Model you need to manually

Requirements (Hardware)

  1. Raspberry Pi 4 (Model b)
  2. A 5V Power Supply that does what it should (like the official RPi one), also to safe the SSD from any damage
  3. e.g. Bookworms Expansion Board X825 SSD Shield
  4. MicroSD <> 4GB
  5. SSD ?GB (which we want to boot from)

Requirements (Software)

  1. MicroSD has Raspberrian OS (minimal?)
  2. SSD has also Raspberrian OS (minimal?) installed

You could also copy the contents of your microSD to the SSD afterwards - if you want to take that approach that is your homework.

Walkthrough

  1. Try booting from your SSD first - maybe it is "fixed" by now and you can boot from the SSD from the get go (remove your microSD for this to work).
  • If this works for you, skip everything else
  1. Boot from your microSD if this did not work (y.y)
  2. sudo -i
  3. apt update
  4. apt full-upgrade
  5. nano /etc/default/rpi-eeprom-update
  6. Change critical to stable
  7. Save via CTRL+X, followed by a Y
  8. rpi-eeprom-update -d -a
  9. reboot now
  10. Login with your credentials
  11. vcgencmd bootloader_version
  12. Check if the Bootloader is 15th June 2020 or higher.
  13. mount /dev/sda2 /mnt
  14. mount /dev/sda1 /mnt/boot
  15. cp /boot/*.dat /mnt/boot/
  16. cp /boot/*.elf /mnt/boot/

And now...

Copy more files?

Yes but first boot from SSD to let Raspberrian OS resize it's data partition size to it's maximum capacity.

For this see Boot from SSD?, then return.

For example:

  1. cp -r /etc/ /mnt/etc/
  2. cp -r /opt/ /mnt/opt/
  3. cp -r /root/ /mnt/root/
  4. cp -r /run/ /mnt/run/

Boot from SSD?

  1. shutdown now
  2. Remove Power Supply
  3. Remove microSD
  4. Attach Power Supply
  5. Be back in the game

You could now return to Copy more files? but first insert the microSD again and mount it/reboot again.

Do not forget that the cp /from /tos switch positions if you decide to mount instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment