An indie make-it-work blog for retrogamers that want to replay their old video game hits on their Raspberry Pi and television. Hints and tricks to make it work at the best possible.
Saturday, May 22, 2021
Make a multiple purpose system from PINN and Raspberry Pi OS 32 bits lite
Friday, April 30, 2021
Disk space on your SD card: best practices
When you start your career as a Raspberry Pi user you know that you will face at some point the following situations:
- You will play games
- You will try OSes
- You will brag about what you can do on your Pi
- You will try things that are almost impossible. Almost impossible is not impossible.
- You will repartition your SD Card
- You will play games on RetroPie
- You will reinstall OSes
- You will run out of SD card disk space
You will eventually run out of SD card disk space and if you are seriously using your Pi, you will have to think to several things on how you manage your storage. Not keeping storage in mind can give you performance and usability issues and if you are caught by surprise you might end having to repartition your SD card and lose some data and some work. Here we are going to browse a few pointers on how to avoid critical disk space situations.
1. Be reasonable in your expectations
- Your system storage (SD Card) with 4 to 512 GB (or even more)
- USB keys that you find in your drawers and realize that you could put them to good use.
- External hard drive
- Your desktop PC's hard drives, shared via samba
- FTP's are mostly out of scope since you can only download and upload from FTP's. From a samba server you can for example operate an executable.
- For example, don't expect to store lots of games like Final Fantasy VII (4 CDs) if you don't have decent storage like an external hard drive. If you are poor on external storage but have a good hard disk on your desktop PC, you might want to use that hard disk but keep in mind that hard disk+network is the slowest possible storage ever.
- Keep a decent objective with how many OSes you are going to install on your SD card depending on its size. See next paragraphs "2. Think your storage directly when partitioning" and "4. Repartition your storage if needed" for more info on this.
- If you are using multiple partitions, store your data and games at one single place. You can either use a project partition from PINN or access a foreign /home/pi from another OS. No need to store your wineprefixes on your 4 OSes; it will just multiply by 4 needed storage and won't bring any added value.
2. Think your storage directly when partitioning
3. Prefer lean OSes
- TwisterOS
- DietPi
- Raspberry Pi OS 32 bits
- Raspberry Pi OS 32 bits lite
- Raspberry Pi OS 32 bits full
3.a. Consider getting a lean Wine version
- Get your lean Wine-x86 from TwisterOS site: https://twisteros.com/faq.html
4. Repartition your storage if needed
4.a. Backup your /home/pi and your important files before repartitioning
- If you have an external device on your Pi:
cd /media/pi/externaldevice/save/path
env GZIP=-9 tar cvzf homepi.tar.gz /home/pi
- You have nothing but your Pi:
- Make sure you are using less than half of your SD card space. You will have to junk useless files. then go to root and tar your directory.
- Do as above:
sudo su
cd /root
env GZIP=-9 tar cvzf homepi.tar.gz /home/pi
chmod 777 homepi.tar.gz
cd ..
chmod 777 /root
exit
- You can upload your saved homepi.tar.gz to any free cloud service (eg. Google Drive).
- If you have an external windows PC, you can install samba on your Raspberry Pi and pull the files from your /home/pi. See guide there: https://pimylifeup.com/raspberry-pi-samba/
4.b. Use one single OS for all
- TwisterOS has it all but is quite slow and works mainly on Pi4
- Raspberry Pi OS 32 bits lite and regular are both good alternatives
- You may install kodi inside this OS:
sudo apt-get install kodi
- Installing RetroPie is a bit out of scope since RetroPie's compatibility is not assured with Fake-KMS so either you will have to use Lakka/Retroarch or you will use a completely manual emulationstation configuration (I don't advise the latter except if you have a lot of time to lose)
Beware that it will be quite buggy as foreign install doesn't take in charge all the specificities of the Raspberry Pi. A better way is to clone the git and compile it. I will make an article about it since the disable and enable flags on the configure are subject to a study but for starters you can go there.
- Debootstrapping meets bugs in Raspbian buster so you might see mikerr's qemu fork if you need debootstrapping
- Since debootstrapping is not an option, you will have to swap wine versions especially if you play Diablo 2 and x86 games. A full guide to swap wine versions is available on ptitSeb's git: https://github.com/ptitSeb/box86/blob/master/docs/X86WINE.md
- If you need android, you can install anbox. See guide there: https://snapcraft.io/install/anbox/raspbian
Use:sudo snap install anbox --edge --devmode
instead ofsudo snap install anbox --beta
Anbox is not simply Plug-and-Play. It is a time-consuming experience and you should go to https://anbox.io/ in order to get more information about it, load kernels and run emulated apps. This is out of scope of the current guide.
Also note that most Android apps will have an alternative under Linux/Raspbian. For example, you can mirror your screen to uv4l. It is slightly more difficult to set up than Android Screen Mirroring but its more performant and it doesn't need Android to run.
- If you absolutely need debootstrapping (for example if emulating a x86_64 machine), use Mikerr's QEMU stretch Raspbian install from PINN.
- Kodi and Retroarch install the same way
- A detailed guide to install a single OS with multiple purpose and multiboot is availlable here.
5. If using multiple partitions, store your data on a common storage instead of in /home/pi/
6. RetroPie is a false friend
7. Avoid Android as an OS if possible
8. Keep a map of your storage
9. Useful tools
du is also provided on every Linux installation. Simply type "du" on your Raspberry Pi in console mode to get a similar result. |
sudo fdisk -l gives a summary of your storage devices. Here is a Fedora x86 setting. |
Play ET: Legacy on Raspberry Pi [FPS]
ππ Duration: A few hours π§ Difficulty: Easy ππππ Interest: Hours of fun
-
πππ Duration: Up to one day (kernel compiling) π§π§ Difficulty: Medium ππππ Interest: Hours of fun
-
ππ Duration: 2 to 3 hours (nw.js;Tapir;EasyRPG) πππ Duration: Up to one day (Wine-based RPGXP, RPGVX and RPGVX Ace) π§π§π§ Difficulty: ...
-
πππ Duration: Up to one day (kernel compiling) π§π§π§π§ Difficulty: Difficult ππππ Interest: Hours of fun