Browse Source

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

dev
openoms 6 years ago
parent
commit
b0467a8032
  1. 1
      dietpi/boot/Automation_Custom_Script.sh
  2. 5
      dietpi/boot/dietpi.txt
  3. 40
      dietpi/install_on_DietPi.md

1
dietpi/boot/Automation_Custom_Script.sh

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

5
dietpi/dietpi.txt → dietpi/boot/dietpi.txt

@ -68,6 +68,11 @@ AUTO_SETUP_GLOBAL_PASSWORD=dietpi
#AUTO_SETUP_INSTALL_SOFTWARE_ID=23 #will install Desktop LXDE #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=74 #will install LAMP webserver stack
#AUTO_SETUP_INSTALL_SOFTWARE_ID=44 #will install Bittorrent transmission #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 # DietPi-Software Choice System
# SSH Server Selection: # SSH Server Selection:

40
dietpi/install_on_DietPi.md

@ -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: ## 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) ![example setup](pictures/HDD_copy_example.jpg)
Useful commands for debugging: ### Useful commands for debugging:
`sudo tail -f /mnt/hdd/bitcoin/debug.log` - continuous monitoring `tail -n1000 -f/var/tmp/dietpi/logs/dietpi-automation_custom_script.log` follow startup setup script log
`sudo tail -n 100 /mnt/hdd/bitcoin/debug.log` - shows the last 100 lines `lsblk` see the partitions
`sudo systemctl status lnd` `tail -n1000 -f raspiblitz.log` - debug logs of bootstrap.sh
`sudo journalctl -f -u lnd` `sudo tail -f /mnt/hdd/bitcoin/debug.log` - continuous monitoring
`./home/admin/XXdebugLogs.sh` - on the raspiblitz `sudo tail -n100 /mnt/hdd/bitcoin/debug.log` - shows the last 100 lines
`lsblk` see the partitions `sudo systemctl status lnd`
`tail -n1000 -f raspiblitz.log` - debug logs of bootstrap.sh `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

Loading…
Cancel
Save