Raspberry Pi and an external SSD - best practices

  • This question may seem a little basic but I haven't found a good answer for it yet. LibreELEC is just enough Linux to run Kodi but it is a strange beast compared to the Linux installs I'm used to. In particular, running on device that uses a partitioned SD card as primary storage is not something you see often.

    Using df -h, I note that /storage mounts to the second, larger partition. This suggests that its where all the media goes, although I haven't found how it is identified to be mounted there.

    I did see mention of cmdline.txt in some posts, which I gather is the file in /flash (that requires remounting to be able to change). Fortunately LibreELEC includes lsblk so I could replace the UUID for "disk=" with the one for the formatted partition on my external SSD. Since it doesn't include rsync, I used cp -a to copy the files from /storage to my SSD, which automounted under /var/media. A reboot and everything is working. df -h confirms that the external SSD is indeed mounted as /storage.

    I also note that now the larger SD partition mounts under /var/media. At some point I could get used to parted's commands to remove it, I suppose, and expand the main to partition to far more space than it will probably ever use. However it seems like it could also be used for other distros. However I don't know enough about the Raspberry Pi boot loader to know if this is even possible. Another option would be to use is the /storage/backup directory, but I don't know how to do that when the system doesn't seem to use /etc/fstab.

    Anyway, at this point LibreELEC seems to be set up the way I want. I'm not sure if this is considered a "best practice" for a Pi installation, but it seems reasonable. Can anyone add in things that I should do/have done differently?

  • RPi4 and RPi3B+ can natively boot from the SSD drive (not SD) and I believe (fuzzy memory now, as it's been a while) that RPi3B can do the same as long as the firmware has been updated. Write the LE image to the drive then modify cmdline.txt to use /dev/sda1 and /dev/sda2 instead of the default mmcblkX device.