Convert other Linux distributions for Berryboot
Berryboot offers a small number of linux distributions for automatic download. This can be done in the Berryboot GUI. A complete list of distributions available for download can be found here. Currently there are many other Linux distributions that supports ARM CPUs. They have been ported and compiled for that. I show you how to convert an ARM Linux image for Berryboot.
The first step is to get some ARM Linux distributions. A list of all images for ARM CPUs like Raspberry Pi can be found here. A few examples are Arch Linux, Fedora 17 Remix, openSUSE, … Theses images can be used with an bootable SD card, but we want to use this images for our boot loader Berryboot, so we need to convert them.
We need a Linux system for the conversion. On this system we can compute the image to another file system. If you do not have a ready Linux system for that, don’t worry, just install a virtual one. I show you how this works here. However, we need to install two additional packets:
1apt-get install kpartx
1apt-get install squashfs-tools
With this two installed packets, conversion is quite easy. You only have to do some Linux commands. Here is how I did the conversion for Arch Linux (if you use another distribution, you have to change the name of the image files):
sudo kpartx -av arch*.img
sudo mkdir /mnt/tmp/
sudo mount /dev/mapper/loop0p2 /mnt/tmp/
sudo rm lib
sudo mv usr/lib lib
sudo ln -s ../lib lib
sudo mksquashfs /mnt/tmp/ Arch_Linux.img240 -comp lzo -e lib/modules
sudo kpartx -d arch*.img
I copied my Arch Linux image into my home folder for this example. After successful conversion you should find the new image file also in you home folder. This image is smaller! This is not a compression, we do not copied the lib/modules directory. Why? Because all Linux distributions use the ones from Berryboot. We copy this image to a FAT formatted USB stick.
You should boot your Raspberry Pi with your Berryboot SD card. At your boot menu you should get to the dialog to install a new operating system. This button is called ‘AddOS’. Click this button some seconds and there will be a context menu. There we choose to load an os from USB stick. In your file browser look for the new Arch Linux image. The copying lasts some time, but should be run without problems. At the next boot, you should be able to start your Raspberry Pi with the new distribution.