add dietpi.txt and Automation_Custom_Script.sh to automate first boot

This commit is contained in:
openoms 2019-02-03 10:03:34 +00:00
parent 8b04e0f7e0
commit b0467a8032
3 changed files with 34 additions and 10 deletions

View File

@ -0,0 +1 @@
wget https://raw.githubusercontent.com/openoms/raspiblitz/raspiblitz-dev/build.sdcard/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh raspiblitz-dev openoms

View File

@ -68,6 +68,11 @@ AUTO_SETUP_GLOBAL_PASSWORD=dietpi
#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
# install fail2ban
AUTO_SETUP_INSTALL_SOFTWARE_ID=73
# install openssh client
AUTO_SETUP_INSTALL_SOFTWARE_ID=0
# DietPi-Software Choice System
# SSH Server Selection:

View File

@ -73,16 +73,34 @@ The setup continues as described in the RaspiBlitz setup [README.md](/README.md#
## Example of setting up a RaspiBlitz HDD to be copied to the ODroid:
![copy the blockchain from a HDD of a Raspiblitz](pictures/copy_hdd.png)
![c#opy the blockchain from a HDD of a Raspiblitz](pictures/copy_hdd.png)
![example setup](pictures/HDD_copy_example.jpg)
Useful commands for debugging:
`sudo tail -f /mnt/hdd/bitcoin/debug.log` - continuous monitoring
`sudo tail -n 100 /mnt/hdd/bitcoin/debug.log` - shows the last 100 lines
`sudo systemctl status lnd`
`sudo journalctl -f -u lnd`
`./home/admin/XXdebugLogs.sh` - on the raspiblitz
`lsblk` see the partitions
`tail -n1000 -f raspiblitz.log` - debug logs of bootstrap.sh
### Useful commands for debugging:
`tail -n1000 -f/var/tmp/dietpi/logs/dietpi-automation_custom_script.log` follow startup setup script log
`lsblk` see the partitions
`tail -n1000 -f raspiblitz.log` - debug logs of bootstrap.sh
`sudo tail -f /mnt/hdd/bitcoin/debug.log` - continuous monitoring
`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
Samsple dietpi.txt: https://github.com/Fourdee/DietPi/blob/master/dietpi.txt
### 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
### 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