@ -71,6 +71,26 @@ Once you finished all the transferes the Raspiblitz will make a quick-check on t
Its a lot of data and torrent seeds can not be garantuued. Normally it should be done within 24 hours. If it takes longer then 2 days consider to abort the torrent download by pressing 'x' and choose FTP download as fallback ... will also take some time, but should be more stable. If even that is not working - choose SYNC option, which will take over a week, but is the classic way to get the blockchain thru the bitcoin peer2peer network.
## How do I clone the Blockchain from a 2nd HDD?
During setup, when you start with an empty HDD you need to get a copy of the blockchain. One option available is to connect a 2nd HDD to the RaspiBlitz that contains already the blockchain data and start to copy/clone.
If you choose this option, the console requests you to connect the second HDD and will autmatically detect it:
![SSH6b](pictures/ssh6b-copy.png)
You can simply use the HDD of another RaspiBlitz or you prepare a HDD yourself by:
* format second HDD with exFAT (availbale on Windows and Mac)
* copy an indexed Blockchain into the root folder "bitcoin"
* when your HDD is ready the content of your folder bitcoin should look like this:
![BitcoinFolderData](pictures/seedhdd.png)
To connect the 2nd HDD to the RaspiBlitz, the use of a Y cable to provide extra power is recommended (see optional shopping list). Because the RaspiBlitz cannot run 2 HDDs without extra power. For extra power you can use a battery pack, like in this picture:
![ExtraPower](pictures/extrapower.png)
## Why is my "final sync" taking so long?
First of all if you see a final sync over 90% and you can see from time to time small increase - you should be OK ... this can take some looong time to catch up with the network. Only in the case that you activly choose the `SYNC` option in the `Getting the Blockchain` a final sync under 90% is OK. If you did a torrent, a FTP or a copy from another computer and seeing under 90% somthing went wrong and the setup process is ignoring your prepared Blockchain and doing a full sync - which can almost take forever on a raspberryPi.
@ -99,89 +99,81 @@ Fore more details on the setup process see the documentation below. If you run i
### Setup Process
*The goal is, that all information needed is provided from the interaction with the RaspiBlitz itself during the setup. Documentation in this chapter is for background, comments for educators and point special edge cases.*
*The goal is, that all information needed is provided from the interaction with the RaspiBlitz itself during the setup. Documentation in this chapter is for background, comments for educators and to mention edge cases.*
#### Init
Automatically after login per SSH as admin to the RaspiBlitz, the user can choose if the RaspiBlitz should combine Bitcoin or Litecoin with Lightning:
Automatically after login per SSH as admin to the RaspiBlitz, the user can choose if the RaspiBlitz should run Bitcoin or Litecoin with Lightning:
![SSH0](pictures/ssh0-welcome2.png)
Setting Up the Raspi is the only option at this point, so we go with OK.
*Background: This menu is displayed by the script `00mainMenu.sh` and started automatically on every login of the admin user by admins `.bashrc`. If you want to get to the normal terminal prompt after login, just use CTRL-c. If you press OK in the dialog the script `10setupBlitz.sh` gets started*
*This menu is displayed by the script `00mainMenu.sh` and started automatically on every login of the admin user by admins `.bashrc`. If you want to get to the normal terminal prompt after login, just use CTRL-c or CANCEL. To return to the main menu from the terminal you can use the command `raspiblitz`.*
First thing to setup is giving your RaspiBlitz an name:
First thing to setup is giving your RaspiBlitz a name:
![SSH2](pictures/ssh2-passwords.png)
This name is given to the RaspiBlitz as hostname in the local network and later on also for the alias of the lightning node.
*Background: This and the following setup dialogues are part of the script `20setupDialog.sh`. The idea is to request much as needed setup information from the user at the start in this dialogs, so after that the setup can just run without many breaks.*
Then the user gets requested to write down 4 passwords:
Then the user gets requested to think of and write down 4 passwords:
![SSH1](pictures/ssh1-name.png)
*Background: The password A,B,C & D idea is directly based in the [RaspiBolt Guide Preperations](https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_20_pi.md#write-down-your-passwords)*
*The password A,B,C & D idea is directly based in the [RaspiBolt Guide Preperations](https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_20_pi.md#write-down-your-passwords) - check out for more background.*
Then the user is asked to enter the Password A:
![SSH3a](pictures/ssh3a-password.png)
On the next SSH login to the RaspiBlitz as admin, this new password has to be used. Its also set for the user existing user: root, bitcoin & pi. But only admin can be used to login per SSH.
This is the new password has to be used for every SSH login after this screen. Its also set for the user existing user: root, bitcoin & pi.
*Background: The bitcoin and lightning processes will run in the background (as daemon) and use the separate user “bitcoin” for security reasons. This user does not have admin rights and cannot change the system configuration.*
*The bitcoin and lightning services will later run in the background (as daemon) and use the separate user “bitcoin” for security reasons. This user does not have admin rights and cannot change the system configuration.*
Then the user is asked to enter the Password B:
![SSH3b](pictures/ssh3b-password.png)
*Background: The other passwords C & D get entered by the lightning wallet setup. This can just happen later ... so they will not get requested at this point.*
*The other passwords C & D will be needed later on. They will be used during the lightning wallet setup.*
After this the setup process needs some time and the user will see a lot of console outputs:
After this the setup process will need some time and the user will see a lot of console outputs:
![SSH4](pictures/ssh4-scripts.png)
*Background: After the user interaction the following scripts are started to automatically setup the RaspiBlitz:*
* 30initHDD.sh - it checks if the HDD needs to be formatted with Ext4
* 40addHDD.sh - adds the HDD for permanent mounting on /mnt/hdd
* 10setupBlitz.sh - now takes care that the HDD contains the blockchain
The following screen is just shown, if the HDD was not prepared with a copy of the Bitcoin blockchain (as part of a ready-2-go set). The following options are offered to get a copy:
#### Getting the Blockchain
![SSH5](pictures/ssh5-blockchain2.png)
The following screen is just shown if the HDD was not prepared with a copy of the Bitcoin blockchain (as part of a ready-2-go set).
The option "SYNC" should just be use as a fallback. So normally you have the following two options:
To get a copy of the blockchain, the RaspiBlitz offers the following options:
#### Download the Blockchain
![SSH5](pictures/ssh5-blockchain2.png)
This is the recommended way for users that are making the setup at home without any further assistance but can take quite some time. You can choose to download over TORRENT or FTP-DOWNLOAD. Choose the FTP if the torrent is not working for you.
The options - and when to choose - will be explained here shortly:
For more details: [Background on Download Blockchain](background_downloadBlockchain.md)
##### Torrent
#### Copy the Blockchain
TODO
To copy the blockchain from another HDD can be faster - if available. If you choose this option, the console requests you to connect the second HDD and will autmatically detect it:
##### FTP-Download
![SSH6b](pictures/ssh6b-copy.png)
TODO
You can simply use the HDD of another RaspiBlitz or you prepare a HDD yourself by:
##### Copying from another Computer
* format second HDD with exFAT (availbale on Windows and Mac)
* copy an indexed Blockchain into the root folder "bitcoin"
* when your HDD is ready the content of your folder bitcoin should look like this:
TODO
![BitcoinFolderData](pictures/seedhdd.png)
##### Cloning from a 2nd HDD
To connect the 2nd HDD to the RaspiBlitz, the use of a Y cable to provide extra power is recommended (see optional shopping list). Because the RaspiBlitz cannot run 2 HDDs without extra power. For extra power you can use a battery pack, like in this picture:
TODO
![ExtraPower](pictures/extrapower.png)
##### Sync from Bitcoin-Network
**Background: If the blockchain was already on the HDD or was acquired successfully, the script `60finishHDD.sh` will be called. It will further prepare the HDD and start the bitcoin service.*
TODO
#### Lightning
#### Setup Lightning
Before the lighting service can be started, the Bitcoin service needs to make sure that the blockchain is up to date. The downloaded blockchain data could be several weeks old - this could take some minutes. Then the Lightning Service gets started and a wallet can be created: