Booting Raspberry Pi from an SSD

I have spent the last several days trying to get a DeskPi Pro v2 to boot from an SSD without success —— until today.  

I am running Debian Bullseye on the Raspberry Pi primarily to conform to the requirements of Home Assistant Supervised which does not support any other operating system.  But current versions of Debian Bullseye have problems seeing USB devices prior to booting as documented here.   

The primary error message I would see during boot was this:

vcc-sd: disabling

What that means for the Deskpi is it cannot boot from an SSD simply because Debian hasn’t initialized USB devices yet.  But there is a fix.

  1. Use Balena Etcher or a similar tool to flash Debian Bullseye to an SD card.
  2. Use Balena Etcher or a similar tool to also flash the same version of Debian Bullseye to the SSD.  You will need to use an adapter such as a SATA to USB adapter (or whatever interface you’re using for the SSD) to connect the SSD to a computer.
  3. Use Balena Etcher or a similar tool to flash an SD card with Raspberry Pi OS.  
  4. Boot the Raspberry Pi using the Debian SD card.  Do not update the operating system to a new version since there will then be a mismatch between the version on the SD card and the version on the SSD.

 

Run these commands at the Linux terminal:

  1. echo reset_raspberrypi > /etc/initramfs-tools/modules
  2. update-initramfs -uk all

 

Connect the USB adapter with the attached SSD to the Pi to copy the newly generated initrd.img to the SSD.  Mount the SSD to a path such as /mnt/ssd

  1. mount /dev/sda2 /mnt/ssd
  2. cp /boot/initrd.img-{kernel_version_generated}-arm64 /mnt/ssd/boot/initrd.img-{kernel_version_generated}-arm64
  3. Disconnect the SSD and eject the SD card.

 

Boot the Pi using the Raspberry Pi OS SD card.  

  1. Install the gparted application and then launch it in order to resize the root partition on the SSD.
  2. Connect the USB adapter with the attached SSD but then unmount it in gparted in order to resize it.
  3. Use gparted to select “Partition” and then “Check.”  Then apply the operation. 

 

Open up a terminal from within the Raspberry Pi OS

  1. git clone https://github.com/DeskPi-Team/deskpi.gi
  2. cd deskpi
  3. sudo chmod +x install.sh
  4. ./install.sh
  5. sudo apt update
  6. sudo apt full-upgrade
  7. sudo rpi-update
  8. sudo reboot
  9. sudo raspi-config
  10. Navigate to  Advanced Options —> Boot Order and select USB Boot
  11. Navigate back to Advanced Options —> Boot Loader Version and select Latest Version.  Be sure not to choose to reset to defaults after selecting Latest Version.
  12. Reboot when prompted.
  13. sudo -E rpi-eeprom-config --edit
  14. No changes here are needed.  Simply Ctrl + X to save.
  15. sudo reboot 

 

You should now be able to boot the system using Debian Bullseye using an SSD/USB as the root filesystem.

Don’t forget to add the reset_raspberrypi to the system booted from SSD and run update-initramfs as so:

Run these commands at the Linux terminal:

  1. echo reset_raspberrypi > /etc/initramfs-tools/modules
  2. update-initramfs -uk all
Show Comments