jng98908 Posted January 23, 2023 Share Posted January 23, 2023 I originally posted this on reddit after seeing a lot of posts trying to use a SATA M.2 SSD and saying it wouldn't boot with replies telling them to go buy a NVME M.2 SSD which isn't necessary when the board does support SATA M.2 with flashing the correct bootloader. This guide has 3 different sections, 1 being booting with Orange pi OS and 2 being with Armbian OS Orange Pi OS Instructions Download Orange Pi OS Ubuntu or Debian from their website http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-pi-5.html unzip the 7z file to get the .img file and flash it to your sd card with your preferred flasher i.e balenaetcher. Once flashed put it into orange pi 5 and boot from sd card first once booted, the rest will be done in a terminal. go ahead and do your usual update sudo apt update sudo apt upgrade -y 3. then make sure to wipe your SPI of any previous bootloader (give it time to complete, you'll know it's done when you get your cursor back in terminal) sudo dd if=/dev/zero of=/dev/mtdblock0 bs=1M count=1 4. Write sata bootloader to SPI sudo dd if=/usr/share/orangepi5/rkspi_loader_sata.img of=/dev/mtdblock0 && sudo sync 5. Edit boot file on sd card to recognize sata by adding overlays line to the bottom, save then reboot sudo nano /boot/orangepiEnv.txt overlays=ssd-sata sudo reboot 6. On reboot you will still boot into SD card but now you should see "sda" (your sata SSD) show up on your list of devices when typing: lsblk 7. Put the same Orange Pi OS image you used in step 1 in any directory on your orange pi making sure it is unzipped and is in .img format. I just used the web browser in orange pi os to redownload from the website which for me put it in directory /home/orangepi/Downloads 8. Flash your downloaded .img to your sata ssd with this command (substitute with your directory to .img) sudo dd bs=1M if=/path/your/orangepi.img of=/dev/sda status=progress && sudo sync 9. Mount your ssd so you can edit the ssd’s boot file to support sata and reboot sudo mount /dev/sda1 /mnt/ sudo nano /mnt/boot/orangepiEnv.txt overlays=ssd-sata sudo umount /mnt/ && sudo sync sudo poweroff 10. Remove SDcard, turn on orange pi and it should boot orange pi OS from your M.2 sata ssd now Armbian OS Instructions Relatively same instructions with different file names write armbian .img file to your sd card with balenaetcher, I chose to use the more up to date imags from their github here https://github.com/armbian/build/releases/ make sure to unzip boot armbian from sd card, wipe spi sudo dd if=/dev/zero of=/dev/mtdblock0 bs=1M count=1 3 Download sata spi bootloader from orange github, place it on your sd card (mine is in downloads directory) and write to spi https://github.com/orangepi-xunlong/orangepi-build/blob/next/external/packages/bsp/rk3588/usr/share/orangepi5/rkspi_loader_sata.img sudo dd if=/home/pi/Downloads/rkspi_loader_sata.img of=/dev/mtdblock0 status=progress && sudo sync 4. Edit boot file to recognize sata then reboot sudo nano /boot/armbianEnv.txt overlays=opi5-sata sudo reboot 5. Once rebooted you can check sda shows up with command: lsblk 6. download the same armbian.img you used for step 1 to your orange pi making sure it's unzipped in .img format, then flash it to your ssd sudo dd bs=1M if=/path/your/armbian.img of=/dev/sda status=progress && sudo sync 7. Mount /boot/ of ssd so you can edit the ssd’s boot file to support sata and reboot sudo mount /dev/sda1 /mnt/ sudo nano /mnt/boot/armbianEnv.txt overlays=opi5-sata sudo umount /mnt/ && sudo sync sudo poweroff 8. Remove SDcard and start SBC, resize filesystem to use all available space sudo systemctl enable armbian-resize-filesystem 2 Quote Link to comment Share on other sites More sharing options...
Igor Posted January 23, 2023 Share Posted January 23, 2023 Thanks! If someone has time to integrate this to Armbian standard install tool: https://github.com/armbian/build/blob/master/packages/bsp/common/usr/sbin/armbian-install https://docs.armbian.com/User-Guide_Getting-Started/#how-to-install-to-emmc-nand-sata-nvme-usb + packing sata spi bootloader within u-boot package (this part is a bit tricky as blob has to be provided and packed via custom UBOOT_TARGET_MAP) https://github.com/armbian/build/blob/master/config/sources/families/rockchip-rk3588.conf 1 Quote Link to comment Share on other sites More sharing options...
bsorsdahl Posted February 4, 2023 Share Posted February 4, 2023 This guide talks about sda .. does it would for nvme also ?? 0 Quote Link to comment Share on other sites More sharing options...
martivo Posted February 5, 2023 Share Posted February 5, 2023 @bsorsdahlNVME works without these extra steps. Boot into your OPI from SD card, use amrbian-config -> System -> Install and first option(nr4 - boot from nvme/usb) and then use dd to write the image to the nvme drive "dd if=/image.img of=/dev/nvme0n1 bs=1M" power off, take out the SD card and enjoy. 0 Quote Link to comment Share on other sites More sharing options...
terranx Posted February 5, 2023 Share Posted February 5, 2023 I was able to just flash armbian to my ssd using etcher via an nvme to usb adapter, and it booted as normal. 0 Quote Link to comment Share on other sites More sharing options...
fabbl Posted June 24, 2023 Share Posted June 24, 2023 Hello, I tried to install Armbian onto my Orange Pi 5 (with M.2 SATA SSD) exactly like shown here but it won‘t really work. I now tried it several times but I always get the same result. When I‘m at the step of removing the SD card to boot directly of of my SATA SSD only the red LED on the Pi is on and nothing boots. I already tried it in many different ways but nothing changes. Thanks in advance, Fabbl 0 Quote Link to comment Share on other sites More sharing options...
royk Posted June 25, 2023 Share Posted June 25, 2023 (edited) Try to format the disk so you've got 1 ext4 partition and install with armbian-install. Choose no when it asks if you want to install/update the bootloader to MTD. Check if you've got the overlay sata in /boot/dtb/rockchip/overlay In case the filename is orangepi-5-sata.dtbo then in armbianEnv.txt you should have the following lines: overlay_prefix=orangepi-5 overlays=sata Edited June 25, 2023 by royk 0 Quote Link to comment Share on other sites More sharing options...
Yoshi_312 Posted July 4, 2023 Share Posted July 4, 2023 (edited) I've made a few tests based on armbian and the ubuntu images provided by orange pi. First thing the SPI image: The link points to a 4MB image when the file used to be a 16MB one (file changed on June 1) The new version doesn't seem to work (nothing displayed on serial console when booting without an SD card). The older 16MB seems to work : https://github.com/orangepi-xunlong/orangepi-build/raw/cdfc212a812ead294d7b98b4cedb15b1ee60bec2/external/packages/bsp/rk3588/usr/share/orangepi5/rkspi_loader_sata.img this img file can also be found inside the orange pi image as explained in the orange pi section Secondly the armbian image: It seems several changes have been made between 23.02 and 23.05 (at least the overlay names). With 23.02 images the procedure explained here does seem to work with a sata ssd. With 23.05 images the sata ssd does not seem to appear (when booting on SD card) so the procedure can't be completed. Also the sbc hangs at reboot/poweroff (kernel panic) For now I'm gonna use 23.02 until we get more feedback with 23.05 Edited July 5, 2023 by Yoshi_312 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.