Today I can finally tell you our Raspberry / ownCloud server project is nearly finished. We’ve been busy for about 2 months.
The main issue here was to get the Ubuntu Core image to work on the Raspberry since the RPI uses a boot partition (not a normal grub bootloader installation) and a root partition. Here is a quick explanation how the boot works:
- When the Raspberry Pi is first turned on, the ARM core is off, and the GPU core is on. At this point the SDRAM is disabled.
- The GPU starts executing the first stage bootloader, which is stored in ROM on the SoC. The first stage bootloader reads the SD card, and loads the second stage bootloader (
bootcode.bin) into the L2 cache, and runs it.
bootcode.binenables SDRAM, and reads the third stage bootloader (loader.bin) from the SD card into RAM, and runs it.
loader.binreads the GPU firmware (
loader.bindoesn’t do much. It can handle
.elffiles, and so is needed to load
start.elfat the top of memory (ARM uses SDRAM from address zero). There is a plan to add elf loading support to
bootcode.bin, which would make
loader.binunnecessary, but it’s a low priority (I guess it might save you 100ms on boot).
After that we went on and got some network issues since Ubuntu Core is a bare minimal distro, it has no network options. After research we installed the needed packages and minimal auto config in a chroot on the SD card. After that the only thing that was left was figuring out what dependencies where needed for the packages that had to be installed. Finally we had to polish the automated scripts. We used our main ownCloud VM scripts as a base for the RPI2 project. But as you might guess… a lot does not work well cross architecture.
This image works the same way as our Virtual Machines, rc.local is edited and downloads all the scripts and makes the changes needed to run the scripts at login. At the end of the setup script it reverts the changes made to create the setup environment, back to the old state so you can enjoy your ownCloud server on the small but powerful Raspberry Pi2!
ownCloud server on your Raspberry Pi2 will include:
- Redis Cache
- PHP 7
- ClamAV (antivirus, scans uploaded files to ownCloud. Change to daemon-socket in ownCloud admin panel)
- MySQL (random password generated)
- Libre Office Writer
- 2 GB swap file / 2 GB swap partition (partition is used when using the external USB as ROOT option)
- Possibility to use an external USB device as ROOT partition (recommended, preferably an SSD)
- Base OS: Ubuntu Core 15.10 with apt-get package manager
- Much more, see the setup.sh and other scripts
If you wish to be notified when the project is finished, please subscribe to our site with the button below!
If you would like to contribute and speed up the release, please visit the project issue tracker.
You can also contact me at ezra [a] techandme.se if you want to help out testing the img.