doc/build_arm_image.md
2015-12-13 12:41:00 +01:00

3 KiB

Build ARM image

This tutorial's goal is to build a plug-and-play image for YunoHost for ARM boards.

It could be used on many ARM board (Rasberry Pi, Olimex, Cubieboard…).

This tutorial is based on Yunocubian.

Download minimal Debian Jessie

Download a Debian Jessie image compatible with the hardware without desktop environnement installed:

Copy image and install YunoHost

Copy image to the SD card

Plug & boot

  • Connect via SSH: root@exemple.tld/ip_address with the password which you could find on respectives documentations.
  • You should be root for next operations.

Install YunoHost

Do not proceed to **post-installation**.

Clean image

  • Update image:
apt-get update && apt-get dist-upgrade && apt-get autoremove
  • Change hostname:
hostname -v YunoHost
  • Set new SSH key generation at first lauching:
# Delete SSH keys
rm -f /etc/ssh/ssh_host_*

# Add script to regenerate SSH keys at first boot
nano /etc/init.d/ssh_gen_host_keys
---
#!/bin/sh
### BEGIN INIT INFO
# Provides:          Generates new ssh host keys on first boot
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Generates new ssh host keys on first boot
# Description:       Generatesapt-get --purge clean new ssh host keys on $
### END INIT INFO
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -t rsa -N ""
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -t dsa -N ""
insserv -r /etc/init.d/ssh_gen_host_keys
rm -f \$0
---

# Give executable right
chmod a+x /etc/init.d/ssh_gen_host_keys

# Make it execute at next boot
insserv /etc/init.d/ssh_gen_host_keys
  • Delete logs:
find /var/log -type f -exec rm {} \;
  • Turn off your board:
shutdown

Copy image

Plug your SD card on your desktop computer and copy it:

Be carefull to not erase your data.
sudo dd bs=1M if=/dev/sdd of=~/yunohost-jessie-board-year-month-day.img

Verify image

Copy image to the SD card

Plug & boot

Post-install

If everything is alright, you could publish your image.

Publish image

  • Reduce size by zipping the image:
zip yunohost-jessie-board-year-month-day.img.zip yunohost-jessie-board-year-month-day.img
  • Publish: you could post your image on the forum.