Compare commits

..

1 Commits

Author SHA1 Message Date
rootzoll
3bf3a59e66 #5122 add patch 2025-09-18 02:09:44 +02:00
24 changed files with 925 additions and 73 deletions

View File

@@ -1,5 +1,7 @@
## What's new in Version 1.12.0 of RaspiBlitz?
Work In Progress - Still Release Candidates
Introducing a new drive layout, now allowing to even boot and running the system from NVMe.
Features:

View File

@@ -96,7 +96,7 @@ apt-cdrom-setup apt-setup/cdrom/set-first boolean false
# Use network mirror
apt-mirror-setup apt-setup/use_mirror boolean true
# Disable popularity contest
# Disable polularity contest
popularity-contest popularity-contest/participate boolean false
# Select base install

View File

@@ -0,0 +1,111 @@
# ⚡️ RaspiBlitz-on-DietPi ⚡️
# For the Odroid HC1 / HC2 / XU3 / XU4 / MC1
![](pictures/DroidBlitz.jpg)
## There are 3 options provided:
* a trusted fully prebuilt SDcard image
* Automated building process.
* Build your own SDcard from the image downloaded from [dietpi.com](https://dietpi.com/#download)
---
### Download the fully prebuilt RaspiBlitz-on-DietPi SDcard image
* [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 admin@at.your.raspiblitz.ip`
password: `raspiblitz`
Using this image you can skip the rest of this page.
The setup continues with the [RaspiBlitz Setup Process](https://github.com/rootzoll/raspiblitz/blob/dev/README.md#setup-process-detailed-documentation)
---
### The automated building process:
1) Download the DietPi image for the Odroid HC1 / HC2 / XU3 / XU4 / MC1:
https://dietpi.com/downloads/images/DietPi_OdroidXU4-ARMv7-Buster.7z
2) Burn it to the SD card with [Etcher](https://www.balena.io/etcher/)
3) Right click and download the following two files: [dietpi.txt](https://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/dietpi/boot/dietpi.txt), [Automation_Custom_Script.sh](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/alternative.platforms/dietpi/boot/Automation_Custom_Script.sh)
4) Copy them to the /boot directory of the DietPi SDcard
[dietpi.txt](https://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/dietpi/boot/dietpi.txt): Overwrites the default dietpi.txt. Modified the settings to automate the DietPi setup. (see the details [here](https://github.com/rootzoll/raspiblitz/tree/dev/alternative.platforms/dietpi#excerpts-from-the-customized-dietpitxt))
[Automation_Custom_Script.sh](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/alternative.platforms/dietpi/boot/Automation_Custom_Script.sh): Runs after DietPi installation is completed. Contains the link to download and run the build_sdcard.sh from the dev branch of @rootzoll.
(Optionally open the file with a text editor and uncomment (remove the `#` from the front of) the line with the branch you want to build the SDcard from.)
5) Assemble and boot the Odroid
Insert the SDcard, connect the HDD, network cable and power supply to boot.
The automated setup will continue and the Odroid will restart at least twice during the process.
To follow the logs during the automated building process login with `root` and press CTRL+C.
`tail -n1000 -f /tmp/DietPi-Update/dietpi-update.log` - follow the dietpi-update process
`tail -n1000 -f /var/tmp/dietpi/logs/dietpi-automation_custom_script.log` follow the output of the build_sdcard.sh
6) When the setup is finished log in as `admin`:
`ssh admin@[IP-OF-RASPIBLITZ]`
password: `raspiblitz`
The setup continues with the [RaspiBlitz Setup Process](https://github.com/rootzoll/raspiblitz/blob/dev/README.md#setup-process-detailed-documentation)
---
### Build your own DietPi image:
* For the Odroid HC1 / HC2 / XU3 / XU4 / MC1 the start is this image:
https://dietpi.com/downloads/images/DietPi_OdroidXU4-ARMv7-Buster.7z
* Burn it to the SD with [Etcher](https://www.balena.io/etcher/)
* Insert the SD card, connect the HDD, the network cable and power supply to boot up the Odroid:
* 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/docs/install/#4-first-logon-on-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
Reboots again
* Log back in:
`ssh root@[IP-OF-DIETPI]`
password: `dietpi`
Changing the SSH server will change the SSH keys. To clear:
`ssh-keygen -f "/home/[your-linux-username]/.ssh/known_hosts" -R "dietpi.IP"`
### Run the RaspiBlitz build_sdcard.sh script
* Run this command to build from the master branch of @rootzoll:
`wget https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build_sdcard.sh && sudo bash build_sdcard.sh`
This will take a couple minutes depending on your internet connection and the processing power of the SBC.
* Format of the command to build the SDcard from an alternative branch:
`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.
* 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/dev/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)

View File

@@ -0,0 +1,136 @@
# ⚡️ RaspiBlitz-on-DietPi ⚡️
This guide was tested on:
* Odroid HC1
* Odroid HC2 (the same board with a 3.5" 12V HDD)
* Odroid XU4 (with HDMI screen)
* Raspberry Pi 3 B+ (with the default GPIO or HDMI display)
See the [hardware comparison](/alternative.platforms/hw_comparison.md).
The HDMI screen tested: https://www.aliexpress.com/item/3-5-inch-LCD-HDMI-USB-Touch-Screen-Real-HD-1920x1080-LCD-Display-Py-for-Raspberri/32818537950.html
---
## Specific instructions and downloads:
[Odroid HC1 / HC2 / XU3 / XU4](Odroid_HC1_HC2.md)
[Raspberry Pi](RaspberryPi.md)
[Display install script](/alternative.platforms/display.alternatives.sh)
---
## General guide for the RaspiBlitz-on-DietPi
### Setting up the DietPi OS
Getting started with DietPi: https://dietpi.com/phpbb/viewtopic.php?f=8&t=9#p9
* 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).
* Burn the image to the SDCard with [Etcher](https://www.balena.io/etcher/).
* Insert the SDcard into your SBC.
* Connect the HDD with a suitably powered adapter.
Aim to use 2 USB ports or a separate power supply to power the HDD for a more reliable setup.
* Power up and log in with the desktop terminal on Linux / MacOS or Putty on Windows:
`ssh root@[IP-OF-DIETPI]`
password: `dietpi`
* If you are asked about updating DietPi, go ahead with it. This is not always a straightforward process, but it is best to build on the latest version.
* In the DietPi software menu install `fail2ban` and make `OpenSSH server` the default SSH server.
If there is a screen installed: within the Dietpi-Config menu set the Autostart to `7: Automatic login. `
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"`
* After every reboot log back in:
`ssh root@[IP-OF-DIETPI]`
password: `dietpi`
* Should end up here on version v6.20.6 or higher:
![](pictures/bash_prompt.png)
### Run the RaspiBlitz build_sdcard.sh script
* 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.
Example to run the dev branch of @rootzoll:
`wget https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build_sdcard.sh && sudo bash build_sdcard.sh dev rootzoll`
This will take a couple minutes depending on your internet connection and the processing power of the SBC.
* After the automatic restart log back in now as `admin`:
`ssh admin@[IP-OF-RASPIBLITZ]`
password: `raspiblitz`
* From here he setup continues with the [RaspiBlitz Setup Process](https://github.com/rootzoll/raspiblitz/blob/dev/README.md#setup-process-detailed-documentation)
---
### Useful commands for debugging:
During the Automated setup:
`tail -n1000 -f /tmp/DietPi-Update/dietpi-update.log` - follow the dietpi-update process
`tail -n1000 -f /var/tmp/dietpi/logs/dietpi-automation_custom_script.log` follow the output of the build_sdcard.sh
During the RaspiBlitz setup process:
`lsblk` check the disk partitions
`tail -n1000 -f raspiblitz.log` - debug logs of bootstrap.sh
`sudo tail -f /mnt/hdd/bitcoin/debug.log` - continuous monitoring of bitcoind
`sudo tail -n100 /mnt/hdd/bitcoin/debug.log` - shows the last 100 lines
`sudo systemctl status lnd` - status of the lnd service
`sudo journalctl -f -u lnd`
`debug` - debug log collection on the RaspiBlitz
---
## Excerpts from the [customized dietpi.txt]/alternative.platforms/dietpi/boot/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.
IMPORTANT:
- Modifications to /boot/dietpi.txt will not be preserved on reboot .
- Please ensure you edit from the DietPi-RAMdisk location: /DietPi/dietpi.txt
NB: This is intended for advanced users, unless you know what you are doing, do not edit this file. ease use the DietPi programs instead.
NB: Do not remove uncommented lines, as the items are scraped by DietPi programs, on demand.
DietPi-Automation settings, applied on the 1st boot of DietPi, ONCE
Sample:
https://github.com/Fourdee/DietPi/blob/master/dietpi.txt
#### DietPi-Software to be installed automatically
Requires `AUTO_SETUP_AUTOMATED=1 `
For a list of software index's (ID's), run '/DietPi/dietpi/dietpi-software list'
No limit on number entries, add as many as you need and uncomment the line.
DietPi will automatically install all pre-reqs (eg: ALSA/XSERVER for desktops etc)
>install fail2ban
AUTO_SETUP_INSTALL_SOFTWARE_ID=73
install OpenSSH Client
#### SSH Server Selection:
>0=none
-1=dropbear
-2=opensshserver
AUTO_SETUP_SSH_SERVER_INDEX=-2
---
## Custom Script (post-networking and post-DietPi install)
Runs after DietPi installation is completed.
Allows you to automatically execute a custom script at the end of DietPi installation.
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
Find the Automation_Custom_Script.sh loaded with the build_sdcard.sh [here]/alternative.platforms/dietpi/boot/Automation_Custom_Script.sh)
---
## 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/

View File

@@ -0,0 +1,40 @@
# ⚡️ RaspiBlitz-on-DietPi ⚡️
## Tested on the Raspberry Pi 3 B +
### The automated building process:
1) Download the DietPi image for the Raspberry Pi:
https://dietpi.com/downloads/images/DietPi_RPi-ARMv6-Stretch.7z
2) Burn it to the SD card with [Etcher](https://www.balena.io/etcher/)
3) Right click and download the following two files: [DietPi.txt](https://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/dietpi/boot/dietpi.txt), [Automation_Custom_Script.sh](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/alternative.platforms/dietpi/boot/Automation_Custom_Script.sh)
4) Copy them to the /boot directory of the DietPi SDcard
[DietPi.txt](https://raw.githubusercontent.com/rootzoll/raspiblitz/master/alternative.platforms/dietpi/boot/dietpi.txt): Overwrites the default dietpi.txt. Modified the settings to automate the DietPi setup. (see the details [here](https://github.com/rootzoll/raspiblitz/tree/dev/alternative.platforms/dietpi#excerpts-from-the-customized-dietpitxt))
[Automation_Custom_Script.sh](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/alternative.platforms/dietpi/boot/Automation_Custom_Script.sh): Runs after DietPi installation is completed. Contains the link to download and run the build_sdcard.sh from the dev branch of @rootzoll.
(Optionally open the file with a text editor and uncomment (remove the `#` from the front of) the line with the branch you want to build the SDcard from.)
5) Assemble and boot the Raspberry Pi
Insert the SDcard, connect the HDD, network cable and power supply to boot.
(The default LCD will be set up automatically)
The automated setup will continue and the Raspberry Pi will restart at least twice during the process. This will take up to an hour.
To follow the logs during the automated building process login with `root` and press CTRL+C.
`tail -n1000 -f /tmp/DietPi-Update/dietpi-update.log` - follow the dietpi-update process
`tail -n1000 -f /var/tmp/dietpi/logs/dietpi-automation_custom_script.log` follow the output of the build_sdcard.sh
6) When the setup is finished log in as `admin`:
`ssh admin@[IP-OF-RASPIBLITZ]`
password: `raspiblitz`
The setup continues with the [RaspiBlitz Setup Process](https://github.com/rootzoll/raspiblitz/blob/dev/README.md#setup-process-detailed-documentation)
---
### To build manually:
[Follow the generic DietPi install process.](https://github.com/rootzoll/raspiblitz/tree/dev/alternative.platforms/dietpi#general-guide-for-the-raspiblitz-on-dietpi)

View File

@@ -0,0 +1,14 @@
# 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.
# Uncomment the line with the branch you want to build the SDcard from:
# @rootzoll v1.6 release branch:
wget https://raw.githubusercontent.com/rootzoll/raspiblitz/v1.6/build_sdcard.sh && sudo bash build_sdcard.sh
# @rootzoll dev branch:
# wget https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build_sdcard.sh && sudo bash build_sdcard.sh dev
# @openoms DietPi branch:
# wget https://raw.githubusercontent.com/openoms/raspiblitz/DietPi/build_sdcard.sh && sudo bash build_sdcard.sh DietPi openoms

View File

@@ -0,0 +1,257 @@
# IMPORTANT:
# - Modifications to /boot/dietpi.txt will not be preserved on reboot.
# - Please ensure you edit from the DietPi-RAMdisk location: /DietPi/dietpi.txt
# NB: This is intended for advanced users, unless you know what you are doing, do not edit this file. Please use the DietPi programs instead.
# NB: Do not remove uncommented lines, as the items are scraped by DietPi programs, on demand.
#------------------------------------------------------------------------------------------------------
# D I E T - P I
# DietPi-Automation settings, applied on the 1st boot of DietPi, ONCE
#------------------------------------------------------------------------------------------------------
##### Networking Options #####
# If both Ethernet and Wifi are enabled, Wifi will take priority and Ethernet will be disabled.
# 1=enabled
AUTO_SETUP_NET_ETHERNET_ENABLED=1
AUTO_SETUP_NET_WIFI_ENABLED=0
# If using WiFi, please edit the following to pre-enter creds /boot/dietpi-wifi.txt
# Enter your Static Network details below, if applicable.
AUTO_SETUP_NET_USESTATIC=0
AUTO_SETUP_NET_STATIC_IP=192.168.0.100
AUTO_SETUP_NET_STATIC_MASK=255.255.255.0
AUTO_SETUP_NET_STATIC_GATEWAY=192.168.0.1
AUTO_SETUP_NET_STATIC_DNS=8.8.8.8
# Hostname
AUTO_SETUP_NET_HOSTNAME=DietPi
# Force ethernet speeds
# NB: This is mainly aimed at Pine A64's which may have an HW issue that causes unstable 1Gbit link.
# 0=automatic speed | 10 = 10mbit, 100 = 100mbit etc
AUTO_SETUP_NET_ETH_FORCE_SPEED=0
##### Misc Options #####
# Size of swapfile to generate (MB)
# 0=Disabled | 1=auto (2GB-RAM = size) | 2+=manual
AUTO_SETUP_SWAPFILE_SIZE=1
# Optional swapfile location
AUTO_SETUP_SWAPFILE_LOCATION=/var/swap
# Unmask (enable) systemd-logind service, which is masked by default on DietPi
AUTO_UNMASK_LOGIND=0
##### Software Automation Options #####
# Fully automate the installation
# 1=Automated installation with no user inputs.
# It is HIGHLY recommended to also set CONFIG_BOOT_WAIT_FOR_NETWORK=2, to force infinite wait for network connection during boot, preventing no connection errors due to timeout.
AUTO_SETUP_AUTOMATED=1
# Global Password to be applied for the system
# Requires AUTO_SETUP_AUTOMATED=1
# Affects user "root" and "dietpi" login passwords, and, all software installed by dietpi-software, that requires a password
# eg: MySQL, Transmission, Deluge etc.
# WARN: Passwords with the any of the following characters are not supported: \"$
# WARN: Do NOT change this entry after 1st run setup of DietPi has been completed. It is always scraped by dietpi-software.
AUTO_SETUP_GLOBAL_PASSWORD=dietpi
# DietPi-Software to automatically install. | requires AUTO_SETUP_AUTOMATED=1
# For a list of software index's (ID's), run '/DietPi/dietpi/dietpi-software list'
# No limit on number entries, add as many as you need and uncomment the line.
# DietPi will automatically install all pre-reqs (eg: ALSA/XSERVER for desktops etc)
# - Examples:
#AUTO_SETUP_INSTALL_SOFTWARE_ID=23 #will install Desktop LXDE
#AUTO_SETUP_INSTALL_SOFTWARE_ID=74 #will install LAMP webserver stack
#AUTO_SETUP_INSTALL_SOFTWARE_ID=44 #will install Bittorrent transmission
AUTO_SETUP_INSTALL_SOFTWARE_ID=73 # install fail2ban
# DietPi-Software Choice System
# SSH Server Selection:
# 0=none
# -1=dropbear
# -2=opensshserver
AUTO_SETUP_SSH_SERVER_INDEX=-2
# File Server Selection:
# 0=none/manual
# -1=proftp
# -2=samba
AUTO_SETUP_FILE_SERVER_INDEX=0
# Logging Mode Selection:
# 0=none/manual
# -1=ramlog 1h clear
# -2=ramlog 1h save clear
# -3=logrotate + rsyslog
AUTO_SETUP_LOGGING_INDEX=-1
# RAMlog max tmpfs size (MB). 50MB should be fine for single use. 200MB+ for heavy webserver and access log use etc.
AUTO_SETUP_RAMLOG_MAXSIZE=50
# Webserver Preference Selection:
# NB: This will get ignored, if you have manually selected any WEBSERVER_Stack.
# 0=Apache2
# -1=Nginx
# -2=Lighttpd
AUTO_SETUP_WEB_SERVER_INDEX=-2
# DietPi-Autostart | Requires AUTO_SETUP_AUTOMATED=1
# After installation is completed, which program should the system boot to?
# 0=Console 7=Console+auto root login | 1=Kodi 2=Desktops (LXDE/MATE etc) 5=DietPi-Cloudshell 6=Uae4ARM (Fastboot) 8=Uae4ARM (standard boot) 9=dxx-rebirth
AUTO_SETUP_AUTOSTART_TARGET_INDEX=7 # 7=Console+auto root login is changed to pi in build_sdcard.sh
# Language/Regional settings | Requires AUTO_SETUP_AUTOMATED=1
# Timezone eg: Europe/London America/New_York | Full list (TZ*): https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
AUTO_SETUP_TIMEZONE=Europe/London
# Locale eg: en_GB.UTF-8 / en_US.UTF-8 etc. One entry ONLY.
AUTO_SETUP_LOCALE=en_GB.UTF-8
# Keyboard Layout eg: gb us de fr
AUTO_SETUP_KEYBOARD_LAYOUT=gb
# Custom Script (pre-networking and pre-DietPi install) | Runs before DietPi installation and networking
# Allows you to automatically execute a custom script before networking and DietPi installation is started
# Option 1 = Copy your script to /boot/Automation_Custom_PreScript.sh and it will be executed automatically.
# NB: Executed script log /var/tmp/dietpi/logs/dietpi-automation_custom_prescript.log
# Custom Script (post-networking and post-DietPi install) | Runs after DietPi installation is completed
# Allows you to automatically execute a custom script at the end of DietPi installation.
# 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
AUTO_SETUP_CUSTOM_SCRIPT_EXEC=0
#Disable HDMI (and GPU/VPU where supported) output for supported devices:
# RPi | Odroid C1 | Odroid C2
AUTO_SETUP_HEADLESS=0
#------------------------------------------------------------------------------------------------------
# D I E T - P I
# DietPi-Config settings
#------------------------------------------------------------------------------------------------------
#Cpu Governor | ondemand | powersave | performance | conservative
CONFIG_CPU_GOVERNOR=ondemand
CONFIG_CPU_USAGE_THROTTLE_UP=50
#CPU Frequency Limits
# NB: Intel CPU's use a percentage value (%) from 0-100 (eg: 55)
# NB: All other devices must use a specific MHz value (eg: 1600)
# Limit the MAX CPU frequency for all cores | Disabled=disabled
CONFIG_CPU_MAX_FREQ=Disabled
# Limit the MIN CPU frequency for all cores | Disabled=disabled
CONFIG_CPU_MIN_FREQ=Disabled
# Disable Intel-based turbo/boost stepping. This flag should not be required, setting <100% MAX frequency should disable Turbo on Intel CPU's.
CONFIG_CPU_DISABLE_TURBO=0
#Min value 10000 microseconds (10ms)
CONFIG_CPU_ONDEMAND_SAMPLE_RATE=25000
#sampling rate * down factor / 1000 = Milliseconds (40 = 1000ms when sampling rate is 25000)
CONFIG_CPU_ONDEMAND_SAMPLE_DOWNFACTOR=80
#Proxy settings | System-wide proxy settings. Use dietpi-config > networking options to apply.
# NB: Do not modify, you must use dietpi-config to configure/set options
CONFIG_PROXY_ENABLED=0
CONFIG_PROXY_ADDRESS=MyProxyServer.com
CONFIG_PROXY_PORT=8080
CONFIG_PROXY_USERNAME=
CONFIG_PROXY_PASSWORD=
#Delay boot until network is established: 0=disabled | 1=10 second wait max (default) | 2=infinite wait
CONFIG_BOOT_WAIT_FOR_NETWORK=2
#DietPi checks for updates (allows dietpi to check for updates on a daily basis and boot using a <1kb file download.)
CONFIG_CHECK_DIETPI_UPDATES=1
# Optional: Automatically update DietPi when updates are available. | requires CONFIG_CHECK_DIETPI_UPDATES=1
CONFIG_AUTO_DIETPI_UPDATES=0
#NTPD Update Mode: 0=disabled | 1=boot only | 2=boot + daily | 3=boot + hourly | 4=Daemon + Drift
CONFIG_NTP_MODE=2
#WiFi country code. 2 character value (eg GB US DE JP): https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
CONFIG_WIFI_COUNTRY_CODE=GB
#Serial Console: Set to 0 if you do not require serial console.
CONFIG_SERIAL_CONSOLE_ENABLE=1
#Soundcard
CONFIG_SOUNDCARD=none
#LCD Panel addon
# NB: Do not modify, you must use dietpi-config to configure/set options
CONFIG_LCDPANEL=none
#IPv6
CONFIG_ENABLE_IPV6=1
#Prefer IPv4 with APT and wget, NB: This has no effect if IPv6 is disabled anyway!
CONFIG_PREFER_IPV4=1
#APT mirrors which are applied to /etc/apt/sources.list | Values here will also be applied during 1st run setup
# Raspbian = https://www.raspbian.org/RaspbianMirrors
# Debian = https://www.debian.org/mirror/official#list
CONFIG_APT_RASPBIAN_MIRROR=http://raspbian.raspberrypi.org/raspbian
CONFIG_APT_DEBIAN_MIRROR=https://deb.debian.org/debian/
#NTPD mirror, applied to /etc/ntp.conf
# For a full list, please see http://www.pool.ntp.org
# Please remove the initial integer and full stop from the value (removing 0.). eg: debian.pool.ntp.org
CONFIG_NTP_MIRROR=debian.pool.ntp.org
#------------------------------------------------------------------------------------------------------
# D I E T - P I
# DietPi-Software settings
#------------------------------------------------------------------------------------------------------
#Enter your EmonCMS.org write API key here. It will be applied automatically during EmonPi/Hub installation.
# eg: SOFTWARE_EMONHUB_APIKEY=b4dfmk2o203mmxx93a
SOFTWARE_EMONHUB_APIKEY=
#VNC Server Options
SOFTWARE_VNCSERVER_WIDTH=1280
SOFTWARE_VNCSERVER_HEIGHT=720
SOFTWARE_VNCSERVER_DEPTH=16
SOFTWARE_VNCSERVER_DISPLAY_INDEX=1
SOFTWARE_VNCSERVER_SHARE_DESKTOP=0
#Optional username for ownCloud/Nextcloud admin account, the default is 'admin'. Applied during installation.
SOFTWARE_OWNCLOUD_NEXTCLOUD_USERNAME=admin
#Optional data directory for ownCloud, default is '/mnt/dietpi_userdata/owncloud_data'. Applied during installation.
# This option is for advanced users. For full compatibility, please keep this options defaults, and, use dietpi-drive_manager to move the DietPi user data location.
SOFTWARE_OWNCLOUD_DATADIR=/mnt/dietpi_userdata/owncloud_data
#Optional data directory for Nextcloud, default is '/mnt/dietpi_userdata/nextcloud_data'. Applied during installation.
# This option is for advanced users. For full compatibility, please keep this options defaults, and, use dietpi-drive_manager to move the DietPi user data location.
SOFTWARE_NEXTCLOUD_DATADIR=/mnt/dietpi_userdata/nextcloud_data
#Wifi Hotspot
SOFTWARE_WIFI_HOTSPOT_SSID=DietPi-HotSpot
# minimum of 8 characters
SOFTWARE_WIFI_HOTSPOT_KEY=dietpihotspot
SOFTWARE_WIFI_HOTSPOT_CHANNEL=3
#Xorg options
# DPI 96(default) 120(+25%) 144(+50%) 168(+75%) 192(+100%)
SOFTWARE_XORG_DPI=96
#Chromium Options
SOFTWARE_CHROMIUM_RES_X=1280
SOFTWARE_CHROMIUM_RES_Y=720
SOFTWARE_CHROMIUM_AUTOSTART_URL=https://google.com
#------------------------------------------------------------------------------------------------------
# D I E T - P I
# Dev settings
#------------------------------------------------------------------------------------------------------
DEV_GITBRANCH=master
DEV_GITOWNER=Fourdee
#------------------------------------------------------------------------------------------------------
# D I E T - P I
# Settings, automatically added by dietpi-update
#------------------------------------------------------------------------------------------------------

View File

@@ -0,0 +1,256 @@
# IMPORTANT:
# - Modifications to /boot/dietpi.txt will not be preserved on reboot.
# - Please ensure you edit from the DietPi-RAMdisk location: /DietPi/dietpi.txt
# NB: This is intended for advanced users, unless you know what you are doing, do not edit this file. Please use the DietPi programs instead.
# NB: Do not remove uncommented lines, as the items are scraped by DietPi programs, on demand.
#------------------------------------------------------------------------------------------------------
# D I E T - P I
# DietPi-Automation settings, applied on the 1st boot of DietPi, ONCE
#------------------------------------------------------------------------------------------------------
##### Networking Options #####
# If both Ethernet and Wifi are enabled, Wifi will take priority and Ethernet will be disabled.
# 1=enabled
AUTO_SETUP_NET_ETHERNET_ENABLED=1
AUTO_SETUP_NET_WIFI_ENABLED=0
# If using WiFi, please edit the following to pre-enter creds /boot/dietpi-wifi.txt
# Enter your Static Network details below, if applicable.
AUTO_SETUP_NET_USESTATIC=0
AUTO_SETUP_NET_STATIC_IP=192.168.0.100
AUTO_SETUP_NET_STATIC_MASK=255.255.255.0
AUTO_SETUP_NET_STATIC_GATEWAY=192.168.0.1
AUTO_SETUP_NET_STATIC_DNS=8.8.8.8
# Hostname
AUTO_SETUP_NET_HOSTNAME=DietPi
# Force ethernet speeds
# NB: This is mainly aimed at Pine A64's which may have an HW issue that causes unstable 1Gbit link.
# 0=automatic speed | 10 = 10mbit, 100 = 100mbit etc
AUTO_SETUP_NET_ETH_FORCE_SPEED=0
##### Misc Options #####
# Size of swapfile to generate (MB)
# 0=Disabled | 1=auto (2GB-RAM = size) | 2+=manual
AUTO_SETUP_SWAPFILE_SIZE=1
# Optional swapfile location
AUTO_SETUP_SWAPFILE_LOCATION=/var/swap
# Unmask (enable) systemd-logind service, which is masked by default on DietPi
AUTO_UNMASK_LOGIND=0
##### Software Automation Options #####
# Fully automate the installation
# 1=Automated installation with no user inputs.
# It is HIGHLY recommended to also set CONFIG_BOOT_WAIT_FOR_NETWORK=2, to force infinite wait for network connection during boot, preventing no connection errors due to timeout.
AUTO_SETUP_AUTOMATED=0
# Global Password to be applied for the system
# Requires AUTO_SETUP_AUTOMATED=1
# Affects user "root" and "dietpi" login passwords, and, all software installed by dietpi-software, that requires a password
# eg: MySQL, Transmission, Deluge etc.
# WARN: Passwords with the any of the following characters are not supported: \"$
# WARN: Do NOT change this entry after 1st run setup of DietPi has been completed. It is always scraped by dietpi-software.
AUTO_SETUP_GLOBAL_PASSWORD=dietpi
# DietPi-Software to automatically install. | requires AUTO_SETUP_AUTOMATED=1
# For a list of software index's (ID's), run '/DietPi/dietpi/dietpi-software list'
# No limit on number entries, add as many as you need and uncomment the line.
# DietPi will automatically install all pre-reqs (eg: ALSA/XSERVER for desktops etc)
# - Examples:
#AUTO_SETUP_INSTALL_SOFTWARE_ID=23 #will install Desktop LXDE
#AUTO_SETUP_INSTALL_SOFTWARE_ID=74 #will install LAMP webserver stack
#AUTO_SETUP_INSTALL_SOFTWARE_ID=44 #will install Bittorrent transmission
# DietPi-Software Choice System
# SSH Server Selection:
# 0=none
# -1=dropbear
# -2=opensshserver
AUTO_SETUP_SSH_SERVER_INDEX=-1
# File Server Selection:
# 0=none/manual
# -1=proftp
# -2=samba
AUTO_SETUP_FILE_SERVER_INDEX=0
# Logging Mode Selection:
# 0=none/manual
# -1=ramlog 1h clear
# -2=ramlog 1h save clear
# -3=logrotate + rsyslog
AUTO_SETUP_LOGGING_INDEX=-1
# RAMlog max tmpfs size (MB). 50MB should be fine for single use. 200MB+ for heavy webserver and access log use etc.
AUTO_SETUP_RAMLOG_MAXSIZE=50
# Webserver Preference Selection:
# NB: This will get ignored, if you have manually selected any WEBSERVER_Stack.
# 0=Apache2
# -1=Nginx
# -2=Lighttpd
AUTO_SETUP_WEB_SERVER_INDEX=-2
# DietPi-Autostart | Requires AUTO_SETUP_AUTOMATED=1
# After installation is completed, which program should the system boot to?
# 0=Console 7=Console+auto root login | 1=Kodi 2=Desktops (LXDE/MATE etc) 5=DietPi-Cloudshell 6=Uae4ARM (Fastboot) 8=Uae4ARM (standard boot) 9=dxx-rebirth
AUTO_SETUP_AUTOSTART_TARGET_INDEX=0
# Language/Regional settings | Requires AUTO_SETUP_AUTOMATED=1
# Timezone eg: Europe/London America/New_York | Full list (TZ*): https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
AUTO_SETUP_TIMEZONE=Europe/London
# Locale eg: en_GB.UTF-8 / en_US.UTF-8 etc. One entry ONLY.
AUTO_SETUP_LOCALE=en_GB.UTF-8
# Keyboard Layout eg: gb us de fr
AUTO_SETUP_KEYBOARD_LAYOUT=gb
# Custom Script (pre-networking and pre-DietPi install) | Runs before DietPi installation and networking
# Allows you to automatically execute a custom script before networking and DietPi installation is started
# Option 1 = Copy your script to /boot/Automation_Custom_PreScript.sh and it will be executed automatically.
# NB: Executed script log /var/tmp/dietpi/logs/dietpi-automation_custom_prescript.log
# Custom Script (post-networking and post-DietPi install) | Runs after DietPi installation is completed
# Allows you to automatically execute a custom script at the end of DietPi installation.
# 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
AUTO_SETUP_CUSTOM_SCRIPT_EXEC=0
#Disable HDMI (and GPU/VPU where supported) output for supported devices:
# RPi | Odroid C1 | Odroid C2
AUTO_SETUP_HEADLESS=0
#------------------------------------------------------------------------------------------------------
# D I E T - P I
# DietPi-Config settings
#------------------------------------------------------------------------------------------------------
#Cpu Governor | ondemand | powersave | performance | conservative
CONFIG_CPU_GOVERNOR=ondemand
CONFIG_CPU_USAGE_THROTTLE_UP=50
#CPU Frequency Limits
# NB: Intel CPU's use a percentage value (%) from 0-100 (eg: 55)
# NB: All other devices must use a specific MHz value (eg: 1600)
# Limit the MAX CPU frequency for all cores | Disabled=disabled
CONFIG_CPU_MAX_FREQ=Disabled
# Limit the MIN CPU frequency for all cores | Disabled=disabled
CONFIG_CPU_MIN_FREQ=Disabled
# Disable Intel-based turbo/boost stepping. This flag should not be required, setting <100% MAX frequency should disable Turbo on Intel CPU's.
CONFIG_CPU_DISABLE_TURBO=0
#Min value 10000 microseconds (10ms)
CONFIG_CPU_ONDEMAND_SAMPLE_RATE=25000
#sampling rate * down factor / 1000 = Milliseconds (40 = 1000ms when sampling rate is 25000)
CONFIG_CPU_ONDEMAND_SAMPLE_DOWNFACTOR=80
#Proxy settings | System-wide proxy settings. Use dietpi-config > networking options to apply.
# NB: Do not modify, you must use dietpi-config to configure/set options
CONFIG_PROXY_ENABLED=0
CONFIG_PROXY_ADDRESS=MyProxyServer.com
CONFIG_PROXY_PORT=8080
CONFIG_PROXY_USERNAME=
CONFIG_PROXY_PASSWORD=
#Delay boot until network is established: 0=disabled | 1=10 second wait max (default) | 2=infinite wait
CONFIG_BOOT_WAIT_FOR_NETWORK=1
#DietPi checks for updates (allows dietpi to check for updates on a daily basis and boot using a <1kb file download.)
CONFIG_CHECK_DIETPI_UPDATES=1
# Optional: Automatically update DietPi when updates are available. | requires CONFIG_CHECK_DIETPI_UPDATES=1
CONFIG_AUTO_DIETPI_UPDATES=0
#NTPD Update Mode: 0=disabled | 1=boot only | 2=boot + daily | 3=boot + hourly | 4=Daemon + Drift
CONFIG_NTP_MODE=2
#WiFi country code. 2 character value (eg GB US DE JP): https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
CONFIG_WIFI_COUNTRY_CODE=GB
#Serial Console: Set to 0 if you do not require serial console.
CONFIG_SERIAL_CONSOLE_ENABLE=1
#Soundcard
CONFIG_SOUNDCARD=none
#LCD Panel addon
# NB: Do not modify, you must use dietpi-config to configure/set options
CONFIG_LCDPANEL=none
#IPv6
CONFIG_ENABLE_IPV6=1
#Prefer IPv4 with APT and wget, NB: This has no effect if IPv6 is disabled anyway!
CONFIG_PREFER_IPV4=1
#APT mirrors which are applied to /etc/apt/sources.list | Values here will also be applied during 1st run setup
# Raspbian = https://www.raspbian.org/RaspbianMirrors
# Debian = https://www.debian.org/mirror/official#list
CONFIG_APT_RASPBIAN_MIRROR=http://raspbian.raspberrypi.org/raspbian
CONFIG_APT_DEBIAN_MIRROR=https://deb.debian.org/debian/
#NTPD mirror, applied to /etc/ntp.conf
# For a full list, please see http://www.pool.ntp.org
# Please remove the initial integer and full stop from the value (removing 0.). eg: debian.pool.ntp.org
CONFIG_NTP_MIRROR=debian.pool.ntp.org
#------------------------------------------------------------------------------------------------------
# D I E T - P I
# DietPi-Software settings
#------------------------------------------------------------------------------------------------------
#Enter your EmonCMS.org write API key here. It will be applied automatically during EmonPi/Hub installation.
# eg: SOFTWARE_EMONHUB_APIKEY=b4dfmk2o203mmxx93a
SOFTWARE_EMONHUB_APIKEY=
#VNC Server Options
SOFTWARE_VNCSERVER_WIDTH=1280
SOFTWARE_VNCSERVER_HEIGHT=720
SOFTWARE_VNCSERVER_DEPTH=16
SOFTWARE_VNCSERVER_DISPLAY_INDEX=1
SOFTWARE_VNCSERVER_SHARE_DESKTOP=0
#Optional username for ownCloud/Nextcloud admin account, the default is 'admin'. Applied during installation.
SOFTWARE_OWNCLOUD_NEXTCLOUD_USERNAME=admin
#Optional data directory for ownCloud, default is '/mnt/dietpi_userdata/owncloud_data'. Applied during installation.
# This option is for advanced users. For full compatibility, please keep this options defaults, and, use dietpi-drive_manager to move the DietPi user data location.
SOFTWARE_OWNCLOUD_DATADIR=/mnt/dietpi_userdata/owncloud_data
#Optional data directory for Nextcloud, default is '/mnt/dietpi_userdata/nextcloud_data'. Applied during installation.
# This option is for advanced users. For full compatibility, please keep this options defaults, and, use dietpi-drive_manager to move the DietPi user data location.
SOFTWARE_NEXTCLOUD_DATADIR=/mnt/dietpi_userdata/nextcloud_data
#Wifi Hotspot
SOFTWARE_WIFI_HOTSPOT_SSID=DietPi-HotSpot
# minimum of 8 characters
SOFTWARE_WIFI_HOTSPOT_KEY=dietpihotspot
SOFTWARE_WIFI_HOTSPOT_CHANNEL=3
#Xorg options
# DPI 96(default) 120(+25%) 144(+50%) 168(+75%) 192(+100%)
SOFTWARE_XORG_DPI=96
#Chromium Options
SOFTWARE_CHROMIUM_RES_X=1280
SOFTWARE_CHROMIUM_RES_Y=720
SOFTWARE_CHROMIUM_AUTOSTART_URL=https://google.com
#------------------------------------------------------------------------------------------------------
# D I E T - P I
# Dev settings
#------------------------------------------------------------------------------------------------------
DEV_GITBRANCH=master
DEV_GITOWNER=Fourdee
#------------------------------------------------------------------------------------------------------
# D I E T - P I
# Settings, automatically added by dietpi-update
#------------------------------------------------------------------------------------------------------

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

82
home.admin/XXcleanHDD.sh Executable file
View File

@@ -0,0 +1,82 @@
#!/bin/bash
echo ""
extraParameter="$1"
forceParameter="$2"
if [ "${extraParameter}" = "-all" ]; then
echo "## This will DELETE ALL DATA & POSSIBLE FUNDS from the HDD ##"
echo "# Press ENTER to really continue - CTRL+c to CANCEL (last chance)"
read key
echo "# stopping services ... (please wait)"
echo "# - swap"
sudo dphys-swapfile swapoff
echo "# - background"
sudo systemctl stop background 2>/dev/null
echo "# - lnd"
sudo systemctl stop lnd.service 2>/dev/null
echo "# - blockchain"
sudo systemctl stop bitcoind.service 2>/dev/null
# delete plain all on HDD
echo "# cleaning HDD ... (please wait)"
sudo rm -rfv /mnt/hdd/*
elif [ "${extraParameter}" = "-blockchain" ]; then
if [ "${forceParameter}" != "-force" ]; then
echo "# This will DELETE JUST your blockchain from the HDD."
echo "# --> It will keep your LND data and other setups."
echo "# --> You will get presented re-download options."
echo "# Press ENTER to really continue - CTRL+c to CANCEL (last chance)"
read key
fi
echo "# stopping services ... (please wait)"
sudo systemctl stop bitcoind.service 2>/dev/null
echo "selective blockchain data ... (please wait)"
# conf & wallet files are in /mnt/hdd/app-data/bitcoin - so delete all in storage
sudo rm -r -f /mnt/hdd/app-storage/bitcoin/*
sudo /home/admin/config.scripts/blitz.data.sh link
echo "OK Blockchain data deleted, restart needed - you may want now run: /home/admin/98repairBlockchain.sh"
else
echo "## This will DELETE your personal data & POSSIBLE FUNDS from the HDD ##"
echo "--> It will keep Blockchain data - so you dont have to download/copy again."
echo "Press ENTER to really continue - CTRL+c to CANCEL (last chance)"
read key
echo "stopping services ... (please wait)"
sudo dphys-swapfile swapoff
sudo systemctl stop background 2>/dev/null
sudo systemctl stop bitcoind.service 2>/dev/null
# just delete selective
echo "selective delete ... (please wait)"
# bitcoin mainnet (clean working files)
sudo rm -f /mnt/hdd/app-storage/bitcoin/* 2>/dev/null
sudo rm -f /mnt/hdd/app-storage/bitcoin/.* 2>/dev/null
sudo rm -f -r /mnt/hdd/app-storage/bitcoin/indexes 2>/dev/null
# delete all directories in /mnt/hdd/app-storage - but not the "bitcoin" folder
sudo mv /mnt/hdd/app-storage/bitcoin /mnt/hdd/app-data/bitcoin-temp 2>/dev/null
sudo rm -f -r /mnt/hdd/app-storage/* 2>/dev/null
sudo mv /mnt/hdd/app-data/bitcoin-temp /mnt/hdd/app-storage/bitcoin 2>/dev/null
# delete rest of all data
sudo rm -f -r /mnt/hdd/hdd/app-data 2>/dev/null
sudo rm -f -r /mnt/disk_storage/app-data 2>/dev/null
sudo rm -f -r /mnt/disk_data/app-data 2>/dev/null
sudo rm -f -r /mnt/disk_storage/temp 2>/dev/null
fi
echo "*************************"
echo "OK - the HDD is now clean"
echo "*************************"
echo "reboot -> sudo shutdown -r now"
echo "power off -> sudo shutdown now"

View File

@@ -163,26 +163,6 @@ function release() {
fi
}
# command: clean
function clean() {
firstPARAM=$1
echo "- deletes all data from drive - just keeps blocks and chainstate (LOSS OF FUNDS POSSIBLE!)"
source <(/home/admin/_cache.sh get state)
if [ "$state" != "waitsetup" ]; then
echo "error='can only be called on fresh sd card image - before setup or recover'"
exit 1
fi
source <(sudo /home/admin/config.scripts/blitz.data.sh status)
if [ "${storageDevice}" = "" ]; then
echo "error='no storage device'"
exit 1
fi
confirmMsg clean
if [ $confirm -eq 1 ]; then
sudo /home/admin/config.scripts/blitz.data.sh clean STORAGE "${storageDevice}"
fi
}
# command: fatpack
function fatpack() {
echo "Command to be called only on a fresh stopped minimal build to re-pack installs."

View File

@@ -63,10 +63,6 @@ if [ "$1" == "prestart" ]; then
echo "${bitcoinlog_entry}=${bitcoinlog_path}" >> /mnt/hdd/app-data/bitcoin/bitcoin.conf
fi
# delete any debuglogfile in app-storage and link to new location in app-data
rm -f /mnt/hdd/app-storage/bitcoin/debug.log
ln -s /mnt/hdd/app-data/bitcoin/debug.log /mnt/hdd/app-storage/bitcoin/debug.log
# make sure entry has the correct value
echo "# make sure entry(${bitcoinlog_entry}) has the correct value(${bitcoinlog_path})"
sed -i "s|^${bitcoinlog_entry}=.*|${bitcoinlog_entry}=${bitcoinlog_path}|g" /mnt/hdd/app-data/bitcoin/bitcoin.conf

View File

@@ -7,7 +7,7 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
>&2 echo "# blitz.data.sh setup STOARGE [device] combinedData=[0|1] addSystemPartition=[0|1]"
>&2 echo "# blitz.data.sh setup SYSTEM [device]"
>&2 echo "# blitz.data.sh setup DATA [device]"
>&2 echo "# blitz.data.sh clean STOARGE [device] combinedData=[0|1]"
>&2 echo "# blitz.data.sh clean STOARGE [device] combinedData=[0|1] addSystemPartition=[0|1]"
>&2 echo "# blitz.data.sh clean SYSTEM [device]"
>&2 echo "# blitz.data.sh clean DATA [device]"
>&2 echo "# blitz.data.sh copy-system [device] [system|storage]"
@@ -1142,7 +1142,6 @@ if [ "$action" = "link" ]; then
mkdir -p "${dataMountedPath}/app-data/bitcoin"
chown bitcoin:bitcoin "${dataMountedPath}/app-data/bitcoin"
if [ -d "${storageMountedPath}/bitcoin" ]; then
/home/admin/_cache.sh set message "hdd-migrate"
echo "# moving old data from ${storageMountedPath}/bitcoin to ${storageMountedPath}/app-storage/bitcoin"
rsync -a --remove-source-files --prune-empty-dirs ${storageMountedPath}/bitcoin/ ${storageMountedPath}/app-storage/bitcoin/
if [ $? -ne 0 ]; then
@@ -1181,7 +1180,6 @@ if [ "$action" = "link" ]; then
mkdir -p "${dataMountedPath}/app-data/lnd"
chown bitcoin:bitcoin "${dataMountedPath}/app-data/lnd"
if [ -d "${storageMountedPath}/lnd" ]; then
/home/admin/_cache.sh set message "hdd-migrate"
echo "# moving old data from ${storageMountedPath}/lnd to ${dataMountedPath}/app-data/lnd"
rsync -a --remove-source-files --prune-empty-dirs ${storageMountedPath}/lnd/ ${dataMountedPath}/app-data/lnd/
if [ $? -ne 0 ]; then
@@ -1204,7 +1202,6 @@ if [ "$action" = "link" ]; then
mkdir -p "${dataMountedPath}/app-data/tor"
chown debian-tor:debian-tor "${dataMountedPath}/app-data/tor"
if [ -d "${storageMountedPath}/tor" ]; then
/home/admin/_cache.sh set message "hdd-migrate"
echo "# moving old data from ${storageMountedPath}/tor to ${dataMountedPath}/app-data/tor"
rsync -a --remove-source-files --prune-empty-dirs ${storageMountedPath}/tor/ ${dataMountedPath}/app-data/tor/
if [ $? -ne 0 ]; then
@@ -1899,7 +1896,7 @@ if [ "$action" = "setup" ]; then
echo "storagePartition='${actionDevicePartitionBase}3'"
echo "# storagePartition(${actionDevicePartitionBase}3)" >> ${logFile}
# STORAGE without System partition (if addSystemPartition=0)
# STORAGE without System partition (if addSystemPartition=0 or not set)
elif [ "${actionType}" = "STORAGE" ] && [ ${actionCreateSystemPartition} -eq 0 ]; then
echo "# STORAGE partitioning (no boot)" >> ${logFile}
@@ -2228,23 +2225,16 @@ if [ "$action" = "recover" ] || [ "$action" = "clean" ]; then
fi
# in both setups /mnt/disk_storage/app-storage should exist
# delete all data in /mnt/disk_storage except for /mnt/disk_storage/app-storage
# Cleaning storage partition - preserving app-storage
echo "# Cleaning storage partition - preserving blockchain (blocks & chainstate)" >> ${logFile}
echo "# Cleaning storage partition - preserving app-storage" >> ${logFile}
# Alte Logik löschte versehentlich chainstate. Neu:
# 1. Auf Root der Partition alles löschen außer app-storage
find /mnt/disk_storage -mindepth 1 -maxdepth 1 \
-not -name "app-storage" -exec rm -rf {} \;
# 2. In app-storage alles löschen außer bitcoin
find /mnt/disk_storage/app-storage -mindepth 1 -maxdepth 1 \
-not -name "bitcoin" -exec rm -rf {} \;
# 3. In bitcoin alles löschen außer blocks und chainstate (beides behalten)
if [ -d /mnt/disk_storage/app-storage/bitcoin ]; then
find /mnt/disk_storage/app-storage/bitcoin -mindepth 1 -maxdepth 1 \
-not -name "blocks" -not -name "chainstate" -exec rm -rf {} \;
fi
# DEBUG: Log partition count before cleaning operations
beforeCleaningCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
echo "# DEBUG CLEAN STORAGE: Partition count before cleaning operations: ${beforeCleaningCount}" >> ${logFile}
# Logging nach Cleanup
# TODO: This is not working yet .. refactor later
find /mnt/disk_storage -maxdepth 1 -not -name "app-storage" -not -name "." -not -name ".." -exec rm -rf {} \;
find /mnt/disk_storage/app-storage -maxdepth 1 -not -name "bitcoin" -not -name "." -not -name ".." -exec rm -rf {} \;
find /mnt/disk_storage/app-storage/bitcoin -maxdepth 1 -not -name "blocks" -name "chainstate" -not -name "." -not -name ".." -exec rm -rf {} \;
ls -la /mnt/disk_storage >> ${logFile}
ls -la /mnt/disk_storage/app-storage >> ${logFile}
ls -la /mnt/disk_storage/app-storage/bitcoin >> ${logFile}

View File

@@ -149,7 +149,7 @@ EOL
# get RPC credentials
RPC_USER=$(sudo cat /mnt/hdd/app-data/bitcoin/bitcoin.conf | grep rpcuser | cut -c 9-)
RPC_PASS=$(sudo cat /mnt/hdd/app-data/bitcoin/bitcoin.conf | grep rpcpassword | cut -c 13-)
RPC_PASS=$(sudo cat /mnt/hd/app-data/bitcoin/bitcoin.conf | grep rpcpassword | cut -c 13-)
echo "# create .env file"
echo "

View File

@@ -27,11 +27,9 @@ activateBitcoinOverTor()
deactivateBitcoinOverTor
sudo chmod 777 "/home/bitcoin/.${network}/${network}.conf"
sudo sed -i "s/^onlynet=.*//g" "/home/bitcoin/.${network}/${network}.conf"
echo "Adding Tor config to the the ${network}.conf ..."
sudo sed -i "s/^torpassword=.*//g" "/home/bitcoin/.${network}/${network}.conf"
echo "onlynet=onion" | sudo tee -a "/home/bitcoin/.${network}/${network}.conf"
echo "onlynet=i2p" | sudo tee -a "/home/bitcoin/.${network}/${network}.conf"
echo "proxy=127.0.0.1:9050" | sudo tee -a "/home/bitcoin/.${network}/${network}.conf"
echo "main.bind=127.0.0.1" | sudo tee -a "/home/bitcoin/.${network}/${network}.conf"
echo "test.bind=127.0.0.1" | sudo tee -a "/home/bitcoin/.${network}/${network}.conf"
@@ -53,7 +51,7 @@ activateBitcoinOverTor()
deactivateBitcoinOverTor()
{
# alte/tor-bezogene Settings entfernen
# always make sure also to remove old settings
sudo sed -i "s/^onlynet=.*//g" "/home/bitcoin/.${network}/${network}.conf"
sudo sed -i "s/^main.addnode=.*//g" "/home/bitcoin/.${network}/${network}.conf"
sudo sed -i "s/^test.addnode=.*//g" "/home/bitcoin/.${network}/${network}.conf"
@@ -62,14 +60,8 @@ deactivateBitcoinOverTor()
sudo sed -i "s/^test.bind=.*//g" "/home/bitcoin/.${network}/${network}.conf"
sudo sed -i "s/^dnsseed=.*//g" "/home/bitcoin/.${network}/${network}.conf"
sudo sed -i "s/^dns=.*//g" "/home/bitcoin/.${network}/${network}.conf"
# explizit only IPv4 & IPv6
echo "onlynet=ipv4" | sudo tee -a "/home/bitcoin/.${network}/${network}.conf" >/dev/null
echo "onlynet=ipv6" | sudo tee -a "/home/bitcoin/.${network}/${network}.conf" >/dev/null
# remove empty lines
sudo sed -i '/^ *$/d' "/home/bitcoin/.${network}/${network}.conf"
sudo cp "/home/bitcoin/.${network}/${network}.conf" "/home/admin/.${network}/${network}.conf"
sudo chown admin:admin "/home/admin/.${network}/${network}.conf"
}
@@ -175,7 +167,7 @@ EOF
/home/admin/config.scripts/blitz.conf.sh set runBehindTor "off"
# remove "debug=tor" from bitcoin.conf
sudo sed -i '/^debug=tor$/d' /mnt/hdd/app-data/bitcoin/bitcoin.conf
sudo sed -i '/^debug=tor$/d' /mnt/hdd/app-databitcoin/bitcoin.conf
# deactivate bitcoin over tor (function call)
deactivateBitcoinOverTor

View File

@@ -197,17 +197,20 @@ if [ "${setupPhase}" = "setup" ]; then
# handle existing blockchain data # CLOSED FOR REPAIR #5029
existingBlockchain=""
if [ "${menuresult}" = "0" ] && [ "${system_setup_storageBlockchainGB}" != "" ] && [ "${system_setup_storageBlockchainGB}" != "0" ]; then
echo "# Existing blockchain can be used - cannot be moved to new drive layout"
existingBlockchain="BITCOIN"
#if [ "${system_setup_storageBlockchainGB}" != "" ] && [ "${system_setup_storageBlockchainGB}" != "0" ]; then
# allow, when not bootFromStorage
#if [ "${system_setup_bootFromStorage}" == "0" ]; then
# echo "# Existing blockchain can be used - cannot be moved to new drive layout"
# existingBlockchain="BITCOIN"
# allow, when bootFromStorage & storage already has 3 partitions (new drive layout)
elif [ "${system_setup_storagePartitionsCount}" == "3" ]; then
echo "# Existing blockchain can be used - already new drive layout"
existingBlockchain="BITCOIN"
#elif [ "${system_setup_bootFromStorage}" == "1" ] && [ "${system_setup_storagePartitionsCount}" == "3" ] ; then
# echo "# Existing blockchain can be used - already new drive layout"
# existingBlockchain="BITCOIN"
# otherwise - dont use existing blockchain
else
echo "# Existing blockchain will not be used - to allow transfere to new drive layout"
fi
# else
# echo "# Existing blockchain will not be used - to allow transfere to new drive layout"
# fi
#fi
# ask user about possible existing blockchain and formatting HDD
if [ "${menuresult}" != "6" ]; then

View File

@@ -274,13 +274,6 @@ elif [ "${eventID}" == "waitsetup" ] && [ "${mode}" == "ssh" ]; then
Please wait ...
" 5 22
elif [ "${eventID}" == "waitprovision" ] && [ "${contentString}" == "hdd-migrate" ]; then
dialog --backtitle "${backtitle}" --cr-wrap --infobox "
Changing Data Layout of HDD/SSD/NVMe
Can take looooooong time - just wait.
" 6 44
elif [ "${eventID}" == "waitprovision" ]; then
dialog --backtitle "${backtitle}" --cr-wrap --infobox "