Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/rootzoll/raspiblitz
Browse files Browse the repository at this point in the history
  • Loading branch information
rootzoll committed Feb 19, 2019
2 parents 434b0eb + 3c285ea commit c18394d
Show file tree
Hide file tree
Showing 6 changed files with 433 additions and 1,060 deletions.
5 changes: 5 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,11 @@ Work Nodes for the process of producing a new sd card image release:

There is an experimental section in this GitHub that tries to build for other SingleBoardComputers. Feel free to try it out and share your experience: [dietpi/README.md](dietpi/README.md)

## Can I flip the screen?

For the default 3.5" LCD you need to edit the /boot/config.txt. Run `sudo nano /boot/config.txt`
look for the line `dtoverlay=tft35a:rotate=270` towards the end. To flip the screen with 180 degrees change the line to `dtoverlay=tft35a:rotate=90` and reboot with `sudo reboot`. Reference: https://github.com/goodtft/LCD-show/issues/34

## How to setup fresh/clean/reset and not getting into recovery mode?

When you put in a sd card with a new/clean RaspiBlitz image the RaspiBlitz will get into recovery mode because it detects the old data on your HDD and assumes you just want to continue to work with this data.
Expand Down
126 changes: 126 additions & 0 deletions dietpi/Odroid_HC1_HC2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@

# ⚡️ RaspiBlitz-on-DietPi ⚡️
# For the Odroid HC1 / HC2 / XU3 / XU4

![](pictures/DroidBlitz.jpg)

