Install Yunohost on Raspberry Pi 4B on SSD

I haven’t been able to find a document relating to this, so my apologies if I’m repeating something.
Raspberry Pi 4s can boot from SSD without a SD card. I found I had one that hadn’t been updated to the current EEPROM so had to follow the instructions here:
This needs an SD card, but will work with the Yunohost image because it’s Raspbian Lite.
Here’s a quick summary:

  • Burn a MicroSD card with the current Yunohost image as in the documentation.
  • Boot the Pi from the SD card, connect, and let it run through the installation process so you have an admin login.
  • Connect to the Pi over SSH with the admin user.
  • Check the status of the Pi EEPROM with sudo vcgencmd bootloader_version. The version date is on the first line and should be later than 2020/03/09.
  • Check for an update with sudo rpi-eeprom-update. There may be an update available, but the update channel needs to be changed from default (that was in my case, the blog entry says it will be critical) to stable.
  • Open /etc/default/rpi-eeprom-update with an editor. For ease of use sudo nano /etc/default/rpi-eeprom-update. You will see the line FIRMWARE_RELEASE_STATUS="default". Change default to stable. Save the file.
  • Check sudo rpi-eeprom-update again. This should show an update.
  • Apply the update with sudo rpi-eeprom-update -a, and reboot.
  • When the Pi has rebooted, check that the update has been applied with vcgencmd bootloader_version again.
  • Now change the boot order. This can be done through raspi-config.
  • Run sudo raspi-config and select 6. Advanced Options.
  • Select A6 Boot Order. Confirm that the first option is B1 SD Card Boot Boot from SD Card if available, otherwise boot from USB. If it isn’t, make an option that includes USB first - the second option for me is B2 USB Boot Boot from USB if available, otherwise boot from SD Card, but I can’t change to that in the Yunohost image.
  • Next, burn the Yunohost image to your SSD. This works in the same way as an SD card, so use Etcher or the image burner of your choice. Etcher will tell you that your SSD is a large device and ask for confirmation.
  • You now have a 2.1GB image on your SSD so it needs to be resized. On a Linux based desktop this will need Gparted or another disk management tool (Gnome Disks, KDE Partition Manager etc) so start that.
  • The external SSD should appear with your local storage with a FAT32 boot partition, a 2.1 GB rootfs partition and a lot of unallocated space. Resize the rootfs partition to use up as much space as it can. Gparted, Disks and KDE Partition Manager will do this graphically.
  • Remove the SD card from the Pi and plug the SSD into one of the USB 3 ports and boot.
  • Connect to the Pi with a web browser - it should have the same IP as with the SD card if your router is working correctly and run the configuration again. You should then have a clean Yunohost install on the SSD.

:uk: Hi Serversonic,

This is amazing, thanks. I was about to start a new topic when I found this.

Can I ask for advice about this? Specifically, do you think your method would need much adaptation to work with a RAID array?

I have a Raspberry Pi 4 in a Zeon case that has four 1TB SSDs attached via SATA. I decided to put Yunohost on it, as I crashed my OpenMediaVault setup on an update and OMV isn’t particularly happy on a Pi anyway.

I have got everything set up with only three diagnostic errors. One is the reverse DNS, which I am in the process of sorting out between my domain registrar and my ISP. The other two are about the size of the SD card. I didn’t think ahead and used a 16GB sd card, which means I have a swap file warning and cannot install any apps until I have moved stuff to my SSDs.

The root filesystem only has a total of 14 GiB. This may be okay, but be careful because ultimately you may run out of disk space quickly... It's recommended to have at least 16 GB for the root filesystem.

Thinking I was being clever, I formatted, mounted and made permanent a RAID 5 array. However, I didn’t make it bootable.

sda           8:0    0 953.9G  0 disk  
└─sda1        8:1    0 953.8G  0 part  
  └─md0       9:0    0   2.7T  0 raid5 /mnt/md0
sdb           8:16   0 931.5G  0 disk  
└─sdb1        8:17   0 931.5G  0 part  
  └─md0       9:0    0   2.7T  0 raid5 /mnt/md0
sdc           8:32   0 953.9G  0 disk  
└─sdc1        8:33   0 953.8G  0 part  
  └─md0       9:0    0   2.7T  0 raid5 /mnt/md0
