mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
Update build_arm_image.md
This commit is contained in:
parent
ac7bf21293
commit
576915304b
1 changed files with 51 additions and 30 deletions
|
@ -8,6 +8,8 @@ This tutorial is based on [Yunocubian](https://github.com/M5oul/Yunocubian).
|
||||||
|
|
||||||
You could find [ARM image builder from Debian Jessie](https://github.com/YunoHost/install_script/pull/36).
|
You could find [ARM image builder from Debian Jessie](https://github.com/YunoHost/install_script/pull/36).
|
||||||
|
|
||||||
|
**All these steps can be executed with variations of [this script](https://github.com/likeitneverwentaway/rpi_buildbot/blob/master/build_image.sh).**
|
||||||
|
|
||||||
### Download minimal Debian Jessie
|
### Download minimal Debian Jessie
|
||||||
Download a Debian Jessie image compatible with the hardware **without desktop environnement** installed:
|
Download a Debian Jessie image compatible with the hardware **without desktop environnement** installed:
|
||||||
|
|
||||||
|
@ -19,10 +21,24 @@ Download a Debian Jessie image compatible with the hardware **without desktop en
|
||||||
|
|
||||||
<a class="btn btn-lg btn-default" href="/plug_and_boot">Plug & boot</a>
|
<a class="btn btn-lg btn-default" href="/plug_and_boot">Plug & boot</a>
|
||||||
|
|
||||||
* Connect via [SSH](ssh): **root@exemple.tld/ip_address** with the password which you could find on respectives documentations.
|
* Connect via [SSH](ssh): **pi@exemple.tld/ip_address** with the password **raspberry** (or any variations for other distros than Raspbian).
|
||||||
|
* Set a root password :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo passwd
|
||||||
|
```
|
||||||
|
|
||||||
|
and login as root:
|
||||||
|
```bash
|
||||||
|
su
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
* You should be **root** for next operations.
|
* You should be **root** for next operations.
|
||||||
|
|
||||||
<a class="btn btn-lg btn-default" href="/install_manually">Install YunoHost</a>
|
<a class="btn btn-lg btn-default" href="/install_on_raspberry">Manually install YunoHost on a Raspberry Pi</a>
|
||||||
|
|
||||||
|
If you encounter problems during installation check out [this installation guide](http://avignu.wiki.tuxfamily.org/doku.php?id=documentation:yunohost-jessie) for the Raspberry Pi, based on suggestion [from this thread](https://forum.yunohost.org/t/installation-de-yunohost-2-4-sur-raspbian-jessie-minimal-sur-un-raspberry-pi-3/1597).
|
||||||
|
|
||||||
<div class="alert alert-danger">Do not proceed to **post-installation**.</div>
|
<div class="alert alert-danger">Do not proceed to **post-installation**.</div>
|
||||||
|
|
||||||
|
@ -33,43 +49,39 @@ apt-get update && apt-get dist-upgrade && apt-get autoremove
|
||||||
```
|
```
|
||||||
* Change hostname:
|
* Change hostname:
|
||||||
```bash
|
```bash
|
||||||
hostname -v YunoHost
|
sed -i "s/$(hostname)/YunoHost/g" /etc/hosts
|
||||||
|
sed -i "s/$(hostname)/YunoHost/g" /etc/hostname
|
||||||
```
|
```
|
||||||
* Set new SSH key generation at first lauching:
|
* Allow SSH connection as root:
|
||||||
|
```bash
|
||||||
|
sed -i '0,/without-password/s/without-password/yes/g' /etc/ssh/sshd_config
|
||||||
|
```
|
||||||
|
* Delete the **pi** user (this step must be perform directly as root, not logged in as pi and then login as root):
|
||||||
|
```bash
|
||||||
|
deluser –remove-all-files pi
|
||||||
|
```
|
||||||
|
* Set the first boot script:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Delete SSH keys
|
wget https://raw.githubusercontent.com/likeitneverwentaway/rpi_buildbot/master/yunohost-firstboot -P /etc/init.d/
|
||||||
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
|
# Give executable right
|
||||||
chmod a+x /etc/init.d/ssh_gen_host_keys
|
chmod a+x /etc/init.d/yunohost-firstboot
|
||||||
|
|
||||||
# Make it execute at next boot
|
# Make it execute at next boot
|
||||||
insserv /etc/init.d/ssh_gen_host_keys
|
insserv /etc/init.d/yunohost-firstboot
|
||||||
|
```
|
||||||
|
* Set the boot promtp script:
|
||||||
|
```bash
|
||||||
|
wget https://raw.githubusercontent.com/likeitneverwentaway/rpi_buildbot/master/boot_prompt.service -P /etc/systemd/system/
|
||||||
|
wget https://raw.githubusercontent.com/likeitneverwentaway/rpi_buildbot/master/boot_prompt.sh -P /usr/bin/
|
||||||
|
chmod a+x /usr/bin/boot_prompt.sh
|
||||||
|
systemctl enable boot_prompt.service
|
||||||
```
|
```
|
||||||
|
|
||||||
* Delete logs:
|
* Tell the boot_prompt script that the next boot is the first boot:
|
||||||
```bash
|
```bash
|
||||||
find /var/log -type f -exec rm {} \;
|
touch /etc/yunohost/firstboot
|
||||||
```
|
```
|
||||||
|
|
||||||
* Turn off your board:
|
* Turn off your board:
|
||||||
|
@ -77,6 +89,14 @@ find /var/log -type f -exec rm {} \;
|
||||||
shutdown
|
shutdown
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Don't forget to reset **wpa-supplicant.conf** if you changed it. You could also delete the command history with
|
||||||
|
|
||||||
|
```bash
|
||||||
|
history -c
|
||||||
|
```
|
||||||
|
or by editing **/root/.bash_history**.
|
||||||
|
|
||||||
### Copy image
|
### Copy image
|
||||||
Plug your SD card on your desktop computer and copy it:
|
Plug your SD card on your desktop computer and copy it:
|
||||||
<div class="alert alert-danger">Be carefull to not erase your data.</div>
|
<div class="alert alert-danger">Be carefull to not erase your data.</div>
|
||||||
|
@ -84,6 +104,7 @@ Plug your SD card on your desktop computer and copy it:
|
||||||
```bash
|
```bash
|
||||||
sudo dd bs=1M if=/dev/sdd of=~/yunohost-jessie-board-year-month-day.img
|
sudo dd bs=1M if=/dev/sdd of=~/yunohost-jessie-board-year-month-day.img
|
||||||
```
|
```
|
||||||
|
You can also use the **Read** function of [Win32 Disk Imager](https://sourceforge.net/projects/win32diskimager/).
|
||||||
|
|
||||||
### Verify image
|
### Verify image
|
||||||
<a class="btn btn-lg btn-default" href="/copy_image">Copy image to the SD card</a>
|
<a class="btn btn-lg btn-default" href="/copy_image">Copy image to the SD card</a>
|
||||||
|
|
Loading…
Reference in a new issue