## There are 3 options provided:
* a trusted fully prebuilt SDcard image
* building your own SDcard from an updated DietPi image.
* Build your own SDcard from the image downloaded from [Dietpi.com](dietpi.com#download)
---
### Download the fully prebuilt RaspiBlitz-on-DietPi SDcard image
* [torrent](https://github.com/openoms/raspiblitz/blob/raspiblitz-dev/dietpi/RaspiBlitz1.0_OdroidHC1_DietPi6.21.1.torrent)
* [mega.nz link](https://mega.nz/#F!EVNAAQiB!ZyLHP2dJMRSVjZOTCQMIYA)

sha256sum RaspiBlitz1.0_OdroidHC1_DietPi6.21.1.img: 96ee8700f52a12fb5b13fab3fffcdcf5d364c6dd16c580d969e421cef2cd7cc2

Steps to run:
- download the .img file,
- burn to a 16 GB SD with [Etcher](https://www.balena.io/etcher/)
- extend the rootFS partition with a partition manager (disks, Gparted, etc.)
- boot the Odroid with the SDcard
- login with `ssh [email protected]`
password: `raspiblitz`

Using this image you can skip the rest of this guide as it is mostly about how this image was built.

The setup continues with the [RaspiBlitz Setup Process](https://github.com/rootzoll/raspiblitz/blob/master/README.md#setup-process-detailed-documentation)

---
### Download the updated DietPi image

For the Odroid HC1 / HC2 / XU3 / XU4 a v6.20.6 DietPi image with fail2ban installed is uploaded [here](
https://mega.nz/#!AcdVBAbR!O-W3jP5LUgw7lMY8S9XcBWcKX3IhRNAAFmaYzDXIUC0).
sha256sum DietPi_v6.20.6_OdroidXU4-ARMv7-Stretch.img:
1459b91f66b9db98f3437c31231e44497b7b7dcd9146d2cc41a3da653f9a9215

* Burn the image to the SDCard with [Etcher](https://www.balena.io/etcher/) and extend the rootfs partition to the size of your card with a partition manager (disks, Gparted, etc).

* Insert the SDcard into the Odroid.

* Power up and continue with [running the RaspiBlitz build_sdcard.sh script](#Run-the-RaspiBlitz-build_sdcard.sh-script)

---

### Build your own DietPi image:

Watch out this is an ardous process.
Updating from a v6.14 DietPi image is causing a bootloop under some circumstances. Will be sorted once the current, >6.2 version is uploaded for the Odroids.

* For the Odroid HC1 / HC2 / XU3 / XU4 the start is this image:
https://dietpi.com/downloads/images/DietPi_OdroidXU4-ARMv7-Stretch.7z
* Burn it to the SD with [Etcher](https://www.balena.io/etcher/)


* In the desktop terminal on Linux / MacOS or Putty on Windows:
`ssh root@[IP-OF-DIETPI]`
password: `dietpi`
Getting started with DietPi: https://dietpi.com/phpbb/viewtopic.php?f=8&t=9#p9

* Ok > Cancel > Cancel
automatic apt update & apt upgrade and asks to reboot
![](pictures/dietpi_1st_reboot.png)

* Log back in:
`ssh root@[IP-OF-DIETPI]`
password: `dietpi`
* after the update the ssh keys might change:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
run (can be copied from the terminal output):
`ssh-keygen -f "/home/[your-linux-username]/.ssh/known_hosts" -R "dietpi.IP"`
`ssh root@[IP-OF-DIETPI]`
yes >
password: `dietpi`

* At this point if the DietPi OS was not updated from 6.14 it does not manage to save settings going forward.
Exit the software installer (press Tab to jump to Exit)
![](pictures/dietpi-software_exit.png)

* in the bash prompt run:
`dietpi-update`
Ok > Cancel the recovery point
update > Opt out of survey > Ok
Reboots

* Log back in:
`ssh root@[IP-OF-DIETPI]`
password: `dietpi`
* In the DietPi software menu install fail2ban and make OpenSSH server the default SSH server.
Ok > Cancel > Cancel
Search `fail2ban` > Space to select > Enter
SSH server > switch from Dropbear to the OpenSSH-server
Install > Ok
Opt out of survey > Ok
Reboots again

* Log back in:
`ssh root@[IP-OF-DIETPI]`
password: `dietpi`
Changing the SSH server will change the SSH keys again. To clear:
`ssh-keygen -f "/home/[your-linux-username]/.ssh/known_hosts" -R "dietpi.IP"`


### Run the RaspiBlitz build_sdcard.sh script

* Format of the command to build the SDcard:
`wget https://raw.githubusercontent.com/[GITHUB-USERNAME]/raspiblitz/[BRANCH]/build_sdcard.sh && sudo bash build_sdcard.sh [BRANCH] [GITHUB-USERNAME]`
If you are working from a forked repo be aware of that the fork needs to be called `raspiblitz` for the git downloads to work.

* Run the forked version of @openoms:
`wget https://raw.githubusercontent.com/openoms/raspiblitz/raspiblitz-dev/build_sdcard.sh && sudo bash build_sdcard.sh raspiblitz-dev openoms`
This will take a couple minutes depending on your internet ceonnection and the processing power of the SBC.

* Restart when done and log back in now as `admin`:
`ssh admin@[IP-OF-DROIDBLITZ]`
password: `raspiblitz`

* From here he setup continues with the [RaspiBlitz Setup Process](https://github.com/rootzoll/raspiblitz/blob/master/README.md#setup-process-detailed-documentation)

---
### Examples of copying the blockchain data from a HDD using a powered USB to SATA adapter

![example setup](pictures/HDD_copy_example.jpg)
![](pictures/adapterHDD_HC1.jpg)
114 changes: 40 additions & 74 deletions dietpi/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ⚡️ RaspiBlitz on DietPi ⚡️
# ⚡️ RaspiBlitz-on-DietPi ⚡️
# A hardware agnostic platform


Expand All @@ -9,105 +9,69 @@ This guide was tested on:
* Raspberry Pi 3 B Plus - no LCD support so far
* hoping to extend this list with more compatible boards especially the ROCK64

See the hardware specs: [hardware specs](hw_comparison.md).
See the [hardware comparison](hw_comparison.md).

---

![](pictures/DroidBlitz.jpg)


## Setting up the DietPi OS

### Download the updated DietPi image

For the Odroid HC1 / HC2 / XU3 / XU4 a v6.20.6 DietPi image with fail2ban installed is uploaded here:
https://mega.nz/#!AcdVBAbR!O-W3jP5LUgw7lMY8S9XcBWcKX3IhRNAAFmaYzDXIUC0

Burn the SDCard with [Etcher](https://www.balena.io/etcher/) and extend the rootfs partition to the size of your card with a partition manager.
### Downloads and walkthrough for the [Odroid HC1 / HC2 / XU3 / XU4](Odroid_HC1_HC2.md)
---
## General guide for the RaspiBlitz-on-DietPi

Insert the SDcard into the Odroid.
### Setting up the DietPi OS

Power up and continue with: [Run the DietPi optimized Raspiblitz SDcard build script](#Run-the-DietPi-optimized-Raspiblitz-SDcard-build-script)
Getting started with DietPi: https://dietpi.com/phpbb/viewtopic.php?f=8&t=9#p9

### Build your own DietPi image:
* Start with an ARM based Single Board Computer listed on DietPi.com.
At least 1GB RAM is recommended.
Look for the SD card image for the specific SBC in the [download section](https://dietpi.com/#download).

For the Odroid HC1 / HC2 / XU3 / XU4 download this image:
https://dietpi.com/downloads/images/DietPi_OdroidXU4-ARMv7-Stretch.7z
and burn it to the SD with [Etcher](https://www.balena.io/etcher/)
* Burn the image to the SDCard with [Etcher](https://www.balena.io/etcher/) and extend the rootfs partition to the size of your card with a partition manager.

Getting started with DietPi: https://dietpi.com/phpbb/viewtopic.php?f=8&t=9#p9
* Insert the SDcard into your SBC.

In the desktop terminal on Linux / MacOS or Putty on Windows:
* Connect the HDD with a powered suitably powered adapter.
A USB 2.0 port will not be able to power an HDD so you will need extra cable
If you are connecting the HDD to a USB 3.0 port and have an at least 2A power supply, you might be able to run without an extra cable.

* Power up and log in with the desktop terminal on Linux / MacOS or Putty on Windows:
`ssh root@[IP-OF-DIETPI]`
password: `dietpi`

Ok > Cancel > Cancel
automatic apt update & apt upgrade and asks to reboot
![](pictures/dietpi_1st_reboot.png)

`ssh root@[IP-OF-DIETPI]`
after the previous update the ssh keys might change:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* You might be asked about updating DietPi. This is not a straightforward process if starting from a version <6.20. Try to update, it is best to build on the latest version.

run (can be copied from the terminal output):
* In the DietPi software menu install `fail2ban` and make `OpenSSH server` the default SSH server.
Changing the SSH server will change the SSH keys again. To clear:
`ssh-keygen -f "/home/[your-linux-username]/.ssh/known_hosts" -R "dietpi.IP"`

`ssh root@[IP-OF-DIETPI]`
yes >
password: `dietpi`

At this point if the DietPi was not updated from 6.14 it does not manage to save settings going forward.
Exit the sotware installer (press Tab to jump to Exit)
![](pictures/dietpi-software_exit.png)

in the bash prompt run:
`dietpi-update`
>Ok > Cancel the recovery point
update > >Opt out of survey > Ok
Reboots

* After every reboot log back in:
`ssh root@[IP-OF-DIETPI]`
password: `dietpi`

>Ok > Cancel > Cancel
Search `fail2ban` > Space to select > Enter
> Install > Ok
>Opt out of survey > Ok
Reboots again

## Run the DietPi optimized Raspiblitz SDcard build script

In the desktop terminal in Linux / MacOS or Putty in Windows:
password: `dietpi`

`ssh root@[IP-OF-DIETPI]`
password: `dietpi`
Should end up here on version v6.20.6 or higher:
* Should end up here on version v6.20.6 or higher:
![](pictures/bash_prompt.png)

run the SDcard build script in this format:
`wget https://raw.githubusercontent.com/[GITHUB-USERNAME]/raspiblitz/[BRANCH]/build_sdcard.sh && sudo bash build_sdcard.sh [BRANCH] [GITHUB-USERNAME]`

Be aware of that the fork needs to be called `raspiblitz` for the git download to work.
if you intend to use @openoms`s forked version:
### Run the RaspiBlitz build_sdcard.sh script

`wget https://raw.githubusercontent.com/openoms/raspiblitz/raspiblitz-dev/build_sdcard.sh && sudo bash build_sdcard.sh raspiblitz-dev openoms`
* Use this format to build the SDcard with the Raspiblitz script:
`wget https://raw.githubusercontent.com/[GITHUB-USERNAME]/raspiblitz/[BRANCH]/build_sdcard.sh && sudo bash build_sdcard.sh [BRANCH] [GITHUB-USERNAME]`
If you are working from a forked repo be aware of that the fork needs to be called `raspiblitz` for the git downloads to work.

See my example output on the Odorid HC1: [HC1_sdcard_build_output](logs/HC1_sdcard_build_output)
* Run the forked version of @openoms:
`wget https://raw.githubusercontent.com/openoms/raspiblitz/raspiblitz-dev/build_sdcard.sh && sudo bash build_sdcard.sh raspiblitz-dev openoms`
This will take a couple minutes depending on your internet connection and the processing power of the SBC.

* Restart when done and log back in now as `admin`:
`ssh admin@[IP-OF-DROIDBLITZ]`
password: raspiblitz
password: `raspiblitz`

### The setup continues as described in the RaspiBlitz setup [README.md](/README.md#documentation)
* From here he setup continues with the [RaspiBlitz Setup Process](https://github.com/rootzoll/raspiblitz/blob/master/README.md#setup-process-detailed-documentation)

### Examples of copying the blockchain data from a HDD using a powered USB to SATA adapter

![copy the blockchain from a HDD of a Raspiblitz](pictures/5_options_to_copy.png)
![example setup](pictures/HDD_copy_example.jpg)
![](pictures/adapterHDD_HC1.jpg)

---
### Useful commands for debugging:
To test a new configuration run XXcleanHDD.sh and strictly restart
(this makes _bootstrap.sh and 00mainMenu.sh run in the right order)
Expand All @@ -119,14 +83,13 @@ To test a new configuration run XXcleanHDD.sh and strictly restart
`sudo tail -n100 /mnt/hdd/bitcoin/debug.log` - shows the last 100 lines
`sudo systemctl status lnd`
`sudo journalctl -f -u lnd`
`./home/admin/XXdebugLogs.sh` - debug log collection on the raspiblitz
`./home/admin/XXdebugLogs.sh` - debug log collection on the RaspiBlitz

---

Currently the DietPi update process has a bug causing bootloop if left alone. Will be sorted once the current, >6.2 version is uploaded as the starting image.

## Excerpts from the default dietpi.txt
(https://github.com/Fourdee/DietPi/blob/master/dietpi.txt) to be used once the automatic install is feasible.
## Excerpts from the default [dietpi.txt](https://github.com/Fourdee/DietPi/blob/master/dietpi.txt)
to be used for a fully automatic SDcard building process.

### Automate installation with the dietpi.txt
Need to copy to SDcard /boot/dietpi.txt after burning the image with Etcher.
Expand Down Expand Up @@ -158,3 +121,6 @@ Allows you to automatically execute a custom script at the end of DietPi install
Option 1 = Copy your script to /boot/Automation_Custom_Script.sh and it will be executed automatically.
Option 2 = Host your script online, then use AUTO_SETUP_CUSTOM_SCRIPT_EXEC=http://myweb.com/myscript.sh, it will be downloaded and executed automatically. | 0=disabled
NB: Executed script log /var/tmp/dietpi/logs/dietpi-automation_custom_script.log

### Guide to clone your SD-cards in Windows, MacOS and Linux and shrink the image in Linux:
https://beebom.com/how-clone-raspberry-pi-sd-card-windows-linux-macos/
Loading

0 comments on commit c18394d

Please sign in to comment.