sdd           8:48   0 953.9G  0 disk  
└─sdd1        8:49   0 953.8G  0 part  
  └─md0       9:0    0   2.7T  0 raid5 /mnt/md0
mmcblk0     179:0    0  14.5G  0 disk  
├─mmcblk0p1 179:1    0   256M  0 part  /boot
└─mmcblk0p2 179:2    0  14.2G  0 part  /

I was planning to follow this tutorial. However, I see now that moving the whole installation onto a bootable SSD would be preferable.

I am a long term, though by no means expert, Linux user, and can usually follow tutorials and understand what I am doing at each step and remain, as Yunohost reminds us to, “cautious, methodical and patient”.

Any thoughts would be gratefully received.

:fr: Hi Serversonic,

C’est formidable, merci. J’étais sur le point de commencer un nouveau sujet quand j’ai trouvé ceci.

Puis-je vous demander des conseils à ce sujet ? Plus précisément, pensez-vous que votre méthode devrait être adaptée pour fonctionner avec une matrice RAID ?

J’ai un Raspberry Pi 4 dans un boîtier Zeon qui a quatre disques SSD de 1 To connectés via SATA. J’ai décidé d’y installer Yunohost, car j’ai planté ma configuration OpenMediaVault lors d’une mise à jour et OMV n’est pas particulièrement heureux sur un Pi de toute façon.

J’ai tout configuré avec seulement trois erreurs de diagnostic. L’une est le reverse DNS, que je suis en train de régler entre mon registraire de domaine et mon fournisseur d’accès. Les deux autres concernent la taille de la carte SD. Je n’ai pas réfléchi et j’ai utilisé une carte SD de 16 Go, ce qui signifie que j’ai un avertissement de fichier d’échange et que je ne peux pas installer d’applications tant que je n’ai pas déplacé des choses sur mes disques SSD.

Le système de fichiers racine n'a qu'un total de 14 GiB. Cela peut convenir, mais soyez prudent car vous risquez de vous retrouver rapidement à court d'espace disque... Il est recommandé d'avoir au moins 16 Go pour le système de fichiers racine.

Pensant être malin, j’ai formaté, monté et rendu permanente une matrice RAID 5. Cependant, je ne l’ai pas rendu amorçable.

sda 8:0 0 953.9G 0 disque  
└─sda1 8:1 0 953.8G 0 part  
  └─md0 9:0 0 2.7T 0 raid5 /mnt/md0
sdb 8:16 0 931.5G 0 disque  
└─sdb1 8:17 0 931.5G 0 part  
  └─md0 9:0 0 2.7T 0 raid5 /mnt/md0
sdc 8:32 0 953.9G 0 disque  
└─sdc1 8:33 0 953.8G 0 part  
  └─md0 9:0 0 2.7T 0 raid5 /mnt/md0
sdd 8:48 0 953.9G 0 disque  
└─sdd1 8:49 0 953.8G 0 part  
  └─md0 9:0 0 2.7T 0 raid5 /mnt/md0
mmcblk0 179:0 0 14.5G 0 disque  
├─mmcblk0p1 179:1 0 256M 0 part /boot
└─mmcblk0p2 179:2 0 14.2G 0 Part /

J’avais l’intention de suivre [ce tutoriel] (Adding an external storage to your server | Yunohost Documentation). Cependant, je vois maintenant que déplacer l’ensemble de l’installation sur un SSD amorçable serait préférable.

Je suis un utilisateur de Linux de longue date, mais en aucun cas un expert, et je peux généralement suivre des tutoriels et comprendre ce que je fais à chaque étape et rester, comme Yunohost nous le rappelle, “prudent, méthodique et patient”.

Toutes les idées sont les bienvenues.

Traduit avec DeepL Translate: The world's most accurate translator (version gratuite)

Personally, I learned from bitter experience never to run a Pi on an SD card quite early on. Even very good quality ones don’t like continual IO, so a separate SSD is the way to go. I’ve never tried booting from a RAID device on a Pi so don’t have any tips there, but generally for soft RAID you would need a separate /boot partition and the MBR on every disk. I’d get an SSD in a USB 3 enclosure.