Browse Source

Merge pull request #19 from openoms/raspiblitz-dev

RaspiBlitz on DietPi 1.0
dev
bluecell296 6 years ago
committed by GitHub
parent
commit
81623c1dcc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 424
      FAQ.md
  2. 580
      README.md
  3. 155
      background_downloadBlockchain.md
  4. 43
      background_raspiblitzSettings.md
  5. 51
      build_sdcard.sh
  6. 63
      dietpi/README.md
  7. 262
      dietpi/RaspiBlitz1.0_OdroidHC1_DietPi6.21.1.torrent
  8. 986
      dietpi/logs/HC1_sdcard_build_output
  9. BIN
      dietpi/pictures/5_options_to_copy.png
  10. 2
      home.admin/00infoBlitz.sh
  11. 64
      home.admin/00infoLCD.sh
  12. 35
      home.admin/00mainMenu.sh
  13. 17
      home.admin/00settingsMenuServices.sh
  14. 59
      home.admin/10setupBlitz.sh
  15. 1
      home.admin/20recoverDialog.sh
  16. 4
      home.admin/20setupDialog.sh
  17. 37
      home.admin/30initHDD.sh
  18. 36
      home.admin/40addHDD.sh
  19. 10
      home.admin/50cloneHDD.sh
  20. 57
      home.admin/50copyHDD.sh
  21. 21
      home.admin/50downloadHDD.sh
  22. 2
      home.admin/50syncHDD.sh
  23. 13
      home.admin/50torrentHDD.sh
  24. 2
      home.admin/60finishHDD.sh
  25. 3
      home.admin/70initLND.sh
  26. 5
      home.admin/80scanLND.sh
  27. 8
      home.admin/90finishSetup.sh
  28. 12
      home.admin/95finalSetup.sh
  29. 1
      home.admin/97addMobileWallet.sh
  30. 3
      home.admin/97addMobileWalletShango.sh
  31. 19
      home.admin/97addMobileWalletZap.sh
  32. 3
      home.admin/AAunlockLND.sh
  33. 3
      home.admin/BBcashoutWallet.sh
  34. 3
      home.admin/BBcloseAllChannels.sh
  35. 3
      home.admin/BBconnectPeer.sh
  36. 3
      home.admin/BBcreateInvoice.sh
  37. 3
      home.admin/BBfundWallet.sh
  38. 3
      home.admin/BBopenChannel.sh
  39. 16
      home.admin/BBpayInvoice.sh
  40. 4
      home.admin/XXcleanHDD.sh
  41. 3
      home.admin/XXdebugLogs.sh
  42. 2
      home.admin/XXprepareRelease.sh
  43. 2
      home.admin/_background.sh
  44. 46
      home.admin/_bootstrap.sh
  45. 2
      home.admin/_version.info
  46. 2
      home.admin/assets/background.service
  47. 4
      home.admin/assets/bootstrap.service
  48. 4
      home.admin/assets/lnd.service
  49. 10
      home.admin/config.scripts/blitz.setpassword.sh
  50. 5
      home.admin/config.scripts/bonus.rtl.sh
  51. 214
      home.admin/config.scripts/internet.tor.sh
  52. 1
      home.admin/config.scripts/lnd.autonat.sh
  53. 1
      home.admin/config.scripts/lnd.autopilot.sh
  54. 3
      home.admin/config.scripts/lnd.export.sh
  55. 5
      home.admin/config.scripts/network.chain.sh
  56. 27
      home.admin/config.scripts/network.reindex.sh
  57. BIN
      pictures/RTL-dashboard.png
  58. BIN
      pictures/befestigung.jpg
  59. BIN
      pictures/download-ftp.png
  60. BIN
      pictures/download-torrent.png
  61. BIN
      pictures/export.png
  62. BIN
      pictures/hardwaresetup.jpg
  63. BIN
      pictures/mainmenu-services.png
  64. BIN
      pictures/mainmenu.png
  65. BIN
      pictures/mainmenu1.png
  66. BIN
      pictures/mainmenu2.png
  67. BIN
      pictures/mainmenu3.png
  68. BIN
      pictures/mobile.png
  69. BIN
      pictures/raspiblitz.jpg
  70. BIN
      pictures/ssh5-blockchain2.png
  71. BIN
      pictures/ssh5-blockchain2.png.old
  72. BIN
      pictures/ssh9b-reboot.png
  73. BIN
      pictures/ssh9c-unlock.png
  74. BIN
      pictures/ssh9d-blockchainsync.png
  75. BIN
      pictures/ssh9d-lndscan.png
  76. BIN
      pictures/ssh9e-mainmenu1.png
  77. BIN
      pictures/ssh9e-mainmenu2.png
  78. BIN
      pictures/ssh9z-ready.png
  79. BIN
      pictures/tor1.png
  80. BIN
      pictures/wallet-recover.png
  81. 15
      shoppinglist_au.md
  82. 17
      shoppinglist_ch.md
  83. 16
      shoppinglist_cn.md
  84. 18
      shoppinglist_cz.md
  85. 8
      shoppinglist_de.md
  86. 18
      shoppinglist_fr.md
  87. 14
      shoppinglist_uk.md
  88. 18
      shoppinglist_usa.md

424
FAQ.md

@ -1,8 +1,17 @@
# FAQ - Frequently Asked Questions
## How to update my RaspiBlitz (AFTER version 0.98)?
## How do I generate a Debug Report?
If your RaspiBlitz is not working right and you like to get help from the community, its good to provide more debug information, so other can better diagnose your problem - please follow the following steps to generate a debug report:
- ssh into your raspiblitz as admin user with your password A
- If you see the menu - use CTRL+C to get to the terminal
- To generate debug report run: `./XXdebugLogs.sh`
- Then copy all output beginning with `*** RASPIBLITZ LOGS ***` and share this
*PLEASE NOTICE: Its possible that this logs can contain private information (like IPs, node IDs, ...) - just share publicly what you feel OK with.*
*Notice: Please be sure that your base image you started with was version 0.98 or greater. If you used the now deprecated XXupdateScripts.sh script to update before, you might have started with an older base image. If you never run that script, your good.*
## How to update my RaspiBlitz (AFTER version 0.98)?
To prepare the RaspiBlitz update:
@ -10,33 +19,47 @@ To prepare the RaspiBlitz update:
- remove power
- remove SD card
Now download the new RaspiBlitz SD card image and write it to your SD card .. yes you simply overwrite the old one, its OK all your personal data is on the HDD (if you havent done any manual changes to the system). See details about latest SD card image here: https://github.com/rootzoll/raspiblitz#scenario-2-start-at-home
Now download the new RaspiBlitz SD card image and write it to your SD card .. yes you simply overwrite the old one, it's OK, all your personal data is on the HDD (if you haven't done any manual changes to the system). See details about latest SD card image here: https://github.com/rootzoll/raspiblitz#scenario-2-start-at-home
If done successfully, simply put the SD card into the RaspiBlitz and power on again. Then follow the instructions on the display ... and dont worry, you dont need to re-download the blockchain again.
## How to update a old RaspiBlitz (BEFORE version 0.98)?
If your old RaspiBlitz if version 0.98 or higher, just follow the update instructions in the README.
If done successful simple put the SD card into the RaspiBlitz and power on again. Then follow the instructions on the display ... and dont worry you dont need to redownload the blockchain again.
If you run a version earlier then 0.98 you basically need to setup a new RaspiBlitz to update - but you can keep the blockchain data on the HDD, so you dont need have that long waiting time again:
## How to update my RaspiBlitz (BEFORE version 0.98)?
1. Close all open lightning channels you have (`lncli closeallchannels --force`) or use the menu option 'CLOSE ALL' if available. Wait until all closing transactions are done.
Before version 0.98 you need to setup a new RaspiBlitz. So close all channels. Remove all funds from your Raspiblitz (cash-out). Go into terminal and run: `sudo /home/admin/XXleanHDD.sh` and then `sudo shutdown now`. This way you keep your blockchain data on the HDD, but your HDD is cleaned. Now follow again: https://github.com/rootzoll/raspiblitz#scenario-2-start-at-home
2. Move all on-chain funds to a wallet outside raspiblitz (`lncli --conf_target 3 sendcoins [ADDRESS]`) or use the menu option 'CHASH OUT' if available
## Why do I need to re-burn my SD card for an update (AFTER version 0.98)?
3. Prepare the HDD for the new setup by running the script `/home/admin/XXcleanHDD.sh` (Blockchain will stay on HDD)
I know it would be nicer to run just an update script and you are ready to go. But then the scripts would need to be written in a much more complex way to be able to work with any versions of LND and Bitcoind (they are already complex enough with all the edge cases) and testing would become even more time consuming as it is now already. Thats nothing a single developer can deliver.
4. then shutdown RaspiBlitz (`sudo shutdown now`), flash SD card with new image, redo a fresh setup of RaspiBlitz, move your funds back in, Re-Open your channels
For some it might be a pain point to make a update by re-burning a new sd card - especially if you added own scripts or made changes to the system -> but thats by design. Its a way to enforce a "clean state" with every update - the same state that I tested and developed the scripts against. The reason for that pain: I simply cannot write and support scripts that run on every modified system forever - thats simply too much work.
## Why do I need to re-burn my SD card for an update?
I know it would be nicer to run just an update script and you are ready to go. But then the scripts would need to be written in a much more complex way to be able to work with any versions of LND and Bitcoind (they are already complex enough with all the edge cases) and testing would become even more time consuming than it is now already. That's nothing a single developer can deliver.
For some, it might be a pain point to make an update by re-burning a new sd card - especially if you added your own scripts or made changes to the system - but thats by design. It's a way to enforce a "clean state" with every update - the same state that I tested and developed the scripts with. The reason for that pain: I simply cannot write and support scripts that run on every modified system forever - that's simply too much work.
With the SD card update mechanism I reduce complexity, I deliver a "clean state" OS, LND/Bitcoind and the scripts tightly bundled together exactly in the dependency/combination like I tested them and its much easier to reproduce bug reports and give support that way.
Of course people should modify the system, add own scripts, etc ... but if you want also benefit of the updates of the RaspiBlitz you have two ways to do it:
Of course, people should modify the system, add own scripts, etc ... but if you want to also have the benefit of the updates of the RaspiBlitz, you have two ways to do it:
1. Contribute your changes back to the main project as pull requests so that they become part of the next update - the next SD card release.
2. Make your changes so that they survive an SD card update easily -> put all your scripts and extra data onto the HDD AND document for yourself how to activate them again after an update.
2. Make your changes so that they survive an SD card update easily - put all your scripts and extra data onto the HDD AND document for yourself how to activate them again after an update .. maybe even write a small shell script (stored on your HDD) that installes & configs all your additional packages, software and scripts.
*BTW there is a beneficial side effect when updating with a new SD card: You also get rid of any malware or system bloat that happened in the past. You start with a fresh system :)*
## How can I avoid using a prepared blockchain and validate myself?
BTW there is a beneficial side effect, when updating with a new SD card: You also get rid of any maleware or system bloat that happend in the past. You start with a fresh system :)
The torrent and FTP download use a prepared blockchain to kick start the RaspiBlitz. If you want to selft validate you could do this on another more powerful computer and then transfere your own validated blockchain over to the RaspiBlitz. Check the options `Copying from another Computer` & `Cloning from a 2nd HDD` described in the [README](README.md) for more details.
## I have the full blockchain on another computer. How do I copy it to the RaspiBlitz?
Copying a already synced blockchain from another computer (for example your Laptop) can be a quick way to get the RaspiBlitz started. Also that way you synced and verified the blockchain yourself and not trusting the RaspiBlitz FTP/Torrent downloads (dont trust, verify).
Copying a already synced blockchain from another computer (for example your Laptop) can be a quick way to get the RaspiBlitz started or replacing a corrupted blockchain with a fresh one. Also that way you synced and verified the blockchain yourself and not trusting the RaspiBlitz FTP/Torrent downloads (dont trust, verify).
One requirement is that the blockchain is from another bitcoin-core client with version greater or equal to 0.17.1 with transaction index switched on (`txindex=1` in the `bitcoin.conf`).
@ -48,6 +71,40 @@ If everything of the above is prepared, start the setup of the new RaspiBlitz wi
Once you finished all the transferes the Raspiblitz will make a quick-check on the data - but that will not guarantee that everything in detail was OK with the transfere. Check further FAQ answeres if you get stuck or see a final sync with a value below 90%.
**If you want to replace a corrupted blockchain this way:** *Go to terminal - maybe with CTRL+c. `sudo systemctl stop bitcoind` and `sudo systemctl stop lnd` then call `/home/admin/50copyHDD.sh` use the displayed SCP commands to copy over the fresh blockchain. Press ENTER when all is copied, so that the script can quick check the data and set the correct permissions. Then make a reboot `sudo shutdown -r now`*
## 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:
```
/bitcoin/blocks
/bitcoin/chainstate
/bitcoin/indexes
```
optional you can add also the testnet data:
```
/bitcoin/testnet3/blocks
/bitcoin/testnet3/chainstate
/bitcoin/testnet3/indexes
```
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 picture below) or choose a external HDD with its own power supply.
![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.
@ -56,13 +113,13 @@ So if something is wrong (like mentioned above) then try again from the beginnin
## How to backup my Lightning Node?
CAUTION: Restoring a backup can lead to LOSS OF ALL CHANNEL FUNDS if its not the latest channel state. There is no perfect backup solution for lightning nodes yet - this topic is in development by the community.
CAUTION: Restoring a backup can lead to LOSS OF ALL CHANNEL FUNDS if it's not the latest channel state. There is no perfect backup solution for lightning nodes yet - this topic is in development by the community.
But there is one safe way to start: Store your LND wallet seed (list of words you got on wallet creation) in a safe place. Its the key to recover access to your on-chain funds - your coins that are not bound in an active channel.
Recovering the coins that you have in a active channel is a bit more complicated. Because you have to be sure that you really have an up to date backup of your channel state data. The problem is: If you post an old state of your channel this looks to the network like you want to cheat and your channel partner is allowed claim all the funds in the channel.
Recovering the coins that you have in an active channel is a bit more complicated. Because you have to be sure that you really have an up to date backup of your channel state data. The problem is: If you post an old state of your channel, to the network this looks like an atempt to cheat, and your channel partner is allowed claim all the funds in the channel.
To really have a good backup to rely on such feature needs to be part of the LND software. Almost every other solution would not be perfect. Thats why RaspiBlitz is not trying to provide a backup feature at the moment.
To really have a reliable backup, such feature needs to be part of the LND software. Almost every other solution would not be perfect. Thats why RaspiBlitz is not trying to provide a backup feature at the moment.
But you can try to backup at your own risk. All your Lightning Node data is within the `/mnt/hdd/lnd` directory. Just run a backup of that data when the lnd service is stopped.
@ -72,48 +129,92 @@ With the 24 word list given you by LND on wallet creation you can recover your p
For more background on mnemonic seeds see this video: https://www.youtube.com/watch?v=wWCIQFNf_8g
# How does PASSWORD D effects this seed?
## How does PASSWORD D effects the word seed?
On wallet creation you get asked if you want to protect your word seed list with an additional password. If you choose so, RaspiBlitz recommends you to use your PASSWORD D at this point.
To use a an additional password for your seed words is optional. If you choose so, you will need the password to recover your private key from your your seed words later on. Without this password your private key cannot be recovered from your seed words. So the password adds an additional layer of security, if someone finds your written down word list.
## How can I recover my coins from a failing RaspiBlitz?
You might run into a situation where your hardware fails or the software starts to act buggy. So you decide to setup a fresh RaspiBlitz, like in the chapter above "Update to a new SD Card Release" - but the closing channels and cashing out is not working anymore. So whats about the funds you already have on your failing setup?
There is not a perfect way yet to backup/recover your coins, but you can try the following to make the best out of the situation:
### 1) Recover from Wallet Seed
Remember those 24 words you were writing down during the setup? Thats your "cipher seed" - now this words are important to recover your wallet. If you dont have them anymore: skip this chapter and read option 2. If you still have the cypher seed: good, but read the following carefully:
With the cypher seed you can recover the bitcoin wallet that LND was managing for you - but it does not contain all the details about the channels you have open - its just the key to your funding wallet. If you were able to close all channels or never opened any channels, then everything is OK and you can go on. If you had open channels with funds in there, the following is to consider:
* You now rely on your channel counter parts to force close the channel at one point. If they do, the coins will be available to use in your funding wallet again at one point in the future - after force close delay.
* If your channel counter parts never force close the channel (because they are offline too) your channel funds can be frozen forever.
So going this way there is a small risk, that you will not recover your funds. But normally if your channel counter parts are still online, see that you will not come back online and they have themselves some funds on their channel side with you: They have an incentive to force close the channel to make use of their funds again.
So here is what todo if you want to "Recover from Wallet Seed" with RaspiBlitz:
- SetUp a fresh RaspiBlitz (fresh SD-Card image and clean HDD).
- During the new SetUp you get to the point of creating the LND wallet (see image below).
![SSH8](pictures/wallet-recover.png)
- When you get asked "do you have an existing cypher wallet" answere `y` this time.
- Enter the cypher seed - all words in one line seperated by spaces
- If you get asked at the end for the password D to encrypt your cypher seed, use the same as the last time. If you havent entered one last time, just press Enter again.
- When asked about the "address look-ahead" number - use `250000` instead of the default!
Then give LND some time to rescan the blockchain. In the end you will have restored your funding wallet. You maybe need to wait for your old channel counter parts to force close the old channels until you see the coins back displayed.
*Important: If you see a zero balance for on-chain funds after restoring from seed ... see details discussed [here](https://github.com/rootzoll/raspiblitz/issues/278) - you might try setup fresh this time with bigger look-ahead number.*
### 2) LND Channel State Backup
This second option is very very risky and can lead to complete loss of funds. And it olny can work, if you can still access the HDD content of your failing RaspiBlitz. It should only be used if you lost your cypher seed for the option above, forgot your cypher seed encryption password or your old channel counter parts are offline, too.
What you do is in priciple:
- Make a copy of the HDD directory `/mnt/hdd/lnd`
- Setup a fresh RaspiBlitz
- Stop LND with `sudo systemctl stop lnd`
- Replace the new `/mnt/hdd/lnd` with your backuped version
- Make sure everything in `/mnt/hdd/lnd` is owned by bitcoin:bitcoin
- Reboot the RaspiBlitz
This is highly experimental. And again: If you restore the LND with an backup that is not representing the latest channel state, this will trigger the lightning "penalty" mechanism - allowing your channel counter part to grab all the funds from a channel. Its a measure of last resort. But if its working for you, let us know.
## How do I change the Name/Alias of my lightning node
Use the "Change Name/Alias of Node" option in main menu. The RaspiBlitz will make a reboot after this.
Use the "Change Name/Alias of Node" option in the main menu. The RaspiBlitz will make a reboot after this.
## What to do when on SSH I see "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"
This means, that he public ssh key of the RaspiBlitz has changed to the one you logged in the last time under that IP.
Its OK when happening during an update - when you changed the sd card image. If its really happening out of the blue - check your local network setup for a second. Maybe the local IP of your RaspiBlitz changed? Is there a second RaspiBlitz connected? Its a security warning, so at least take some time to check if anything is strange. But also dont get to panic - when its in your local network, normally its some network thing - not an intruder.
It's OK when happening during an update - when you changed the sd card image. If it's really happening out of the blue - check your local network setup for a second. Maybe the local IP of your RaspiBlitz changed? Is there a second RaspiBlitz connected? It's a security warning, so at least take some time to check if anything is strange. But also don't get to panic - when it's in your local network, normally it's some network thing - not an intruder.
To fix this and to be able to login with SSH again, you have to remove the old public key for that IP from your local client computer. Just run the following command (with the replaced IP of your RaspiBlitz): `ssh-keygen -R IP-OF-YOUR-RASPIBLITZ` or remove the line for this IP manually from the known_hosts file (path see in warning message).
To fix this and to be able to login with SSH again, you have to remove the old public key for that IP from your local client computer. Just run the following command (with the replaced IP of your RaspiBlitz): `ssh-keygen -R IP-OF-YOUR-RASPIBLITZ` or remove the line for this IP manually from the known_hosts file (see the path to the file in the warning message).
After that you should be able to login with SSH again.
After that, you should be able to login with SSH again.
## When using Auto-Unlock, which security do I loose?
## When using Auto-Unlock, how much security do I lose?
The idea of the "wallet lock" in general is that your privatekey/seed/wallet is stored in a encrypted way on your HDD. On every you restart you have to input the password once manually (unlock your wallet), so that the LND can again read and write to the encrypted wallet. This gives you security if your RaspiBlitz gets stolen or taken away - it looses power and then your wallet is safe - the attacker cannot access your wallet.
The idea of the "wallet lock" in general, is that your private key / seed / wallet is stored in a encrypted way on your HDD. On every restart, you have to input the password once manually (unlock your wallet), so that the LND can read and write to the encrypted wallet again. This improves your security if your RaspiBlitz gets stolen or taken away - it loses power and then your wallet is safe - the attacker cannot access your wallet.
When you activate the "Auto-Unlock" feature of the RaspiBlitz, the password of the wallet gets stored on the RaspiBlitz. So for an attacker stealing the RaspiBlitz physically its now possible to find the password and unlock the wallet.
When you activate the "Auto-Unlock" feature of the RaspiBlitz, the password of the wallet gets stored on the RaspiBlitz. So if an attacker steals the RaspiBlitz physically, it's now possible for them to find the password and unlock the wallet.
## I connected my HDD but it still says 'Connect HDD' on the display?
Your HDD may have no partitions yet. SSH into the RaspiBlitz as admin (see command and password on display) and you should get offert the option to create a partition. If this is not the case:
Your HDD may have no partitions yet. SSH into the RaspiBlitz as admin (see command and password on display) and you should be offered the option to create a partition. If this is not the case:
Check/Exchange the USB cable. Connect the HDD to another computer and check if it shows up at all ..
Check/Exchange the USB cable. Connect the HDD to another computer and check if it shows up at all.
OSX: https://www.howtogeek.com/212836/how-to-use-your-macs-disk-utility-to-partition-wipe-repair-restore-and-copy-drives/
Windows:
https://www.lifewire.com/how-to-open-disk-management-2626080
Windows: https://www.lifewire.com/how-to-open-disk-management-2626080
Linux/Ubuntu (desktop):
https://askubuntu.com/questions/86724/how-do-i-open-the-disk-utility-in-unity
Linux/Ubuntu (desktop): https://askubuntu.com/questions/86724/how-do-i-open-the-disk-utility-in-unity
Linux/Raspbian (command line):
https://www.addictivetips.com/ubuntu-linux-tips/manually-partition-a-hard-drive-command-line-linux/
Linux/Raspbian (command line): https://www.addictivetips.com/ubuntu-linux-tips/manually-partition-a-hard-drive-command-line-linux/
## How do I shrink the QR code for connecting my Shango/Zap mobile phone?
@ -129,4 +230,261 @@ The node address is red, when the RaspiBlitz detects that it cannot reach the po
## Why is my node address on the display yellow (not green)?
Yellow is OK. The RaspiBlitz can detect, that it can reach a service on the port 9735 of your public IP - this is in most cases the LND of your RaspiBlitz. But the RaspiBlitz cannot 100% for sure detect that this is its own LND service on that port - thats why its just yellow, not green.
Yellow is OK. The RaspiBlitz can detect, that it can reach a service on the port 9735 of your public IP - this is in most cases the LND of your RaspiBlitz. But the RaspiBlitz cannot 100% for sure detect that this is its own LND service on that port - thats why its just yellow, not green.
## Can I run the RaspiBlitz as Backend for BTCPayServer?
BTCPay Server is a solution to be your own payment processor to accept Lightning Payments for your online store: https://github.com/btcpayserver/btcpayserver
You can find setup instructions for a experimental setup here: https://goo.gl/KnTzLu
Thanks to @RobEdb (ask on twitter for more details) running his demo store with RaspiBlitz: https://store.edberg.eu - buy a picture of [him and Andreas](https://store.edberg.eu/produkt/jag-andreas/) :)
## I dont have a LAN port on my Laptop - how to connect to my RaspiBlitz?
You dont need a LAN port on your laptop as long as you can connect over WLAN to the same LAN router/switch the RaspiBlitz is connected to .. and you are on the same local network.
## Is it possible to connect the Blitz over Wifi instead of using a LAN cable?
A LAN cable is recommended because it reduces a possible source of error on the network connection side. But how to setup WLAN when you dont have a LAN-Router/Switch available see here:
https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_20_pi.md#prepare-wifi
## Can I directly connect the RaspiBlitz with my laptop?
If you have a LAN port on your laptop - or you have a USB-LAN adapter, you can connect the RaspiBlitz directly (without a router/switch) to your laptop and share the WIFI internet connection. You can follow this [guide for OSX](https://medium.com/@tzhenghao/how-to-ssh-into-your-raspberry-pi-with-a-mac-and-ethernet-cable-636a197d055).
In short for OSX:
* make sure all VPN are off (can interfere with local LAN)
* connect with LAN directly
* Settings > Sharing/Freigaben > activate "internet sharing" from WLAN to Ethernet
* Settings > Network > Ethernet-Adapter > set to DHCP
* in terminal > `ifconfig` there you should the the IP of the bridge100
* in terminal > `arp -a` and check for an IP of a client to the bridge
* in terminal > ssh admin@[clientIP]
If anyone has expirence on doing this in Linux/Win, please share.
## How do I unplug/shutdown safely without SSH
Just removing power from the RaspiBlitz can lead to data corruption if the HDD is right in the middle of a writing process. The safest way is always to SSH into the RaspiBlitz and use the "POWER OFF" option in the main menu.
But if cannot login with SSH and you need to power off at least remove the LAN cable (network connection)first for sometime (around 10-30 secs - until you can see no more blinking lights on the HDD) and then remove the power cable. This should minimize the risk if data corruption in this situations.
## How can I build an SD card other then the master branch?
There might be a new not released features in development that are not yet in the master branch - but you want to try them out.
To build a sd card image from another branch than master you follow the [Build the SD Card Image](README.md#build-the-sd-card-image) from the README, but execute the build script from the other branch and add the name of that branch as a parameter to the build script.
For example if you want to make a build from the 'dev' branch you execute the following command:
`wget https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build_sdcard.sh && sudo bash build_sdcard.sh 'dev'`
## How can I build an SD card from my forked GitHub Repo?
If you fork the RaspiBlitz repo (much welcome) and you want to run that code on your RaspiBlitz, there are two ways to do that:
* The quick way: For small changes in scripts, go to `/home/admin` on your running RaspiBlitz, delete the old git with `sudo rm -r raspiblitz` then replace it with your code `git clone [YOURREPO]` and `/home/admin/XXsyncScripts.sh`
* The long way: If you like to install/remove/change services and system configurations you need to build a SD card from your own code. Prepare like in [Build the SD Card Image](README.md#build-the-sd-card-image) from the README but in the end run the command:
`wget https://raw.githubusercontent.com/[GITHUB-USERNAME]/raspiblitz/[BRANCH]/build_sdcard.sh && sudo bash build_sdcard.sh [BRANCH] [GITHUB-USERNAME]
If you are then working in your forked repo and want to update the scripts on your RaspiBlitz with your latest repo changes, run `/home/admin/XXsyncScripts.sh` - thats OK as long as you dont make changes to the sd card build script - then you would need to build a fresh sd card again from your repo.
## How to attach the RaspberryPi to the HDD?
There are multiple ways to do it - just remember it should be easy to get to the SD card slot to remove and replace the card.
Here is an example to use [Hook-and-loop fastener](https://en.wikipedia.org/wiki/Hook-and-loop_fastener) tape:
![ExtraPower](pictures/befestigung.jpg)
## What other case options do I have?
You can replace the generic case in the shopping lists with a customized 3D printed for the RaspiBlitz called "Lightning Shell" - great work by @CryptoCloaks
https://thecryptocloak.com/product/lightningshell/
![LightningShell](pictures/lightningshell.png)
Also there are first free 3D open source files in this repo in the directory `case.3dprint` that you can selfprint. Those are much simpler then the 'Lightning Shell' and are not finished yet. But feel free to try out and improve - PullRequests welcome.
## Are those "Under-Voltage detected" warnings a problem?
When your USB power adapter for the RaspiBlitz delivers too low power those messages with "Under-Voltage detected" (undervoltage) are shortly seen on the display. If you see those just one or two times that's not OK, but can be in a tolerant window. Nevertheless make sure your USB power adapter can deliver at least 3A. If you still see those warnings maybe get a second USB Power adapter just for the HDD and power the HDD through a Y-Cable - see https://en.wikipedia.org/wiki/Y-cable#USB
## Why do we need to download the blockchain and not syncing it?
The RaspiBlitz is powered by the RaspberryPi. The processing power of this SingleBoardComputer is too low to make a fast sync of the blockchain from the bitcoin peer to peer network during setup process (validation). To sync and index the complete blockchain could take weeks or even longer. Thats why the RaspiBlitz needs to download a prepared blockchain from another source.
## Is using the perpared SD card image secure?
Using pre-built software almost always shifts trust to the one who made the binary. But at least you can check with the SHA checksum after download if the image downloaded is really the one offered by the GitHub Repo. To do so make a quick check if your browser is really in the correct GiutHub page and that your HTTPS of the GitHub page is signed by 'DigiCert'. Then compare the SHA-256 string (always next to the download link of the image on the README) with the result of the command `shasum -a 256 [DOWNLOADED-FILE-TO-CHECK]` (Mac/Linux). Still this is not optimal and if at least some people from the community request it, I will consider signing the download as an author for the future.
The best way would be to build the sd card yourself. You use the script `build_sdcard.sh` for it. Take some minutes to check if you see anything suspicious in that build script and then follow the [README](README.md#build-the-sd-card-image) on this.
## Is downloading the blockchain from a third party secure?
To download a blockchain from a third party (torrent/ftp) is not optimal and for the future with more cheap & powerfull SingleBoardComputers we could get rid of this 'patch'.
The downloaded blockchain is pre-indexed and pre-validated. That should be practically secure enough, because if the user gets a "manipulated" blockchain it would not work after setup. The beginning of the downloaded blockchain needs to fit the genesis block (in bitcoind software) and the end of the downloaded blockchain needs not match with the rest of the bitcoin network state - hashes of new block distrubuted within the peer-2-peer network need to match the downloaded blockchain head. So if you downloaded a manipulated blockchain it would simply just don't work in practice. As long as you are not in a totally hostile environment where someone would be able to fake a whole network of peers and miners around you - this is secure enough for running a small funded full node to try out the lightning network.
If you dont trust the download or you want to run the RaspiBlitz in a more production like setup (on your own risk) then don't use the torrent/ftp download and choose the option to COPY the blockchain data from a more powerful computer (laptop or desktop) where you synced, verified and indexed the blockchain all by your yourself - see [README](README.md#4-copying-from-another-computer) for more details.
## What is the "Base Torrent File"?
Inspired by the website getbitcoinblockchain.com we use one of their base torrent files to have a basic set of blocks - that will not change for the future. This torrent contains most of the data (the big file) and we dont need to change the torrent for a long time. This way the torrent can get establish a wide spread seeding and the torrent network can take the heavy load.
At the moment (Baseiteration=1) this is just the bitcoin blk and rev files up to the number:
- /blocks : 01390
- /testnet3/blocks: 00152
For litecoin (Baseiteration=1) its blk and rev files up to the number:
- /blocks : 00124
The base torrent file should always have the following naming scheme:
`raspiblitz-[CHAINNETWORK][BASEITERATIONNUMBER]-[YEAR]-[MONTH]-[DAY]-base.torrent`
So for example the second version of the base torrent for litecoin created on 2018-10-31 would have this name: raspiblitz-litecoin2-2018-10-31-base.torrent
## What is the "Update Torrent File" and how to create it?
All the rest of the files get packaged into a second torrent file. This file will be updated much more often. The seeding is expected to be not that good and download may be slower, but that's OK because it's a much smaller file.
This way a good balance between good seeding and up-to-date blockchain can be reached.
To create the Update Torrent file, follow the following step ...
Have a almost 100% synced bitcoind MAINNET with txindex=1 on a RaspiBlitz
(remove all funds from this node - because blockchain get messed with)
Stop bitcoind with:
```
sudo systemctl stop bitcoind
```
Delete base torrent blk-files with:
```
sudo rm /mnt/hdd/bitcoin/blocks/blk00*.dat
sudo rm /mnt/hdd/bitcoin/blocks/blk0{1000..1390}.dat
```
Delete base torrent rev-files with:
```
sudo rm /mnt/hdd/bitcoin/blocks/rev00*.dat
sudo rm /mnt/hdd/bitcoin/blocks/rev0{1000..1390}.dat
```
Now change to your computer where you package the torrent files and transfere the three directories into your torrent base directory (should be your current working directory):
```
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/blocks ./blocks
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/chainstate ./chainstate
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/indexes ./indexes
```
Also have an almost 100% synced bitcoind TESTNET with txindex=1 on a RaspiBlitz
Stop bitcoind with:
```
sudo systemctl stop bitcoind
```
Delete base torrent blk-files with:
```
sudo rm /mnt/hdd/bitcoin/testnet3/blocks/blk000*.dat
sudo rm /mnt/hdd/bitcoin/testnet3/blocks/blk00{100..152}.dat
```
Delete base torrent rev-files with:
```
sudo rm /mnt/hdd/bitcoin/testnet3/blocks/rev000*.dat
sudo rm /mnt/hdd/bitcoin/testnet3/blocks/rev00{100..152}.dat
```
Now change again to your computer where you package the torrent files and transfer the three directories into your torrent base directory (should be your current working directory):
```
mkdir testnet3
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/testnet3/blocks ./testnet3/blocks
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/testnet3/chainstate ./testnet3/chainstate
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/testnet3/indexes ./testnet3/indexes
```
(Re-)name the "torrent base directory" to the same name as the torrent UPDATE file itself later (without the .torrent ending). The update torrentfile should always have the following naming schema:
`raspiblitz-[CHAINNETWORK][BASEITERATIONNUMBER]-[YEAR]-[MONTH]-[DAY]-update.torrent`
*So for example an update torrent created on 2018-12-24 for litecoin that is an update to the second base torrent version would have this name: raspiblitz-litecoin2-2018-12-24-update.torrent*
Now open your torrent client (e.g. qTorrent for OSX) and create a new torrent-file with the freshly renamed "torrent base directory" as source directory.
Add this list of trackers to your torrent and start seeding (keep a free/empty line between the three single trackers):
```
udp://tracker.justseed.it:1337
udp://tracker.coppersurfer.tk:6969/announce
udp://open.demonii.si:1337/announce
udp://denis.stalker.upeer.me:6969/announce
```
After successful creation of the torrent file:
* copy to `/home.admin/assets`
* push to master
* change in `50torrentHDD.sh script`
* add to Torrent-[RSS](https://github.com/rootzoll/raspiblitz/issues/285#issuecomment-457796120)
* seed at home and at services like justseed.it
* update [issue](https://github.com/rootzoll/raspiblitz/issues/285#issuecomment-457796120) and ask on twitter for help on seeding
## What is the process of creating a new sd card image release?
Work Nodes for the process of producing a new sd card image release:
* Start `Ubuntu LIVE` from USB stick on Build Computer (press F12 on startup)
* Connect secure WIFI (hardware switch on)
* Download latest Raspbian Desktop (without recommended software) from [raspberrypi.org](https://www.raspberrypi.org/downloads/raspbian/) to the NTFS formatted data USB stick
* Open terminal and compare checksum `shasum -a 256 /media/ubuntu/...[DOWNLOADED-RASPBIAN]`
* Use in file manager context on NTFS USB stick `extract here` to unzip
* Connect sd card reader with 8GB sd card
* Use in file manager context on img-file `write image` write to sd card
* Use in file manager context on `boot` drive free space `open in terminal`
* Run command `touch ssh`
* Close terminal and eject `boot`
* Connect a RaspiBlitz (without HDD) to network, insert sd card and power up
* Find IP if RaspiBlitz (arp -a or check router)
* In terminal `ssh pi@[IP-OF-RASPIBLITZ]`
* Password is `raspberry`
* `wget https://raw.githubusercontent.com/rootzoll/raspiblitz/master/build_sdcard.sh && sudo bash build_sdcard.sh`
* Check output for warnings/errors - install LCD
* Login new with `ssh admin@[IP-OF-RASPIBLITZ]` (pw:raspiblitz) and run `./XXprepareRelease.sh`
* Deconnect Wifi on build laptop (hardware switch off) and shutdown
* Remove `Ubuntu LIVE` USB stick and replace with `Ubuntu AIRGAP`
* PowerOn Build Laptop (press F12 for boot menu)
* Cut Power of RaspiBlitz, remove sd card and connect with sd card reader to build laptop
* Open `Disks` manager, select sd card and choose `Create Disk Image` (right upper corner window)
* Store image to NTFS USB stick (click to start can take a while - enter password)
* Open in File Manager the NTFS USB Stick, context menu the created IMG file `compress`
* Name it: `raspiblitz-vX.X-YEAR-MONTH-DAY.img.zip`
* Delete all IMG files from NTFS (just keep zips)
* Context on white space, `Open in Terminal`, run `shasum -a 256 [NEW-ZIP] > sha256.txt`
* [Do future author signing here with tools from airgap build machine]
* Shutdown build computer
* Connect NTFS USB stick to MacOS (its just readonly)
* Run tests with new image
* Upload new image to Download Server
* Copy SHA256-String into GutHub README and update downloadlink
## Can I run RaspiBlitz on other computers than RaspberryPi?
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)
## 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.
But there might be cases where you want to start a totally fresh/clean RaspiBlitz from the beginning. To do so you need to delete the old data from the HDD. You can do so by formating it on another computer (for example with FAT and name it "NEW"). Or when you can run the script "/home/admin/XXcleanHD.sh -all" on the terminal.
When the HDD is clean, then flash a new RaspiBlitz sd card and your setup should start fresh.

580
README.md

@ -1,61 +1,65 @@
[ [Hardware](#hardware-needed-amazon-shopping-list) ] -- [ [Setup](#boot-your-raspiblitz) ] -- [ [Documentation](#documentation) ] -- [ [Development](#further-development-of-raspiblitz) ]
-----
# RaspiBlitz
Fastest and cheapest way to get your own Lightning Node running - on a RaspberryPi with a nice LCD.
*Build your own Lightning Node on a RaspberryPi with a nice Display.*
`Version 0.98 (1.0 RC1) with lnd 0.5.1 and bitcoin 0.17.0.1 & litecoin 0.16.3.`
`Version 1.0 with lnd 0.5.2-beta and bitcoin 0.17.0.1 or litecoin 0.16.3.`
![RaspiBlitz](pictures/raspiblitz.jpg)
*This tutorial is based on the RaspiBolt project - you can find in detail here: https://github.com/Stadicus/guides/blob/master/raspibolt The RaspiBlitz serves as a shortcut through this setup process with some changes and an additional LCD display so that you can quickly experiment with a Lightning node and start working on your LApps on a hacking event (or at home). This shortcut is fine for testnet usage and maybe trying some small things on mainnet. But if you choose to go full reckless afterwards … please consider taking the time and work thru the original RaspiBolt project. Don’t trust us, verify.*
**The RaspiBlitz is a all-switches-on Lightning Node based on LND running together with a Bitcoin- or Litecoin-Fullnode on a RaspberryPi3 - with a 1TB HDD and an nice Display for easy setup & monitoring.**
Its mainly targeted for learning how to run your own node decentralized from home. Discover & develop the growing ecosystem of the Lightning Network by becoming a part of it.
## Feature Overview
This is a quick look at the SSH main menu (once RaspiBlitz is SetUp):
## Table of Contents
![MainMenu-A](pictures/mainmenu.png)
* [ [Hardware](#hardware-needed-amazon-shopping-list) ] Shopping Lists and Putting all together
* [ [Setup](#boot-your-raspiblitz) ] Init and Setup your RaspiBlitz Lightning Node
* [ [Documentation](#documentation) ] Features and Usecases
* [ [Development](#further-development-of-raspiblitz) ] Lets work together on the RaspiBlitz
There are additional services that can be switched on:
## Hardware Needed (Amazon Shopping List)
![MainMenu-Services](pictures/mainmenu-services.png)
*The RaspiBlitz software is build and tested for the following Hardware set that you can buy cheap on GERMAN Amazon:*
As an parallel alternative to the SSH menu there is also the RTL WebUI available (LND API Coverage at 57%):
* RaspBerry Pi 3 (34,99 EUR) https://www.amazon.de/dp/B07BDR5PDW
* Micro SD-Card 16GB (7,99 EUR) https://www.amazon.de/gp/product/B073K14CVB/
* Power >=3A (9,91 EUR) https://www.amazon.de/dp/B01E75SB2C
* 1TB Hard Drive (44,98 EUR) https://www.amazon.de/dp/B07997KKSK?th=1
* Case (9,36 EUR) https://www.amazon.de/dp/B0173GQF8Y
* LCD-Display (16,88 EUR) https://www.amazon.de/gp/product/B06X191RX7
![RTL-preview](pictures/RTL-dashboard.png)
**Total Price: 124,11 EUR** (thats under 150 USD)
See more details in the [Feature Documentation](#feature-documentation) & of course you have all the [Fullnode APIs](#interface--apis).
Amazon shopping lists for different countries:
[ [USA](shoppinglist_usa.md) ] [ [UK](shoppinglist_uk.md) ] [ [France](shoppinglist_fr.md) ] [ [China](shoppinglist_cn.md) ] [ [Australia](shoppinglist_au.md) ] [ [Czech](shoppinglist_cz.md) ] [ [Switzerland](shoppinglist_ch.md) ]
## Time Estimate to Setup a RaspiBlitz
You can even pay your RaspiBlitz Amazon Shopping with Bitcoin & Lightning thru [Bitrefill](https://blog.bitrefill.com/its-here-buy-amazon-vouchers-with-bitcoin-on-bitrefill-bb2a4449724a).
The RaspiBlitz is optimized for being setup during a workshop at a hackday or conference. When it comes ready assembled together with a up-to-date synced blockchain its possible to have it ready in about 2 to 3 hours - most is waiting time.
The shopping list for China refers to Taobao/T-Mall.
If you start at home ordering the parts from Amazon (see shopping list below) then its a weekend project with a lot of download and syncing time where you can do other stuff while checking on the progress from time to time.
### 3D Printed Case (optional)
## Hardware Needed
You can replace the generic case in the shopping lists above with a customized 3D printed for the RaspiBlitz called "Lightning Shell" - great work by @CryptoCloaks
The RaspiBlitz is build from the following parts:
https://thecryptocloak.com/product/lightningshell/
* RaspBerryPi 3 B+
* 1TB Hard Drive
* LCD-Display
* Micro SD-Card 16GB
* Powersupply >=3A (big & stable)
* Cheap Casing
![LightningShell](pictures/lightningshell.png)
**All together under 150 USD / 130 EUR (depending on country & shop)**
### More optional Hardware
## Amazon Shopping Lists
*Some optional goodies to consider to add to your shopping list for your RaspiBlitz (Amazon DE/US):*
These are the community currated shopping lists based on country:
* SD-Card Writer https://www.amazon.de/dp/B01JWFZWUQ / http://a.co/6e03D7Z
* LAN Cable https://www.amazon.de/dp/B004SUEIE2 /http://a.co/g2IJd6i
* USB-LAN-Adapter https://www.amazon.de/dp/B00NPJV4YY / http://a.co/ccb26nF
* Transport Case https://www.amazon.de/dp/B007Y4NWSW / http://a.co/0c6wyM2
* Y-Cable https://www.amazon.de/dp/B00ZJBIHVY / http://a.co/0WTA7nz
* [Germany](shoppinglist_de.md) *(reference shopping list)*
* [USA](shoppinglist_usa.md)
* [UK](shoppinglist_uk.md)
* [Switzerland](shoppinglist_ch.md)
* [France](shoppinglist_fr.md)
* [China](shoppinglist_cn.md)
* [Australia](shoppinglist_au.md)
* [Czech](shoppinglist_cz.md)
If you organizing an educational event where you want to support people learning on and with multiple RaspiBlitz, here is a package list of useful hardware to have at that event: [ [Event Package List](shoppinglist_event.md) ]
*You can even pay your RaspiBlitz Amazon Shopping with Bitcoin & Lightning thru [Bitrefill](https://blog.bitrefill.com/its-here-buy-amazon-vouchers-with-bitcoin-on-bitrefill-bb2a4449724a).*
* [What other case options do I have?](FAQ.md#what-other-case-options-do-i-have)
## Assemble your RaspiBlitz
@ -63,26 +67,20 @@ If your RaspiBlitz is not assembled yet, put the RaspberryPi board into the case
![LCD](pictures/lcdassm.png)
NOTE: Some cases from the shopping lists contain a topping for smaller displays - you can ignore that topping.
*Some cases from the shopping lists contain a topping for smaller displays - you can ignore that topping.*
Connect the HDD to one of the USB ports. In the end your RaspiBlitz should look like this:
![HardwareSetup](pictures/hardwaresetup.jpg)
## Installing the Software
*There are two ways to start:*
* [How to attach the RaspberryPi to the HDD?](FAQ.md#how-to-attach-the-raspberrypi-to-the-hdd)
### Scenario 1: “At a Hackathon/Event”
If you are at an event, ask for a ready-2-go set or if you have your own hardware ask for assistance to prepare your SD-Card and HDD. Then you are all set and and you can proceed with "Setup your RaspiBlitz".
## Installing the Software
### Scenario 2 “Start at Home”
You got all the hardware of the shopping list above and you have no further assistance. Then you need to prepare your SD-Card yourself .. this scenario is still experimental, feedback needed and can take some time.
Your SD-card needs to contain the RaspiBlitz software. You can take the long road by [building the SD-card image yourself](#build-the-sd-card-image) or use the already prepared SD-Card image:
1. Download SD-Card image (version 0.99 - Release Candidate 3 for 1.0):
https://wiki.fulmo.org/downloads/raspiblitz-0.99-2019-01-22.img.gz
91ef1e5b4e55a5a90e9faf094756461be841ba02591bb41ccf481755977b191b
or [build your own SD card image](#build-the-sd-card-image)
1. Download SD-Card image - **Version 1.0**:
(PLEASE BE PATIENT - IMAGE v1.0 IS COMING SOON)
2. Write the SD-Card image to your SD Card - if you need details, see here:
https://www.raspberrypi.org/documentation/installation/installing-images/README.md
@ -93,341 +91,491 @@ Insert the SD card and connect the power plug.
* Make sure to connect the raspberry with a LAN cable to the internet at this point.
* Make sure that your laptop and the raspberry are on the same local network.
* On Mac OS X you can also consider to connect the raspberry directly with your laptop and share your WLAN internet connection over ethernet (thats a nice mobile setup): https://mycyberuniverse.com/mac-os/connect-to-raspberry-pi-from-a-mac-using-ethernet.html
**Troubleshoot:**
* [I dont have a LAN port on my Laptop - how to connect to my RaspiBlitz?](FAQ.md#i-dont-have-a-lan-port-on-my-laptop---how-to-connect-to-my-raspiblitz)
* [Is it possible to connect the Blitz over Wifi instead of using a LAN cable?](FAQ.md#is-it-possible-to-connect-the-blitz-over-wifi-instead-of-using-a-lan-cable)
* [Can I directly connect the RaspiBlitz with my laptop?](FAQ.md#can-i-directly-connect-the-raspiblitz-with-my-laptop)
* [I connected my HDD but it still says 'Connect HDD' on the display?](FAQ.md#i-connected-my-hdd-but-it-still-says-connect-hdd-on-the-display)
When everything boots up correctly, you should see the local IP address of your RaspiBlitz on the LCD panel.
![LCD0](pictures/lcd0-welcome.png)
So open up a [terminal](https://www.youtube.com/watch?v=5XgBd6rjuDQ) and connect thru SSH with the command displayed by the RaspiBlitz:
Now open up a [terminal](https://www.youtube.com/watch?v=5XgBd6rjuDQ) and connect thru SSH with the command displayed by the RaspiBlitz:
`ssh admin@[YOURIP]` → use password: `raspiblitz`
**Now follow the dialoge in your terminal. This can take some time (prepare some coffee) - but in the end you should have a running Lightning node on your RaspberryPi that you can start to learn and hack on.**
## Documentation
## Support
If you run into a problem or you have still a question, follow the steps below to get support. Also check the [setup documentation](#setup-process-detailed-documentation) for details.
1. Lookup the [FAQ](FAQ.md) if you can find an answere to this question/problem.
2. Please determine if your problem/question is about RaspiBlitz or for example with LND. For example if you cant route a payment or get an error when opening a channel that is an LND question/problem an is best answered by the LND dev community: https://dev.lightning.community
3. Go to the GitHub issues of the RaspiBlitz: https://github.com/rootzoll/raspiblitz/issues Do a search there. Also check closed issues by removing 'is:open' from the filter/search-box.
4. If you havent found an answere yet, open a new issue on the RaspiBlitz GitHub. You may have to register an account with GitHub for this. If its a bug with the RaspiBlitz, please add (copy+paste) a Debug Report to your issue (see [FAQ](FAQ.md) how to generate) and/or add some screenshots/photos so the community gets more insight into your problem.
### Setup Process
## Setup Process (Detailed Documentation)
*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 help in 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
### 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
### Getting the Blockchain
*If you have a HDD with a prepared blockchain (e.g. a ready2go-set or you are at a workshop) you can skip to the [next chapter](#setup-lightning). If you started with an empty HDD - you will see the following screen:*
To get a copy of the blockchain, the RaspiBlitz offers the following options:
<img src="pictures/ssh5-blockchain2.png" alt="blockchain-options" width="600">
The options - and when to choose which - will be explained here shortly:
#### 1. Torrent
This is the default way to download the blockchain data for the RaspiBlitz. If you choose it will show you the following screen:
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:
![DOWNLOAD1](pictures/download-torrent.png)
![SSH5](pictures/ssh5-blockchain2.png)
*This can take a while - normally it should be done if you keep it running over night, but some users reported that it took up to 3 days. If it takes longer than that or you cannot see any progress (downloading starting) for over an hour after you started thsi option consider to cancel the download and choose the FTP download option.*
The option "SYNC" should just be use as a fallback. So normally you have the following two options:
It is safe to close the terminal window (shutdown your laptop) while the RaspiBlitz is doing the torrent download. To check on progress and to continue the setup you need to ssh back in again.
#### Download the Blockchain
You can cancel the torrent download by keeping the key `x` pressed. Then the download will stop and you will be asked if you want to keep the progress so far. This makes sense if you need to shutdown the RaspiBlitz and you want to continue later or when you want to try another download option but want to keep the option to continue on torrent if the other option is slower or not working.
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.
* [How can I avoid using a prepared blockchain and validate myself?](FAQ.md#how-can-i-avoid-using-a-prepared-blockchain-and-validate-myself)
* [Why is taking my torrent download of the blockchain so long?]()
For more details: [Background on Download Blockchain](background_downloadBlockchain.md)
#### 2. FTP-Download
#### Copy the Blockchain
You should try the FTP download if the torrent option is not working for you. Please be aware that the files are hosted on a central server by us and up-time and bandwidth is not guaranteed. If you start it, you should see the following screen:
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:
![DOWNLOAD1](pictures/download-ftp.png)
![SSH6b](pictures/ssh6b-copy.png)
It is safe to close the terminal window (shutdown your laptop) while the RaspiBlitz is doing the FTP download. To check on progress and to continue the setup you need to ssh back in again.
You can simply use the HDD of another RaspiBlitz or you prepare a HDD yourself by:
You can cancel the FTP download by keeping the key `x` pressed. Then the download will stop and you will be asked if you want to keep the progress so far. This makes sense if you need to shutdown the RaspiBlitz and you want to continue later or when you want to try another download option but want to keep the option to continue on FTP download if the other option is slower or not working.
* 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:
#### 4. Copying from another Computer
![BitcoinFolderData](pictures/seedhdd.png)
If you have another computer available (laptop, desktop or another raspiblitz) that already runs a working blockchain (with txindex=1) you can use this option to copy it over to the RaspiBlitz. This will be done over the local network by SCP (SSH file transfere). Choose this option and follow the given instructions.
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:
This is also the best option if you dont like to run your RaspiBlitz with a prepared blockchain by a third party. Then install bitcoin-core in a more powerful computer, sync+validate the blockchain (with txindex=1) there by yourself and copy it over after that thru the local network.
![ExtraPower](pictures/extrapower.png)
More details: [I have the full blockchain on another computer. How do I copy it to the RaspiBlitz?](FAQ.md#i-have-the-full-blockchain-on-another-computer-how-do-i-copy-it-to-the-raspiblitz)
**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.*
#### 5. Cloning from a 2nd HDD
#### Lightning
If is a backup way to transfere a blockchain from another computer if copying over the network is not working. More details on the setup can be found [here](FAQ.md#how-do-i-clone-the-blockchain-from-a-2nd-hdd).
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:
#### 6. Sync from Bitcoin-Network
This is the fallback of last resort. A RaspberryPi has a very low power CPU and syncing+validating the blockchain directly with the peer2peer network can take multiple weeks - thats why the other options above where invented.
### Setup Lightning
Lightning is installed and waiting for your setup if you see this screen.
![SSH7](pictures/ssh7-lndinit.png)
The creation of the Lightning Bitcoin Wallet gets done with the command: `lncli create` the RaspiBlitz is calling in the background.
The RaspiBlitz calling the LND wallet creation command for you:
![SSH8](pictures/ssh8-wallet.png)
After the wallet was created the Lightning service needs to scan the Blockchain ... this can take some time. If needed the user can close the SSH session with the RaspiBlitz during that time (progress is displayed on the LCD as status). On SSH back in just continue with the setup process.
First it will ask you to set your wallet unlock password - use your choosen PASSWORD C here and confirm it by inputting it a second time.
Second it will ask you if you have an existing "cipher seed mnemonic" - if this is your first RaspiBlitz/LND just ansere `n`.
*The "cipher seed mnemonic" is the word list that contains the backup of your private key. If you dont have one from a former RaspiBlitz setup it will be created for you. If you want to recovcer on old LND wallet, thats the point in the setup to enter it.*
Third it will ask you if you want to protect your backup word list with an additional password. You can simple keep this empty and just press ENTER to continue. If you want to go for this extra protection use your chossen PASSWORD D here.
LND will now generate a fresh cipher seed (word list) for you. WRITE THIS DOWN before you continue - without you limit your chances to recover funds in case of failing hardware etc. If you just want to try/experiment with the RaspiBlitz at least take a photo with your smartphone just in case. If you might plan to keep your RaspiBlitz running after trying it out store this word list offline or in a password safe. Hit ENTER once your done.
![SSH9](pictures/ssh9-lndscan.png)
It will now make sure your wallet is initialized correctly and may ask you to unlock it with your just set PASSWORD C.
*Background: Blockchain synup, LND wallet creation and LND scanning is all done within the script `70initLND.sh`*
![SSH9c](pictures/ssh9c-unlock.png)
*The LND wallet needs to get unlocked on every new start/reboot of the RaspiBlitz.*
Now the setup process is almost done and the RaspiBlitz needs a reboot:
The RaspiBlitz will now do final setup configuration like installing tools, moving the SWAP file to the HDD or activating the firewall. You will see some text moving across the screen until this screen:
![SSH9b](pictures/ssh9b-reboot.png)
After reboot the RaspiBlitz is showing that the Wallet needs to be unlocked on the LCD and its ready to SSH back in:
The basic setup is done - hooray ... but still prepare for some long waiting time after this before you can play around with your new RaspiBlitz. Press OK to make a reboot. Your terminal session will get disconnected and the raspberry pi restarts.
### First Start: Syncing & Scanning
After the reboot is done it takes a while for all services to start up - wait until you see on the LCD/display that LND wallet needs to get unlocked. Then SSH in again with the same command like in the beginning (check LCD/display) but this time (and every following login) use your PASSWORD A.
After terminal login LND will ask you (like on every start/reboot) to unlock the wallet again - use PASSWORD C:
![SSH9c](pictures/ssh9c-unlock.png)
*Background: The LND wallet needs to get unlocked on every new start of the RaspiBlitz. The status information loop on the LCD is done by the script '00infoBlitz.sh'*
Now on first start you will habe a longer waiting time (between 1 hour and 2-3 days, depending on your initial setup) ... but thats OK, just leave the RaspiBlitz running until its done. You can even close your terminal now and shutdown your laptop and ssh back in later on. You will see on the Blitz LCD/display that it is ready, when the blue backgound screen is gone and you see the status screen like further below.
After SSH back in as admin the main menu shows the unlock option:
To understand what is taking so long .. its two things:
![SSH9d](pictures/ssh9d-unlock.png)
1. Blockchain Sync
Once the wallet is unlocked the setup is finally over and the main menu shows the option and features of the RaspiBlitz:
![SSH9d1](pictures/ssh9d-blockchainsync.png)
![SSH9e1](pictures/ssh9e-mainmenu1.png)
The blockchain on you HDD is not absolutly up-to-date. Depending how you got it transferred to your RaspiBlitz it will be some hours, days or even weeks behind. Now the RaspiBlitz needs to catch-up the rest by directly syncing with the peer-2-peer network until it reaches almost 100%. But even if you see in the beginning a 99.8% this can take time - gaining 1% can be up to 4 hours (depending on network speed). So be patient here.
And if you scroll down .. you see even more feature options:
* [Why is my "final sync" taking so long?](FAQ.md#why-is-my-final-sync-taking-so-long)
![SSH9e2](pictures/ssh9e-mainmenu2.png)
2. LND Scanning
*Background: The script `00mainMenu.sh` is now the place to offer further features und extend the possibilities of the RaspiBlitz. Feel free to come up with ideas. Check out the developer section at the end of this page.*
![SSH9d2](pictures/ssh9d-lndscan.png)
### Features
Automatically if the Blockchain Sync is done LND will start to scan the blockchain and collect information. If you reached this point it should normally just take around 1 hour until the waiting time is over.
You can manually extend your RaspiBlitz with features listed in the RaspiBolt Guide: https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_60_bonus.md
Once all is done you should see this status screen on the RaspiBlitz LCD/display:
Already integrated features of the RaspiBlitz are/will be listed as part of the main menu after connecting via ssh as admin user.
![SSH9dz](pictures/ssh9z-ready.png)
*Background: The script `91addBonus.sh` is the place to put your setup of features you want to add to RaspiBlitz. Its run at the end of the automated setup process before final reboot. To make the feature executable for the user, add a new option to the `00mainMenu.sh`*
### Main Menu
#### Status Infoscreen
If you now login by SSH in your RaspiBlitz (or you are still logged in) you will the the Main Menu:
![feat-info](pictures/feature-info.png)
![SSH9e1](pictures/mainmenu1.png)
#### Detailed Balances and Channel Info
And if you scroll down .. you see even more options. All options of the main menu will be explained below in the feature documentation.
<img src="pictures/bonus-lnbalance.png" alt="bonus-lnbalance" width="600">
*OK .. so from here on your RaspiBlitz is ready to play with.*
<img src="pictures/bonus-lnchannels.png" alt="bonus-lnchannels" width="600">
If you need an idea what the most basic next steps to experience Lightning would be:
#### TOR Integration (experimental)
* Fund on-chain Wallet
* Open a channel
* Make a payment
You can use the Switch to TOR option from the main menu to make the node reachable thru TOR. This way you can get thru a NAT without needed to open/forward ports on your router. Bitcoin and LND will have a seperate onion-address displayed on LCD and the Status Info Screen option in menu.
If you like to do this all from a webbrowser with a dashboard UI instead from an SSH terminal, go to `SERVICES`, activate the `RTL Webinterface` and after the reboot open in your webbrowser: http://[LOCAL-IP-OF-YOU-NODE]:3000 (PASSWORD B is your RPC password).
![tor1](pictures/tor1.png)
Have fun and riding the lightning :D
The TOR integration is experimental and at the moment there is no way to switch off TOR again.
*BTW always love seeing photos of new RaspBlitzes added to the network on twitter @rootzoll*
* [How can I get further help/support?](#support)
### Feature Documentation
These are the features available thru the RaspiBlitz SSH main menu and services. They have the goal to offer some basic/fallback functionality & configurations to you. More complex or user-friendly tasks are best to be done with wallets, apps and scripts you connect to your Lightning Node via [APIs](#interface--apis) - because you have a full Bitcoin- and Lightning-Node on the RaspiBlitz.
So lets take a look at the SSH main menu (3 pages to scroll down):
![MainMenu-A](pictures/mainmenu1.png)
#### INFO: Raspiblitz Status Screen
This is the screen that gets displayed on the LCD/display. Its useful to call in a remote situation from SSH if you dont have your RaspiBlitz next to you. But also if you want to copy+paste your nodeID or make a screenshot.
![SSH9dz](pictures/ssh9z-ready.png)
*Its not automatically updating. Its just for one-time info.*
* [Why is my bitcoin IP on the display red?](FAQ.md#why-is-my-bitcoin-ip-on-the-display-red)
* [Why is my node address on the display red?](FAQ.md#why-is-my-node-address-on-the-display-red)
* [Why is my node address on the display yellow (not green)?](FAQ.md#why-is-my-node-address-on-the-display-yellow-not-green)
#### FUNDING: Fund your on-chain Wallet
Before you can open channels with other nodes you need to put some coins onto your LND on-chain wallet. Use this option to generate an address to send funds to.
*Reminder: RaspiBlitz & LND is still experimental software. With funding your LND node you accept the risk of loosing funds. So just play with small amounts - something in then area of 20 EUR/USD should be enough to make your first experiences.*
#### CONNECT: Connect to a Peer
Before you can open a channel with another node on the network you need to connect this node as a peer to your node.
Opening a channel with a peer is just optional. Having another node a peer helps your node to receive information about the network thru the gossip protocol. It will help your node to find better routes thru the network.
#### CHANNEL: Open a Channel with Peer
To open a payment channel with another node you can use this option.
Find interessting nodes to open channels with on online directories like [1ML.com](https://1ml.com/).
*This is just a very basic shell script. For more usability try the RTL Webinterface (under Services) or connect a (mobile) wallet with your RaspiBlitz.*
#### Connect to Mobile Wallet
#### SEND: Pay an Invoice/PaymentRequest
There is now the option to connect and control your LND node with the mobile app called "Shango" - choose option in the main menu.
Pay an invoice thru lightning.
![shango1](pictures/shango1.png)
*This is just a very basic shell script. For more usability try the RTL Webinterface (under Services) or connect a (mobile) wallet with your RaspiBlitz.*
#### RaspiBlitz as Backend for BTCPayServer (experimental)
#### RECEIVE: Create Invoice/PaymentRequest
BTCPay Server is a solution to be your own payment processor to accept Lightning Payments for your online store: https://github.com/btcpayserver/btcpayserver
Create an invoice to send to someone or a service to be payed thru lightnig.
You can find setup instructions here: https://goo.gl/KnTzLu
*This is just a very basic shell script. For more usability try the RTL Webinterface (under Services) or connect a (mobile) wallet with your RaspiBlitz.*
Thanks to @RobEdb (ask on twitter for more details) running his demo store with RaspiBlitz: https://store.edberg.eu - buy a picture of [him and Andreas](https://store.edberg.eu/produkt/jag-andreas/) :)
![MainMenu-B](pictures/mainmenu2.png)
#### Public Domain with DynamicDNS
#### SERVICES: Activate/Deactivate Services
This is a way to make your RaspiBlitz publicly reachable from the internet so that other nodes can open channels with you and you can connect with the
![MainMenu-Services](pictures/mainmenu-services.png)
To do so you can register at an DynamicDomain service like freedns.afraid.org, forward the TCP ports 8333 (Bitcoin/mainnet),9735 (LND Node) & 10009 (LND RPC) from your internet router to the local IP of your RaspiBlitz and then activate unter "Services" the "DynamicDNS" option.
##### Channel Autopilot
The autopilot is a feature of LND that you can switch on. It automatically uses around half of your your on-chain funds (if available) to open channels with other lightning nodes the autopilot thinks can be useful to improve your payment routes.
##### Testnet
You can switch from mainnet to testnet of your blockchain if you want to try things out and play with free test coins.
Please beware that to might take some time to sync the test blockchain and you need to setup a new lnd testnet wallet during the process.
##### DynamicDNS
This is a way to make your RaspiBlitz publicly reachable from the internet so that other nodes can open channels with you and you can connect with your mobile wallet from outside your local network.
To do so you can register at an DynamicDomain service like freedns.afraid.org and forward the TCP ports ...
* 8333 (Bitcoin/mainnet)
* 9735 (LND Node)
* 10009 (LND RPC)
... from your internet router to the local IP of your RaspiBlitz and then activate unter "Services" the "DynamicDNS" option.
You will be asked for your dynamic domain name such like "mynode.crabdance.org" and you can also optionally set an URL that will be called regularly to update your routers IP with the dynnamic domain service. At freedns.afraid.org this URL is called "Direct URL" under the menu "Dynamic DNS" once you added one.
## Auto-unlock LND on startup
##### Run behind TOR
You can run your Bitcoin- and Lightning-Node as a TOR hidden service - replacing your IP with an .onion-address
![tor1](pictures/tor1.png)
This has some benefits:
* You dont publish your IP running a node so its much harder to resolve your real name and location.
* You tunnel thru the NAT of your router and make Bitcoin and Lightning reachable to all other TOR nodes.
* By using a TOR address it's possible to move the node to a different IPv4 address and keep the existing (=preciously open and funded) channels functional.
But this also comes with the following side effects:
* Mobile wallets dont support connecting over TOR yet
* Lightning nodes that dont run TOR cannot reach you (like behind NAT)
To try it out just switch on the service - you can deactivate later on if its not working for you.
The TOR integration is experimental and at the moment there is no way to switch off TOR again.
##### RTL Webinterface
The RTL Webinterface is a LND Control Dashboard you can run in your browser with a nice GUI - it offers much more control over your Lightning node than the RaspiBlitu SSH menus. Its recommended to give it a try.
![RTL](pictures/RTL-dashboard.png)
Feedback is welcome by the RTL programmer: https://github.com/ShahanaFarooqui/RTL
##### LND Auto-Unlock
This feature is based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_6A_auto-unlock.md
It can be activated under "Services" -> "Auto-unlock LND". Its recommended to be turned on, when DynamicDNS is used. Because on a public IP change of your router, LND gets restarted automatically and without Auto-Unlock it will stay inactive/unreachbale until you manually unlock it.
But keep in mind that when activated, your Password C will be stored on the RaspiBlitz SD card. That lowers your security in (physical) attack scenarios. On an update you would need to re-enter your password C.
* [When using Auto-Unlock, how much security do I lose?](FAQ.md#when-using-auto-unlock-how-much-security-do-i-lose)
## Get a Debug Report
#### MOBILE: Connect Mobile Wallet
If your RaspiBlitz is not working right and you like to get help from the community, its good to provide more debug information, so other can better diagnose your problem - please follow the following steps to generate a debug report:
This feature should support you in connecting your RaspiBlitz to a mobile wallet on your smartphone.
- ssh into your raspiblitz as admin user with your password A
- If you see the menu - use CTRL+C to get to the terminal
- If your RaspiBlitz is lower then version 0.96 then run: `./XXupdateScripts.sh` first
- To generate debug report run: `./XXdebugLogs.sh`
- Then copy all output beginning with `*** RASPIBLITZ LOGS ***` and share this
<img src="pictures/mobile.png" alt="mobile-wallets">
PLEASE NOTICE: Its possible that this logs can contain private information (like IPs, node IDs, ...) - just share publicly what you feel OK with.
At the moment [ZAP (iOS)](https://github.com/LN-Zap/zap-iOS) and [Shango (iOS/Android)](https://github.com/neogeno/shango-lightning-wallet) are available.
## Build the SD Card Image
Please keep in mind that if you also want to connect to your smartphone also from the outside (thru LTE, 3G, ..) with your RaspiBlitz you might need to open/forward ports on your router and should look into the DynamicDNS features to handle changeing IP of our Home-DSL.
A ready to use SD card image of the RaspiBlitz for your RaspberryPi is provided as download by us to get everybody started quickly. But if you want to build that image yourself - here is a quick guide:
* [How do I shrink the QR code for connecting my Shango/Zap mobile phone?](FAQ.md#how-do-i-shrink-the-qr-code-for-connecting-my-shangozap-mobile-phone)
* Get a fresh Rasbian RASPBIAN STRETCH WITH DESKTOP card image: [DOWNLOAD](https://www.raspberrypi.org/downloads/raspbian/)
* Write image to a SD card: [TUTORIAL](https://www.raspberrypi.org/documentation/installation/installing-images/README.md)
* Add a file called `ssh` to the root of the SD card when mounted to enable SSH login
* Start card in Raspi and login per SSH with `ssh pi@[IP-OF-YOUR-RASPI]` password is `raspberry`
#### EXPORT: Macaroons and TLS.cert
Now you are ready to start the SD card build script - copy the following command into your terminal and execute:
Offers the following options to get the Macaroon and TLS files to be used in other apps and wallets.
`wget https://raw.githubusercontent.com/rootzoll/raspiblitz/master/build.sdcard/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh`
*Macaroons: Access Tokens that allow certain command executions on the LND node.*
As you can see from the URL you find the build script in this Git repo under `build.sdcard/raspbianStretchDesktop.sh`- there you can check what gets installed and configured in detail. Feel free to post improvements as pull requests.
*TLS: Certificate to secure/encrypt the communication with the LND node.*
The whole build process takes a while. At the end the LCD drivers get installed and a reboot is needed. A user `admin` is created during the process. Remember the default password is now `raspiblitz`. You can login per SSH again - this time use admin: `ssh admin@[IP-OF-YOUR-RASPI]`. An installer of the SD card image should automatically launch. If you do not want to continue with the installation at this moment, click `Cancel` and simply shutdown with `sudo shutdown now`. Once you see the LCD going white and the activity LED of the pi starts going dark, you can unplug power and remove the SD card. You have now built your own RaspiBlitz SD card image.
<img src="pictures/export.png" alt="export">
*Note: If you plan to use your self build sd card as a MASTER copy to backup image and distribute it. Use a smaller 8GB card for that. This way its ensured that it will fit on every 16 GB card recommended for RaspiBlitz later on.*
##### Hex-String
And if you are a developer - to build a sd card from the dev-branch use this command to execute:
The Macaroons and TLS.cert files can be copy+pasted as Hex-Strings from RaspiBlitz to any other app that supports that. If you choose this option RaspiBlitz will all files print for you as Hex-String to do so.
`wget https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build.sdcard/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh 'dev'`
This method is recommended to export to:
* [Joule Browser Wallet](https://lightningjoule.com)
## Working with a forked GitHub Repo
##### SSH Download
If you fork the RaspiBlitz repo (much welcome) and you want to run that code on your RaspiBlitz, there are two ways to do that:
SCP is a SSH like command to transfer files. If were able to SSH into the RaspiBlitz also the SCP to transfere the files should work. If you choose these option, RaspiBlitz will print prepared SCP commands you can copy+paste to run in a second terminal.
* The quick way: For small changes in scripts, go to `/home/admin` on your running RaspiBlitz, delete the old git with `sudo rm -r raspiblitz` then replace it with your code `git clone [YOURREPO]` and `./XXupdateScripts.sh`
This method is recommended to export to:
* [Zap Desktop Wallet](https://github.com/LN-Zap/zap-desktop)
* The long way: If you like to install/remove/change services and system configurations you need to build a SD card from your own code. Prepare like in `Build the SD Card Image` but in the end run the command:
##### Browserdownload
`wget https://raw.githubusercontent.com/[GITHUB-USERNAME]/raspiblitz/[BRANCH]/build.sdcard/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh [BRANCH] [GITHUB-USERNAME]`
Opens an ad-hoc webserver so that you can download the files in your local network thru the browser.
## Update to a new SD Card Release
*This is a least secure way to transfere those file - everybody in your local network has access to those file during download. Remember with the Admin-Macaroon somebody could takeover your node and spend all your funds. Just use as last fallback.*
At the beginning of this README you can find the newest SD card we provide. Or you can build the newest SD card image yourself like in the chapter above. The SD card image is used to setup a fresh install of the RaspiBlitz. So what to do if you already have an older version running and you want to upgrade?
##### Renew Macaroons & TLS
Until we reach version 1.0 the update process will be a bit rough .. so what you do is:
* close all open lightning channels you have (`lncli closeallchannels --force`)
* wait until all closing transactions are done
* move all on-chain funds to a wallet outside raspiblitz (`lncli --conf_target 3 sendcoins [ADDRESS]`)
* run the script `./XXcleanHDD.sh` in admin home directory (Blockchain will stay on HDD)
* shutdown RaspiBlitz (`sudo shutdown now`)
* flash SD card with new image
* Redo a fresh setup of RaspiBlitz
* Move your funds back in
* Re-Open your channels
Use if you want to invalidate earlier exported Macaroons & TLS files - e.g. lost mobile wallet.
We know that this is not optimal yet. But until version 1.0 we will change too much stuff to garantue any other save update mechanism. Also by redoing all the setup you help out on testing the lastest setup process.
#### NAME: Change Name/Alias of Node
From the upcomming version 1.0 onwards the goal is to make it easier to keep up with the lastest RaspiBlitz updates.
Change the name of your node.
## Recover your Coins from a failing RaspiBlitz
#### PASSWORD: Change Passwords
You might run into a situation where your hardware fails or the software starts to act buggy. So you decide to setup a fresh RaspiBlitz, like in the chapter above "Update to a new SD Card Release" - but the closing channels and cashing out is not working anymore. So whats about the funds you already have on your failing setup?
Change you passwords for security.
There is not a perfect way yet to backup/recover your coins, but you can try the following to make the best out of the situation:
![MainMenu-C](pictures/mainmenu3.png)
### 1) Recover from Wallet Seed
#### CHASHOUT: Remove Funds fro, on-chain Wallet
Remember those 24 words you were writing down during the setup? Thats your "cipher seed" - now this words are important to recover your wallet. If you dont have them anymore: skip this chapter and read option 2. If you still have the cypher seed: good, but read the following carefully:
Use if the want to remove all funds from the RaspiBlitz.
With the cypher seed you can recover the bitcoin wallet that LND was managing for you - but it does not contain all the details about the channels you have open - its just the key to your funding wallet. If you were able to close all channels or never opened any channels, then everything is OK and you can go on. If you had open channels with funds in there, the following is to consider:
#### lnbalance: Detailed Wallet Balances
<img src="pictures/bonus-lnbalance.png" alt="bonus-lnbalance" width="600">
* You now rely on your channel counter parts to force close the channel at one point. If they do, the coins will be available to use in your funding wallet again at one point in the future - after force close delay.
* If your channel counter parts never force close the channel (because they are offline too) your channel funds can be frozen forever.
#### lnchannels: Lightning Channel List
So going this way there is a small risk, that you will not recover your funds. But normally if your channel counter parts are still online, see that you will not come back online and they have themselves some funds on their channel side with you: They have an incentive to force close the channel to make use of their funds again.
<img src="pictures/bonus-lnchannels.png" alt="bonus-lnchannels" width="600">
So here is what todo if you want to "Recover from Wallet Seed" with RaspiBlitz:
#### OFF: PowerOff RaspiBlitz
- SetUp a fresh RaspiBlitz (fresh SD-Card image and clean HDD).
- During the new SetUp you get to the point of creating the LND wallet (see image below).
- When you get asked "do you have an existing cypher wallet" answere `y` this time.
- Follow the dialog and enter the cypher seed.
- If you get asked at the end for the password D to encrypt your cypher seed, use the same as the last time. If you havent entered one last time, just press Enter again.
A safe way to shutdown the RaspiBlitz. If then a reboot/restart is needed - un/replug the power.
![SSH8](pictures/ssh8-wallet.png)
#### X: Console Terminal
Then give LND some time to rescan the blockchain. In the end you will have restored your funding wallet. You maybe need to wait for your old channel counter parts to force close the old channels until you see the coins back displayed.
Closes the SSH main menu and exits to the terminal - where the user can make use of the CLI clients `bitcoin-cli` & `lncli` directly to make use of the Bitcoin- and Lightningnode.
### 2) LND Channel State Backup
With the command `raspiblitz` it's possible to return to the main menu.
This second option is very very risky and can lead to complete loss of funds. And it olny can work, if you can still access the HDD content of your failing RaspiBlitz. It should only be used if you lost your cypher seed for the option above, forgot your cypher seed encryption password or your old channel counter parts are offline, too.
## Interface / APIs
What you do is in priciple:
- Make a copy of the HDD directory "/mnt/hdd/lnd"
- Setup a fresh RaspiBlitz
- Stop LND
- Replace the new "/mnt/hdd/lnd" with your backuped version
- Reboot the RaspiBlitz
To develop your own scripts/apps and to connect other servcies/apps to your RaspiBlitz you have multiple interfaces/APIs available:
This is highly experimental. And again: If you restore the LND with an backup that is not representing the latest channel state, this will trigger the lightning "penalty" mechanism - allowing your channel counter part to grab all the funds from a channel. Its a measure of last resort. But if its working for you, let us know.
### Bitcoin
## Mobile Development: Connect RaspiBlitz without a Router/Switch
* `bitcoin-cli` command line interface on the terminal
* `bitcoind` running on port 8333 (public)
* `JSON-RPC` running on port 8332 (local) [DOC](https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29)
To connect a RaspiBlitz directly (without a router/switch) to your laptop and share the WIFI internet connection, you can follow this [guide for OSX](https://medium.com/@tzhenghao/how-to-ssh-into-your-raspberry-pi-with-a-mac-and-ethernet-cable-636a197d055). In short:
### LND-Lightning
* make sure all VPN are off (can interfere with local LAN)
* connect with LAN directly
* Settings > Sharing/Freigaben > activate "internet sharing" from WLAN to Ethernet
* Settings > Network > Ethernet-Adapter > set to DHCP
* in terminal > `ifconfig` there you should the the IP of the bridge100
* in terminal > `arp -a` and check for an IP of a client to the bridge
* in terminal > ssh admin@[clientIP]
* `lncli` command line interface on the terminal [DOC](https://api.lightning.community/)
* `lnd` running on port 9735 (public)
* `gRPC` running on port 10009 (public) [DOC](https://api.lightning.community/)
* `REST` running on port 8080 (public) [DOC](https://api.lightning.community/rest/index.html)
## Further Development of RaspiBlitz
## Updating to new Version
The RaspiBlitz was developed on the basis of the RaspiBolt Guide to run LND on a RaspberryPi: https://github.com/Stadicus/guides/blob/master/raspibolt - the idea was to prepare as much as possible and have it on a SD-card ready to startup quickly. The configuration should be automated by scripts combined with some very basic user interaction thru the terminal for adminstration. The LCD should provide basic information, so that the health and state of the RaspiBlitz could be monitored with ease. The LCD has also basic touch support and could be used for direct and fast daily interactions.
If you have a RaspiBlitz older then verison 0.98 please [see here](FAQ.md).
The goal of the RaspiBlitz is to provide a out-of-the-box hardware lightning node to learn the basics of being part of the decentralized network and to quickly start building your own applications based on lightning (LApps) - at home or at educational/hacking events. With the well known [GPIO-Pins](https://www.raspberrypi.org/documentation/usage/gpio/) of the RaspberryPi, low-cost entry point and its rich hardware extension ecosystem it seems like the perfect device to foster the communities creativity. Lets keep crypto weird.
If you have a RaspiBlitz version 0.98 or newer do the following:
Everybody is welcome to join, improve and extend the RaspiBlitz - its a work in progress. Check the issues if you wanna help out or add new ideas. You find the scripts used for RaspiBlitz interactions on the device at `/home/admin` or in this git repo in the subfolder `home.admin`. More to come.
* Main menu > OFF
* Remove power
* Remove SD card
Join me on twitter [@rootzoll](https://twitter.com/rootzoll), visit us at a [#lightninghackday](https://twitter.com/hashtag/LightningHackday?src=hash) in Berlin or drop by the Bitcoin Assembly at the [#35C3](https://twitter.com/hashtag/35C3).
Now download the new RaspiBlitz SD card image and write it to your SD card .. yes you simply overwrite the old one, it's OK, the RaspiBlitz stores all your personal data on the HDD. See details about latest SD card image [here](#installing-the-software).
IRC channel on Freenode `irc://irc.freenode.net/raspiblitz` (unmoderated)
*If you have done manual changes to the system (installed packages, added scripts, etc) you might need to do some preparations before overwriting your sd card - see [FAQ](FAQ.md#why-do-i-need-to-re-burn-my-sd-card-for-an-update).*
If done successfully, simply put the SD card into the RaspiBlitz and power on again. Then follow the instructions on the display ... and dont worry, you dont need to re-download the blockchain again.
# RaspiBlitz on DietPi
* [Why do I need to re-burn my SD card for an update?](FAQ.md#why-do-i-need-to-re-burn-my-sd-card-for-an-update)
DietPi is a lightweight operating system based Debian (just like Raspbian).
It is compatible with a range of ARM based SBC-s.
Check it out on: [dietpi.com](https://dietpi.com)
## Build the SD Card Image
Issues:
* Setup is not automated yet - more steps required than running on Raspbian.
* There is no LCD support yet on DietPi.
A ready to use SD card image of the RaspiBlitz for your RaspberryPi is provided as download by us to get everybody started quickly (see above). But if you want to build that image yourself - here is a quick guide:
* Get a fresh Rasbian RASPBIAN STRETCH WITH DESKTOP card image: [DOWNLOAD](https://www.raspberrypi.org/downloads/raspbian/)
* Write image to a SD card: [TUTORIAL](https://www.raspberrypi.org/documentation/installation/installing-images/README.md)
* Add a file called `ssh` to the root of the SD card when mounted to enable SSH login
* Start card in Raspi and login per SSH with `ssh pi@[IP-OF-YOUR-RASPI]` password is `raspberry`
Now you are ready to start the SD card build script - copy the following command into your terminal and execute:
See the instructions using DietPi for multiple kind of hardware: [dietpi/README.md](dietpi/README.md)
`wget https://raw.githubusercontent.com/rootzoll/raspiblitz/master/build_sdcard.sh && sudo bash build_sdcard.sh`
after installing DietPi and buliding the SDcard the setup continues from [Documentation](#documentation))
As you can see from the URL you find the build script in this Git repo under `build_sdcard.sh` - there you can check what gets installed and configured in detail. Feel free to post improvements as pull requests.
The whole build process takes a while. At the end the LCD drivers get installed and a reboot is needed. A user `admin` is created during the process. Remember the default password is now `raspiblitz`. You can login per SSH again - this time use admin: `ssh admin@[IP-OF-YOUR-RASPI]`. An installer of the SD card image should automatically launch. If you do not want to continue with the installation at this moment and use this sd card as a template for setting up multiple RaspiBlitze, click `Cancel` and run `/home/admin/XXprepareRelease.sh`. Once you see the LCD going white and the activity LED of the pi starts going dark, you can unplug power and remove the SD card. You have now built your own RaspiBlitz SD card image.
*Note: If you plan to use your self build sd card as a MASTER copy to backup image and distribute it. Use a smaller 8GB card for that. This way its ensured that it will fit on every 16 GB card recommended for RaspiBlitz later on.*
* [Can I run RaspiBlitz on other computers than RaspberryPi?](FAQ.md#can-i-run-raspiblitz-on-other-computers-than-raspberrypi)
* [How can I build an SD card other then the master branch?](FAQ.md#how-can-i-build-an-sd-card-other-then-the-master-branch)
* [How can I build an SD card from my forked GitHub Repo?](FAQ.md#how-can-i-build-an-sd-card-from-my-forked-github-repo)
## FAQ
Here is a just a short selection of the very frequently asked questions:
* [How to backup my Lightning Node?](FAQ.md#how-to-backup-my-lightning-node)
* [How can I recover my coins from a failing RaspiBlitz?](FAQ.md#how-can-i-recover-my-coins-from-a-failing-raspiblitz)
* [Are those "Under-Voltage detected" warnings a problem?](FAQ.md#are-those-under-voltage-detected-warnings-a-problem)
* [Can I run RaspiBlitz on other computer boards than RaspberryPi?](FAQ.md#can-i-run-raspiblitz-on-other-computers-than-raspberrypi)
You have still more questions? Check the [RaspiBlitz-FAQ-Archive](FAQ.md).
## Community Development
Everybody is welcome to join, improve and extend the RaspiBlitz - its a work in progress. [Check the issues](https://github.com/rootzoll/raspiblitz/issues) if you wanna help out or add new ideas. You find the scripts used for RaspiBlitz interactions on the device at `/home/admin` or in this git repo in the subfolder `home.admin`.
Join me on twitter [@rootzoll](https://twitter.com/rootzoll), visit us at a upcomming [#lightninghackday](https://twitter.com/hashtag/LightningHackday?src=hash) or check by on of our bitcoin meetups in Berlin ... every 1st Thursday evening a month at the room77 bar - feel free to buy me a beer with lightning there :)
* [How can I get further help/support?](#support)
IRC channel on Freenode `irc://irc.freenode.net/raspiblitz` (unmoderated)

155
background_downloadBlockchain.md

@ -1,155 +0,0 @@
# Background: Blockchain Download
## Why do we need to download the blockchain and not syncing it?
The RaspiBlitz is powered by the RaspberryPi. The processing power of this SingleBoardComputer is too low to make a fast sync of the blockchain from the bitcoin peer to peer network during setup process (validation). To sync and index the complete blockchain could take weeks or even longer. Thats why the RaspiBlitz needs to download a prepared blockchain from another source.
## Is downloading the blockchain secure?
The downloaded Blockchain is pre-indexed and pre-validated. That is secure enough because if the user gets a "manipulated" blockchain it would not work after setup. The beginning of the downloaded blockchain needs to fit the genesis block (in bitcoind software) and the end of the downloaded blockchain needs not match with the rest of the bitcoin network state - hashes of new block distrubuted within the peer-2-peer network need to match the downloaded blockchain head. So if you downloaded a manipulated blockchain it would simply just dont work in practice.
There might be theoretical scenarios why it would be bad for the whole network if anybody is downloading a prepared blockchain and not syncing and self-validating every block, but with a lot of self-validating full nodes already out there, just putting some RaspiBlitz with a downloaded blockchain into the mix and runnig as a self-valifating full node from that point on, is practically just strengthening the the overall network. And dont forget, the most important part of running a full node is to validate the new blocks summited by the miners - to balance out there power and to keep the Bitcoin network running by our rules.
If you have any link to a more detailed discussion of this topic, please add it here for people to do their own research.
## Blockchain Data
The RaspiBlitz needs the following files from a bitcoind (>=0.17.0) that is fully sync and has indexing switched on (has line txindex=1 in bitcoin.conf file) - all files from the directories:
```
/blocks
/chainstate
/indexes
```
Notice: If you had your node fully sync but not indexed, once you switch it on you need to start your client and wait for it to verify the chain and index before copying the folders above to your external HDD. This can take a couple of hours.
Make sure not to add other files like wallet data or lock files to a prepared download.
You might want to include the testnet data also - then add the testnet3 folder that just contains the same three folders from the testnet blockchain.
On download all those files need to be placed finally in the /mnt/hdd/bitcoin folder of the RaspiBlitz.
## Download Process
At the moment the RaspiBlitz offers two technical ways to download the blockchain:
### FTP Download (fallback)
The easiest way is to put the blockchain data on a FTP server and let people download it. FTP is able to download complete directories - HTTP can just handle single file. FTP clients and server hosting is widly available.
The downside that this is a central point solution and is hard to scale up (without spending a lot of money). But it is available as a backup, if other solutions do not work.
### Torrent Download (default)
The preferred way is to to download the blockchain data thru the peer2peer torrent network. This way the community can help to seed the torrents (at least while downloading). Supporters of the project can setup constant seeding. There is no single point of failure within the download structure.
In the beginning we used just on torrent file - containing all the directories and data like mentioned above. But this had the downside, that everytime when we update the torrent the seeding is bad in the beginning and downloads are slow. Good seeding needs time to build up.
Thats why there are two torrent files now:
#### Base Torrent File
Inspired by the website getbitcoinblockchain.com we use one of their base torrent files to have a basic set of blocks - that will not change for the future. This torrent contains most of the data (the big file) and we dont need to change the torrent for a long time. This way the torrent can get establish a wide spread seeding and the torrent network can take the heavy load.
At the moment this is just the bitcoin blk and rev files up to the number:
- /blocks : 01390
- /testnet3/blocks: 00152
For litecoin its blk and rev files up to the number:
- /blocks : 00124
#### Update Torrent File (Description)
All the rest of the files get packaged into a second torrent file. This file will be updated much more often. The seeding is expected to be not that good and download may be slower, but thats OK because its a much smaller file.
This way a good balance between good seeding and up-to-date blockchain can be reached.
#### Update Torrent File (Creation)
To create the Update Torrent file, follow the following step ...
Have a almost 100% synced bitcoind MAINNET with txindex=1 on a RaspiBlitz
(remove all funds from this node - because blockchain get messed with)
Stop bitcoind with:
```
sudo systemctl stop bitcoind
```
Delete base torrent blk-files with:
```
sudo rm /mnt/hdd/bitcoin/blocks/blk00*.dat
sudo rm /mnt/hdd/bitcoin/blocks/blk0{1000..1390}.dat
```
Delete base torrent rev-files with:
```
sudo rm /mnt/hdd/bitcoin/blocks/rev00*.dat
sudo rm /mnt/hdd/bitcoin/blocks/rev0{1000..1390}.dat
```
Now change to your computer where you package the torrent files and transfere the three directories into your torrent base directory (should be your current working directory):
```
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/blocks ./blocks
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/chainstate ./chainstate
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/indexes ./indexes
```
Also have a almost 100% synced bitcoind TESTNET with txindex=1 on a RaspiBlitz
Stop bitcoind with:
```
sudo systemctl stop bitcoind
```
Delete base torrent blk-files with:
```
sudo rm /mnt/hdd/bitcoin/testnet3/blocks/blk000*.dat
sudo rm /mnt/hdd/bitcoin/testnet3/blocks/blk00{100..152}.dat
```
Delete base torrent rev-files with:
```
sudo rm /mnt/hdd/bitcoin/testnet3/blocks/rev000*.dat
sudo rm /mnt/hdd/bitcoin/testnet3/blocks/rev00{100..152}.dat
```
Now change again to your computer where you package the torrent files and transfere the three directories into your torrent base directory (should be your current working directory):
```
mkdir testnet3
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/testnet3/blocks ./testnet3/blocks
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/testnet3/chainstate ./testnet3/chainstate
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/testnet3/indexes ./testnet3/indexes
```
(Re-)name the "torrent base directory" to the same name as the torrent UPDATE file itself later (without the .torrent ending). For the correct naming see the chapter "Torrent Files Naming Schema" below.
Now open your torrent client (e.g. qTorrent for OSX) and create a new torrent-file with the freshly renamed "torrent base directory" as source directory.
Add this list of trackers to your torrent and start seeding (keep a free/empty line between the three single trackers):
```
udp://tracker.justseed.it:1337
udp://tracker.coppersurfer.tk:6969/announce
udp://open.demonii.si:1337/announce
udp://denis.stalker.upeer.me:6969/announce
```
Name the new torrent file
To create the torrent file can take some time. Finally add the generated torrent file to the /home.admin/assets/ of the github and change the name of the updateTorrent varibale file in the script 50torrentHDD.bitcoin.sh
#### Torrent Files Naming Schema
The base torrent file should always have the following naming scheme:
`raspiblitz-[CHAINNETWORK][BASEITERATIONNUMBER]-[YEAR]-[MONTH]-[DAY]-base.torrent`
So for example the second version of the base torrent for litecoin created on 2018-10-31 would have this name: raspiblitz-litecoin2-2018-10-31-base.torrent
The update torrentfile should always have the following naming schema:
`raspiblitz-[CHAINNETWORK][BASEITERATIONNUMBER]-[YEAR]-[MONTH]-[DAY]-update.torrent`
So for exmaple an update torrent created on 2018-12-24 for litecoin that is an update to the second base torrent version would have this name: raspiblitz-litecoin2-2018-12-24-update.torrent

43
background_raspiblitzSettings.md

@ -1,43 +0,0 @@
# Background: RaspiBlitz Settings
## Before Version 1.0
The RaspiBlitz started as small collection of shell scripts to setup a bitcoin+lightning node. At this time it was not needed to have settings file. The idea was that the scripts analyse the system state and make the changes required - automatically trying to catch up. That was OK as long RaspiBlitz was just a helper to setup your Lightning node and the rest was up to you.
Over time users that are running a RaspiBlitz expected that it can handle more complex setup and customization. Also it should be easy to update the system (exchange sd card with a newer image) and should be able to have the same configuration afterwards - keeping its state. Thats why starting from version 1.0 there will be a raspiblitz config file stored on the HDD that stores stores the config state.
## The Config File
The RaspiBlitz config file is stored on the HDD root:
`/mnt/hdd/raspiblitz.conf`
Its simple structure is: one key-value pair per line. In the end its bash-script syntax to define varibales. The RaspiBlitz shell scripts can import this file with:
`source /mnt/hdd/raspiblitz.conf`
After this line all the config values are available and can be worked with. I prefer to call this line in scripts explicitly and not setting this values as environment variables, because when you read as a newbie such a script, you get an idea where the config file is stored.
## The Config Values
So see what config parameters are available check the comments in the following script:
`/home/admin/_bootstrap.sh`
## Adding new Config Values
If you extend the RaspiBlitz scripts and you have the need to add a new config key-value add it to the `/home/admin/00enforceConfig.sh` script. There is a section for default values and setting them in the config file, if they dont exist there yet. Because this script runs on every startup, you can be sure that the default value is then available to your extended script - especially if people update their system.
## Bootstrap Service: Enforcing the Config
On every start of the RaspiBlitz take the config file and check if the system is running as stated in the config file and when needed make changes to the system. This is done by calling this script on startup with systemd:
`/home/admin/_bootstrap.sh`
So if you change the config by hand or you write a script that changes the config, then simply trigger a restart the RaspiBliz.
Having this script checking the system on every startup, the user can easily update the SD card with a fresh image and the system will automatically establish the old state.
## What to put into the config file and what not
All values users put into setup or setting dialogs and that is not stored on the HDD (for example in the config files of lnd or bitcoin) is a hot cadidate to put into the raspi config file. Some values make sense to get stored as a duplicate (for performance or easy of access) - but dont get to wild.

51
build.sdcard/raspbianStretchDesktop.sh → build_sdcard.sh

@ -12,7 +12,7 @@
echo ""
echo "*****************************************"
echo "* RASPIBLITZ SD CARD IMAGE SETUP v0.99 *"
echo "* RASPIBLITZ SD CARD IMAGE SETUP v1.00 *"
echo "*****************************************"
echo ""
@ -96,8 +96,6 @@ if [ "${baseImage}" = "dietpi" ]; then
echo "*** PREPARE DietPi ***"
echo "renaming dietpi user to pi"
sudo usermod -l pi dietpi
# add pi to the sudo group
sudo adduser pi sudo
echo "install pip"
sudo apt-get update
sudo apt-get remove -y fail2ban
@ -117,8 +115,6 @@ if [ "${baseImage}" = "dietpi" ]; then
sudo apt install -y openssh-client
sudo apt install -y openssh-sftp-server
fi
# special prepare when Raspbian
@ -316,8 +312,8 @@ echo ""
echo "*** LND ***"
## based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_40_lnd.md#lightning-lnd
lndVersion="0.5.1-beta"
lndSHA256="c8be77708fe95d5076fa6988229100598c14ae6c54e92a56d5f09f3e17732244"
lndVersion="0.5.2-beta"
lndSHA256="9adf9f3d0b8a62942f68d75ffe043f9255319209f751dee4eac82375ec0a86cd"
olaoluwaPGP="BD599672C804AF2770869A048B80CD2BB8BD8132"
# get LND resources
@ -466,8 +462,9 @@ sudo bash -c "echo 'PATH=\$PATH:/sbin' >> /etc/profile"
# profile path for admin
sudo bash -c "echo '' >> /home/admin/.profile"
sudo bash -c "echo 'GOROOT=/usr/local/go' >> /home/admin/.profile"
sudo bash -c "echo 'PATH=\$PATH:\$GOROOT/bin:' >> /home/admin/.profile"
sudo bash -c "echo 'PATH=\$PATH:\$GOROOT/bin' >> /home/admin/.profile"
sudo bash -c "echo 'GOPATH=/usr/local/gocode' >> /home/admin/.profile"
sudo bash -c "echo 'PATH=\$PATH:\$GOPATH/bin' >> /home/admin/.profile"
# bash autostart for admin
sudo bash -c "echo '# shortcut commands' >> /home/admin/.bashrc"
@ -507,29 +504,21 @@ sudo chmod +x /home/admin/_bootstrap.sh
sudo cp ./assets/bootstrap.service /etc/systemd/system/bootstrap.service
sudo systemctl enable bootstrap
# *** BOOTSTRAP ***
# see background README for details
# *** BACKGROUND ***
echo ""
echo "*** RASPI BACKGROUND SERVICE ***"
sudo chmod +x /home/admin/_background.sh
sudo cp ./assets/background.service /etc/systemd/system/background.service
sudo systemctl enable background
# Prepare for TOR service
echo "*** Adding Tor Sources to sources.list ***"
echo "deb http://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list
echo "OK"
# *** TOR Prepare ***
echo "*** Prepare TOR source+keys ***"
sudo /home/admin/config.scripts/internet.tor.sh prepare
echo ""
echo "*** Installing dirmngr ***"
sudo apt install dirmngr
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "If you see fails above .. please run again later on:"
echo "sudo /home/admin/config.scripts/internet.tor.sh prepare"
echo ""
echo "*** Fetching GPG key ***"
sudo gpg --keyserver keys.gnupg.net --recv 886DDD89
sudo gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
sudo gpg --keyserver pgpkeys.mit.edu --recv-key 74A941BA219EC810
sudo gpg -a --export 74A941BA219EC810 | sudo apt-key add -
echo "!!!!!! Please check if the above really worked!"
# *** RASPIBLITZ IMAGE READY ***
echo ""
@ -547,7 +536,7 @@ echo ""
echo "IMPORTANT IF WANT TO MAKE A RELEASE IMAGE FROM THIS BUILD:"
echo "login once after reboot without HDD and run 'XXprepareRelease.sh'"
echo ""
echo "to continue reboot with `sudo shutdown -r now` and login with admin"
echo "to continue reboot with sudo shutdown -r now and login with admin"
# install LCD only on an rPI running Raspbian
if [ "${baseImage}" = "raspbian" ]; then
@ -561,10 +550,12 @@ if [ "${baseImage}" = "raspbian" ]; then
dialog --title "Display" --yesno "Are you using the default display available from Amazon?\nSelect 'No' if you are using the Swiss version from play-zone.ch!" 6 80
defaultDisplay=$?
if [[ $defaultDisplay -eq 0 ]]
then
if [ "${defaultDisplay}" = "0" ]; then
# *** RASPIBLITZ / LCD (at last - because makes a reboot) ***
# based on https://www.elegoo.com/tutorial/Elegoo%203.5%20inch%20Touch%20Screen%20User%20Manual%20V1.00.2017.10.09.zip
echo "--> LCD DEFAULT"
cd /home/admin/
sudo apt-mark hold raspberrypi-bootloader
git clone https://github.com/goodtft/LCD-show.git
@ -572,10 +563,13 @@ if [ "${baseImage}" = "raspbian" ]; then
sudo chown -R admin:admin LCD-show
cd LCD-show/
sudo ./LCD35-show
else
# Download and install the driver
# based on http://www.raspberrypiwiki.com/index.php/3.5_inch_TFT_800x480@60fps
echo "--> LCD ALTERNATIVE"
cd /boot
sudo wget http://www.raspberrypiwiki.com/download/RPI-HD-35-INCH-TFT/dt-blob-For-3B-plus.bin
sudo mv dt-blob-For-3B-plus.bin dt-blob.bin
@ -606,7 +600,8 @@ if [ "${baseImage}" = "raspbian" ]; then
display_rotate=3
dtoverlay=i2c-gpio,i2c_gpio_scl=24,i2c_gpio_sda=23
EOF
fi
EOF
init 6
fi
fi
fi

63
dietpi/README.md

@ -14,25 +14,45 @@ See the hardware specs: [hardware specs](hw_comparison.md).
![](pictures/DroidBlitz.jpg)
## Download the fully prebuilt RaspiBlitz on DietPi SDcard image
for the Odroid HC1 / HC2 / XU3 / XU4 from this [torrent](https://github.com/openoms/raspiblitz/blob/raspiblitz-dev/dietpi/RaspiBlitz1.0_OdroidHC1_DietPi6.21.1.torrent) or from [mega.nz](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 and login with ssh admin@at.your.raspiblitz.ip, 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)
---
## 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
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 SDCard with [Etcher](https://www.balena.io/etcher/) and extend the rootfs partition to the size of your card with a partition manager.
Burn 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.
Insert the SDcard into the Odroid.
Power up and continue with: [Run the DietPi optimized Raspiblitz SDcard build script](#Run-the-DietPi-optimized-Raspiblitz-SDcard-build-script)
Power up and continue with: [Run the DietPi optimized Raspiblitz SDcard build script](#Run-the-RaspiBlitz-build_sdcard.sh-script)
### Build your own DietPi image:
For the Odroid HC1 / HC2 / XU3 / XU4 download this image:
Watch out this 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
and burn it to the SD with [Etcher](https://www.balena.io/etcher/)
Burn it to the SD with [Etcher](https://www.balena.io/etcher/)
Getting started with DietPi: https://dietpi.com/phpbb/viewtopic.php?f=8&t=9#p9
@ -73,41 +93,46 @@ Reboots
password: `dietpi`
>Ok > Cancel > Cancel
Search `fail2ban` > Space to select > Enter
Search `fail2ban` > Space to select > Enter
SSH server > switch from Dropbear to the OpenSSH-server
> Install > Ok
>Opt out of survey > Ok
Reboots again
## Run the DietPi optimized Raspiblitz SDcard build script
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
In the desktop terminal in Linux / MacOS or Putty in Windows:
`ssh root@[IP-OF-DIETPI]`
password: `dietpi`
password: `dietpi`
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/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh [BRANCH] [GITHUB-USERNAME]`
run the build_sdcard.sh 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:
`wget https://raw.githubusercontent.com/openoms/raspiblitz/raspiblitz-dev/build.sdcard/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh raspiblitz-dev openoms`
`wget https://raw.githubusercontent.com/openoms/raspiblitz/raspiblitz-dev/build_sdcard.sh && sudo bash build_sdcard.sh raspiblitz-dev openoms`
See my example output on the Odorid HC1: [HC1_sdcard_build_output](logs/HC1_sdcard_build_output)
`ssh admin@[IP-OF-DROIDBLITZ]`
password: raspiblitz
### The setup continues as described in the RaspiBlitz setup [README.md](/README.md#documentation)
The 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)
@ -123,8 +148,9 @@ To test a new configuration run XXcleanHDD.sh and strictly restart
---
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.
Here find some excerpts from the deafult 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.
@ -156,3 +182,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/

262
dietpi/RaspiBlitz1.0_OdroidHC1_DietPi6.21.1.torrent

File diff suppressed because one or more lines are too long

986
dietpi/logs/HC1_sdcard_build_output

@ -1,986 +0,0 @@
────────────────────────────────────────────────
DietPi | Mon 04/02/19 - 10:02
────────────────────────────────────────────────
v6.20.6 | Odroid XU3/XU4/HC1/HC2 (armv7l)
────────────────────────────────────────────────
eth0 | 192.168.1.175
────────────────────────────────────────────────
DietPi Team : Daniel Knight (founder), MichaIng, K-Plan
Image : DietPi Core Team (pre-image: Meveric)
Web : https://DietPi.com | https://twitter.com/dietpi_
Patreon Legends : PINE64 community
Donate : https://DietPi.com/#donate
DietPi Hosting : Powered by https://MyVirtualServer.com
dietpi-launcher = All the DietPi programs in one place.
dietpi-config = Feature rich configuration tool for your device.
dietpi-software = Select optimized software for installation.
htop = Resource monitor.
cpu = Shows CPU information and stats.
root@DietPi:~# wget https://raw.githubusercontent.com/openoms/raspiblitz/raspiblitz-dev/build.sdcard/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh raspiblitz-dev openoms
--2019-02-04 10:02:34-- https://raw.githubusercontent.com/openoms/raspiblitz/raspiblitz-dev/build.sdcard/raspbianStretchDesktop.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.60.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.60.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21481 (21K) [text/plain]
Saving to: ‘raspbianStretchDesktop.sh’
raspbianStretchDesktop.sh 100%[====================================>] 20.98K --.-KB/s in 0.03s
2019-02-04 10:02:34 (649 KB/s) - ‘raspbianStretchDesktop.sh’ saved [21481/21481]
*****************************************
* RASPIBLITZ SD CARD IMAGE SETUP v0.99 *
*****************************************
*** CHECK INPUT PARAMETERS ***
will use code from branch --> 'raspiblitz-dev'
*** CHECK INPUT PARAMETERS ***
will use code from user --> 'openoms'
*** CHECK BASE IMAGE ***
Check if Linux ARM based ...
OK running on Linux ARM architecture.
Detect Base Image ...
OK running dietpi
*** FIXING LOCALES FOR BUILD ***
Generating locales (this might take a while)...
en_GB.UTF-8... done
en_US.ISO-8859-1... done
en_US.UTF-8... done
Generation complete.
*** UPDATE DEBIAN ***
Hit:1 http://fuzon.co.uk/meveric all InRelease
Hit:2 http://fuzon.co.uk/meveric stretch InRelease
Hit:3 https://oph.mdrjr.net/meveric all InRelease
Ign:4 https://cdn-aws.deb.debian.org/debian stretch InRelease
Get:5 https://cdn-aws.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Hit:6 https://cdn-aws.deb.debian.org/debian-security stretch/updates InRelease
Get:7 https://cdn-aws.deb.debian.org/debian stretch-backports InRelease [91.8 kB]
Hit:8 https://cdn-aws.deb.debian.org/debian stretch Release
Fetched 183 kB in 3s (58.9 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
*** PREPARE DietPi ***
renaming dietpi user to pi
The user `pi' is already a member of `sudo'.
install pip
Hit:1 http://fuzon.co.uk/meveric all InRelease
Hit:2 http://fuzon.co.uk/meveric stretch InRelease
Hit:3 https://oph.mdrjr.net/meveric all InRelease
Ign:4 https://cdn-aws.deb.debian.org/debian stretch InRelease
Hit:5 https://cdn-aws.deb.debian.org/debian stretch-updates InRelease
Hit:6 https://cdn-aws.deb.debian.org/debian-security stretch/updates InRelease
Hit:7 https://cdn-aws.deb.debian.org/debian stretch-backports InRelease
Hit:8 https://cdn-aws.deb.debian.org/debian stretch Release
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
fail2ban
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 1,321 kB disk space will be freed.
(Reading database ... 15499 files and directories currently installed.)
Removing fail2ban (0.9.6-2) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
binutils cpp cpp-6 dpkg-dev g++ g++-6 gcc gcc-6 libasan3 libatomic1 libc-dev-bin libc6-dev libcc1-0
libdpkg-perl libgcc-6-dev libgdbm3 libgomp1 libisl15 libmpc3 libmpfr4 libperl5.24 libstdc++-6-dev
libubsan0 linux-libc-dev make patch perl perl-modules-5.24 xz-utils
Suggested packages:
binutils-doc cpp-doc gcc-6-locales debian-keyring gcc-6-doc libstdc++6-6-dbg gcc-multilib
manpages-dev autoconf automake libtool flex bison gdb gcc-doc libgcc1-dbg libgomp1-dbg libitm1-dbg
libatomic1-dbg libasan3-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg
libquadmath0-dbg glibc-doc libstdc++-6-doc make-doc ed diffutils-doc perl-doc
libterm-readline-gnu-perl | libterm-readline-perl-perl
Recommended packages:
fakeroot libalgorithm-merge-perl manpages manpages-dev libfile-fcntllock-perl netbase rename
The following NEW packages will be installed:
binutils build-essential cpp cpp-6 dpkg-dev g++ g++-6 gcc gcc-6 libasan3 libatomic1 libc-dev-bin
libc6-dev libcc1-0 libdpkg-perl libgcc-6-dev libgdbm3 libgomp1 libisl15 libmpc3 libmpfr4
libperl5.24 libstdc++-6-dev libubsan0 linux-libc-dev make patch perl perl-modules-5.24 xz-utils
0 upgraded, 30 newly installed, 0 to remove and 0 not upgraded.
Need to get 36.8 MB of archives.
After this operation, 138 MB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian-security stretch/updates/main armhf perl-modules-5.24 all 5.24.1-3+deb9u5 [2,722 kB]
Get:2 https://cdn-aws.deb.debian.org/debian stretch/main armhf libgdbm3 armhf 1.8.3-14 [28.5 kB]
Get:3 https://cdn-aws.deb.debian.org/debian-security stretch/updates/main armhf libperl5.24 armhf 5.24.1-3+deb9u5 [2,850 kB]
Get:4 https://cdn-aws.deb.debian.org/debian-security stretch/updates/main armhf perl armhf 5.24.1-3+deb9u5 [219 kB]
Get:5 https://cdn-aws.deb.debian.org/debian stretch/main armhf xz-utils armhf 5.2.2-1.2+b1 [263 kB]
Get:6 https://cdn-aws.deb.debian.org/debian stretch/main armhf binutils armhf 2.28-5 [3,900 kB]
Get:7 https://cdn-aws.deb.debian.org/debian stretch/main armhf libc-dev-bin armhf 2.24-11+deb9u3 [253 kB]
Get:8 https://cdn-aws.deb.debian.org/debian stretch/main armhf linux-libc-dev armhf 4.9.130-2 [1,350 kB]
Get:9 https://cdn-aws.deb.debian.org/debian stretch/main armhf libc6-dev armhf 2.24-11+deb9u3 [1,995 kB]
Get:10 https://cdn-aws.deb.debian.org/debian stretch/main armhf libisl15 armhf 0.18-1 [441 kB]
Get:11 https://cdn-aws.deb.debian.org/debian stretch/main armhf libmpfr4 armhf 3.1.5-1 [536 kB]
Get:12 https://cdn-aws.deb.debian.org/debian stretch/main armhf libmpc3 armhf 1.0.3-1+b2 [32.6 kB]
Get:13 https://cdn-aws.deb.debian.org/debian stretch/main armhf cpp-6 armhf 6.3.0-18+deb9u1 [5,239 kB]
Get:14 https://cdn-aws.deb.debian.org/debian stretch/main armhf cpp armhf 4:6.3.0-4 [18.7 kB]
Get:15 https://cdn-aws.deb.debian.org/debian stretch/main armhf libcc1-0 armhf 6.3.0-18+deb9u1 [25.2 kB]
Get:16 https://cdn-aws.deb.debian.org/debian stretch/main armhf libgomp1 armhf 6.3.0-18+deb9u1 [64.6 kB]
Get:17 https://cdn-aws.deb.debian.org/debian stretch/main armhf libatomic1 armhf 6.3.0-18+deb9u1 [6,010 B]
Get:18 https://cdn-aws.deb.debian.org/debian stretch/main armhf libasan3 armhf 6.3.0-18+deb9u1 [284 kB]
Get:19 https://cdn-aws.deb.debian.org/debian stretch/main armhf libubsan0 armhf 6.3.0-18+deb9u1 [92.9 kB]
Get:20 https://cdn-aws.deb.debian.org/debian stretch/main armhf libgcc-6-dev armhf 6.3.0-18+deb9u1 [531 kB]
Get:21 https://cdn-aws.deb.debian.org/debian stretch/main armhf gcc-6 armhf 6.3.0-18+deb9u1 [5,511 kB]
Get:22 https://cdn-aws.deb.debian.org/debian stretch/main armhf gcc armhf 4:6.3.0-4 [5,212 B]
Get:23 https://cdn-aws.deb.debian.org/debian stretch/main armhf libstdc++-6-dev armhf 6.3.0-18+deb9u1 [1,487 kB]
Get:24 https://cdn-aws.deb.debian.org/debian stretch/main armhf g++-6 armhf 6.3.0-18+deb9u1 [5,665 kB]
Get:25 https://cdn-aws.deb.debian.org/debian stretch/main armhf g++ armhf 4:6.3.0-4 [1,520 B]
Get:26 https://cdn-aws.deb.debian.org/debian stretch/main armhf make armhf 4.1-9.1 [290 kB]
Get:27 https://cdn-aws.deb.debian.org/debian stretch/main armhf libdpkg-perl all 1.18.25 [1,287 kB]
Get:28 https://cdn-aws.deb.debian.org/debian stretch/main armhf patch armhf 2.7.5-1+deb9u1 [106 kB]
Get:29 https://cdn-aws.deb.debian.org/debian stretch/main armhf dpkg-dev all 1.18.25 [1,595 kB]
Get:30 https://cdn-aws.deb.debian.org/debian stretch/main armhf build-essential armhf 12.3 [7,342 B]
Fetched 36.8 MB in 6s (5,292 kB/s)
Selecting previously unselected package perl-modules-5.24.
(Reading database ... 15254 files and directories currently installed.)
Preparing to unpack .../00-perl-modules-5.24_5.24.1-3+deb9u5_all.deb ...
Unpacking perl-modules-5.24 (5.24.1-3+deb9u5) ...
Selecting previously unselected package libgdbm3:armhf.
Preparing to unpack .../01-libgdbm3_1.8.3-14_armhf.deb ...
Unpacking libgdbm3:armhf (1.8.3-14) ...
Selecting previously unselected package libperl5.24:armhf.
Preparing to unpack .../02-libperl5.24_5.24.1-3+deb9u5_armhf.deb ...
Unpacking libperl5.24:armhf (5.24.1-3+deb9u5) ...
Selecting previously unselected package perl.
Preparing to unpack .../03-perl_5.24.1-3+deb9u5_armhf.deb ...
Unpacking perl (5.24.1-3+deb9u5) ...
Selecting previously unselected package xz-utils.
Preparing to unpack .../04-xz-utils_5.2.2-1.2+b1_armhf.deb ...
Unpacking xz-utils (5.2.2-1.2+b1) ...
Selecting previously unselected package binutils.
Preparing to unpack .../05-binutils_2.28-5_armhf.deb ...
Unpacking binutils (2.28-5) ...
Selecting previously unselected package libc-dev-bin.
Preparing to unpack .../06-libc-dev-bin_2.24-11+deb9u3_armhf.deb ...
Unpacking libc-dev-bin (2.24-11+deb9u3) ...
Selecting previously unselected package linux-libc-dev:armhf.
Preparing to unpack .../07-linux-libc-dev_4.9.130-2_armhf.deb ...
Unpacking linux-libc-dev:armhf (4.9.130-2) ...
Selecting previously unselected package libc6-dev:armhf.
Preparing to unpack .../08-libc6-dev_2.24-11+deb9u3_armhf.deb ...
Unpacking libc6-dev:armhf (2.24-11+deb9u3) ...
Selecting previously unselected package libisl15:armhf.
Preparing to unpack .../09-libisl15_0.18-1_armhf.deb ...
Unpacking libisl15:armhf (0.18-1) ...
Selecting previously unselected package libmpfr4:armhf.
Preparing to unpack .../10-libmpfr4_3.1.5-1_armhf.deb ...
Unpacking libmpfr4:armhf (3.1.5-1) ...
Selecting previously unselected package libmpc3:armhf.
Preparing to unpack .../11-libmpc3_1.0.3-1+b2_armhf.deb ...
Unpacking libmpc3:armhf (1.0.3-1+b2) ...
Selecting previously unselected package cpp-6.
Preparing to unpack .../12-cpp-6_6.3.0-18+deb9u1_armhf.deb ...
Unpacking cpp-6 (6.3.0-18+deb9u1) ...
Selecting previously unselected package cpp.
Preparing to unpack .../13-cpp_4%3a6.3.0-4_armhf.deb ...
Unpacking cpp (4:6.3.0-4) ...
Selecting previously unselected package libcc1-0:armhf.
Preparing to unpack .../14-libcc1-0_6.3.0-18+deb9u1_armhf.deb ...
Unpacking libcc1-0:armhf (6.3.0-18+deb9u1) ...
Selecting previously unselected package libgomp1:armhf.
Preparing to unpack .../15-libgomp1_6.3.0-18+deb9u1_armhf.deb ...
Unpacking libgomp1:armhf (6.3.0-18+deb9u1) ...
Selecting previously unselected package libatomic1:armhf.
Preparing to unpack .../16-libatomic1_6.3.0-18+deb9u1_armhf.deb ...
Unpacking libatomic1:armhf (6.3.0-18+deb9u1) ...
Selecting previously unselected package libasan3:armhf.
Preparing to unpack .../17-libasan3_6.3.0-18+deb9u1_armhf.deb ...
Unpacking libasan3:armhf (6.3.0-18+deb9u1) ...
Selecting previously unselected package libubsan0:armhf.
Preparing to unpack .../18-libubsan0_6.3.0-18+deb9u1_armhf.deb ...
Unpacking libubsan0:armhf (6.3.0-18+deb9u1) ...
Selecting previously unselected package libgcc-6-dev:armhf.
Preparing to unpack .../19-libgcc-6-dev_6.3.0-18+deb9u1_armhf.deb ...
Unpacking libgcc-6-dev:armhf (6.3.0-18+deb9u1) ...
Selecting previously unselected package gcc-6.
Preparing to unpack .../20-gcc-6_6.3.0-18+deb9u1_armhf.deb ...
Unpacking gcc-6 (6.3.0-18+deb9u1) ...
Selecting previously unselected package gcc.
Preparing to unpack .../21-gcc_4%3a6.3.0-4_armhf.deb ...
Unpacking gcc (4:6.3.0-4) ...
Selecting previously unselected package libstdc++-6-dev:armhf.
Preparing to unpack .../22-libstdc++-6-dev_6.3.0-18+deb9u1_armhf.deb ...
Unpacking libstdc++-6-dev:armhf (6.3.0-18+deb9u1) ...
Selecting previously unselected package g++-6.
Preparing to unpack .../23-g++-6_6.3.0-18+deb9u1_armhf.deb ...
Unpacking g++-6 (6.3.0-18+deb9u1) ...
Selecting previously unselected package g++.
Preparing to unpack .../24-g++_4%3a6.3.0-4_armhf.deb ...
Unpacking g++ (4:6.3.0-4) ...
Selecting previously unselected package make.
Preparing to unpack .../25-make_4.1-9.1_armhf.deb ...
Unpacking make (4.1-9.1) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../26-libdpkg-perl_1.18.25_all.deb ...
Unpacking libdpkg-perl (1.18.25) ...
Selecting previously unselected package patch.
Preparing to unpack .../27-patch_2.7.5-1+deb9u1_armhf.deb ...
Unpacking patch (2.7.5-1+deb9u1) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../28-dpkg-dev_1.18.25_all.deb ...
Unpacking dpkg-dev (1.18.25) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../29-build-essential_12.3_armhf.deb ...
Unpacking build-essential (12.3) ...
Setting up libgomp1:armhf (6.3.0-18+deb9u1) ...
Setting up libatomic1:armhf (6.3.0-18+deb9u1) ...
Setting up perl-modules-5.24 (5.24.1-3+deb9u5) ...
Setting up libgdbm3:armhf (1.8.3-14) ...
Setting up libperl5.24:armhf (5.24.1-3+deb9u5) ...
Setting up libcc1-0:armhf (6.3.0-18+deb9u1) ...
Setting up make (4.1-9.1) ...
Setting up libasan3:armhf (6.3.0-18+deb9u1) ...
Setting up libubsan0:armhf (6.3.0-18+deb9u1) ...
Setting up linux-libc-dev:armhf (4.9.130-2) ...
Setting up perl (5.24.1-3+deb9u5) ...
update-alternatives: using /usr/bin/prename to provide /usr/bin/rename (rename) in auto mode
Setting up libisl15:armhf (0.18-1) ...
Setting up patch (2.7.5-1+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up xz-utils (5.2.2-1.2+b1) ...
update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode
Setting up libmpfr4:armhf (3.1.5-1) ...
Setting up libmpc3:armhf (1.0.3-1+b2) ...
Setting up binutils (2.28-5) ...
Setting up cpp-6 (6.3.0-18+deb9u1) ...
Setting up libc-dev-bin (2.24-11+deb9u3) ...
Setting up libc6-dev:armhf (2.24-11+deb9u3) ...
Setting up cpp (4:6.3.0-4) ...
Setting up libgcc-6-dev:armhf (6.3.0-18+deb9u1) ...
Setting up libstdc++-6-dev:armhf (6.3.0-18+deb9u1) ...
Setting up libdpkg-perl (1.18.25) ...
Setting up gcc-6 (6.3.0-18+deb9u1) ...
Setting up g++-6 (6.3.0-18+deb9u1) ...
Setting up dpkg-dev (1.18.25) ...
Setting up gcc (4:6.3.0-4) ...
Setting up g++ (4:6.3.0-4) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (12.3) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-minimal python-pip-whl
python2.7 python2.7-minimal
Suggested packages:
python-doc python-tk python2.7-doc binfmt-support
Recommended packages:
python-all-dev python-setuptools python-wheel
The following NEW packages will be installed:
libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-minimal python-pip
python-pip-whl python2.7 python2.7-minimal
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,470 kB of archives.
After this operation, 17.2 MB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian stretch/main armhf libpython2.7-minimal armhf 2.7.13-2+deb9u3 [389 kB]
Get:2 https://cdn-aws.deb.debian.org/debian stretch/main armhf python2.7-minimal armhf 2.7.13-2+deb9u3 [1,176 kB]
Get:3 https://cdn-aws.deb.debian.org/debian stretch/main armhf python-minimal armhf 2.7.13-2 [40.5 kB]
Get:4 https://cdn-aws.deb.debian.org/debian stretch/main armhf libpython2.7-stdlib armhf 2.7.13-2+deb9u3 [1,821 kB]
Get:5 https://cdn-aws.deb.debian.org/debian stretch/main armhf python2.7 armhf 2.7.13-2+deb9u3 [285 kB]
Get:6 https://cdn-aws.deb.debian.org/debian stretch/main armhf libpython-stdlib armhf 2.7.13-2 [20.0 kB]
Get:7 https://cdn-aws.deb.debian.org/debian stretch/main armhf python armhf 2.7.13-2 [154 kB]
Get:8 https://cdn-aws.deb.debian.org/debian stretch/main armhf python-pip-whl all 9.0.1-2 [1,406 kB]
Get:9 https://cdn-aws.deb.debian.org/debian stretch/main armhf python-pip all 9.0.1-2 [179 kB]
Fetched 5,470 kB in 2s (2,280 kB/s)
Selecting previously unselected package libpython2.7-minimal:armhf.
(Reading database ... 20063 files and directories currently installed.)
Preparing to unpack .../0-libpython2.7-minimal_2.7.13-2+deb9u3_armhf.deb ...
Unpacking libpython2.7-minimal:armhf (2.7.13-2+deb9u3) ...
Selecting previously unselected package python2.7-minimal.
Preparing to unpack .../1-python2.7-minimal_2.7.13-2+deb9u3_armhf.deb ...
Unpacking python2.7-minimal (2.7.13-2+deb9u3) ...
Selecting previously unselected package python-minimal.
Preparing to unpack .../2-python-minimal_2.7.13-2_armhf.deb ...
Unpacking python-minimal (2.7.13-2) ...
Selecting previously unselected package libpython2.7-stdlib:armhf.
Preparing to unpack .../3-libpython2.7-stdlib_2.7.13-2+deb9u3_armhf.deb ...
Unpacking libpython2.7-stdlib:armhf (2.7.13-2+deb9u3) ...
Selecting previously unselected package python2.7.
Preparing to unpack .../4-python2.7_2.7.13-2+deb9u3_armhf.deb ...
Unpacking python2.7 (2.7.13-2+deb9u3) ...
Selecting previously unselected package libpython-stdlib:armhf.
Preparing to unpack .../5-libpython-stdlib_2.7.13-2_armhf.deb ...
Unpacking libpython-stdlib:armhf (2.7.13-2) ...
Setting up libpython2.7-minimal:armhf (2.7.13-2+deb9u3) ...
Setting up python2.7-minimal (2.7.13-2+deb9u3) ...
Linking and byte-compiling packages for runtime python2.7...
Setting up python-minimal (2.7.13-2) ...
Selecting previously unselected package python.
(Reading database ... 20811 files and directories currently installed.)
Preparing to unpack .../python_2.7.13-2_armhf.deb ...
Unpacking python (2.7.13-2) ...
Selecting previously unselected package python-pip-whl.
Preparing to unpack .../python-pip-whl_9.0.1-2_all.deb ...
Unpacking python-pip-whl (9.0.1-2) ...
Selecting previously unselected package python-pip.
Preparing to unpack .../python-pip_9.0.1-2_all.deb ...
Unpacking python-pip (9.0.1-2) ...
Setting up python-pip-whl (9.0.1-2) ...
Processing triggers for mime-support (3.60) ...
Setting up libpython2.7-stdlib:armhf (2.7.13-2+deb9u3) ...
Setting up python2.7 (2.7.13-2+deb9u3) ...
Setting up libpython-stdlib:armhf (2.7.13-2) ...
Setting up python (2.7.13-2) ...
Setting up python-pip (9.0.1-2) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
openssh-client openssh-server
The following NEW packages will be installed:
rsync
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 380 kB of archives.
After this operation, 573 kB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian stretch/main armhf rsync armhf 3.1.2-1+deb9u1 [380 kB]
Fetched 380 kB in 0s (495 kB/s)
Selecting previously unselected package rsync.
(Reading database ... 21001 files and directories currently installed.)
Preparing to unpack .../rsync_3.1.2-1+deb9u1_armhf.deb ...
Unpacking rsync (3.1.2-1+deb9u1) ...
Setting up rsync (3.1.2-1+deb9u1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/rsync.service → /lib/systemd/system/rsync.service.
Processing triggers for systemd (232-25+deb9u8) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
net-tools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 234 kB of archives.
After this operation, 797 kB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian stretch/main armhf net-tools armhf 1.60+git20161116.90da8a0-1 [234 kB]
Fetched 234 kB in 1s (205 kB/s)
Selecting previously unselected package net-tools.
(Reading database ... 21032 files and directories currently installed.)
Preparing to unpack .../net-tools_1.60+git20161116.90da8a0-1_armhf.deb ...
Unpacking net-tools (1.60+git20161116.90da8a0-1) ...
Setting up net-tools (1.60+git20161116.90da8a0-1) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
xxd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 131 kB of archives.
After this operation, 166 kB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian stretch/main armhf xxd armhf 2:8.0.0197-4+deb9u1 [131 kB]
Fetched 131 kB in 0s (167 kB/s)
Selecting previously unselected package xxd.
(Reading database ... 21088 files and directories currently installed.)
Preparing to unpack .../xxd_2%3a8.0.0197-4+deb9u1_armhf.deb ...
Unpacking xxd (2:8.0.0197-4+deb9u1) ...
Setting up xxd (2:8.0.0197-4+deb9u1) ...
Collecting setuptools
Downloading https://files.pythonhosted.org/packages/82/9c/e812a9838feaf76cd9a960ca4ced3be7f2db31e473677a621d006e128db2/setuptools-40.7.3-py2.py3-none-any.whl (574kB)
100% |████████████████████████████████| 583kB 695kB/s
Installing collected packages: setuptools
Successfully installed setuptools-40.7.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
netcat-traditional
The following NEW packages will be installed:
netcat netcat-traditional
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 74.7 kB of archives.
After this operation, 164 kB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian stretch/main armhf netcat-traditional armhf 1.10-41+b1 [65.7 kB]
Get:2 https://cdn-aws.deb.debian.org/debian stretch/main armhf netcat all 1.10-41 [8,962 B]
Fetched 74.7 kB in 1s (48.7 kB/s)
Selecting previously unselected package netcat-traditional.
(Reading database ... 21099 files and directories currently installed.)
Preparing to unpack .../netcat-traditional_1.10-41+b1_armhf.deb ...
Unpacking netcat-traditional (1.10-41+b1) ...
Selecting previously unselected package netcat.
Preparing to unpack .../netcat_1.10-41_all.deb ...
Unpacking netcat (1.10-41) ...
Setting up netcat-traditional (1.10-41+b1) ...
update-alternatives: using /bin/nc.traditional to provide /bin/nc (nc) in auto mode
Setting up netcat (1.10-41) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libbsd0 libedit2
Suggested packages:
keychain libpam-ssh monkeysphere ssh-askpass
Recommended packages:
xauth
The following NEW packages will be installed:
libbsd0 libedit2 openssh-client
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 900 kB of archives.
After this operation, 3,993 kB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian stretch/main armhf libbsd0 armhf 0.8.3-1 [89.6 kB]
Get:2 https://cdn-aws.deb.debian.org/debian stretch/main armhf libedit2 armhf 3.1-20160903-3 [69.9 kB]
Get:3 https://cdn-aws.deb.debian.org/debian stretch/main armhf openssh-client armhf 1:7.4p1-10+deb9u4 [740 kB]
Fetched 900 kB in 1s (716 kB/s)
Selecting previously unselected package libbsd0:armhf.
(Reading database ... 21141 files and directories currently installed.)
Preparing to unpack .../libbsd0_0.8.3-1_armhf.deb ...
Unpacking libbsd0:armhf (0.8.3-1) ...
Selecting previously unselected package libedit2:armhf.
Preparing to unpack .../libedit2_3.1-20160903-3_armhf.deb ...
Unpacking libedit2:armhf (3.1-20160903-3) ...
Selecting previously unselected package openssh-client.
Preparing to unpack .../openssh-client_1%3a7.4p1-10+deb9u4_armhf.deb ...
Unpacking openssh-client (1:7.4p1-10+deb9u4) ...
Setting up libbsd0:armhf (0.8.3-1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up libedit2:armhf (3.1-20160903-3) ...
Setting up openssh-client (1:7.4p1-10+deb9u4) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
openssh-sftp-server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 35.2 kB of archives.
After this operation, 74.8 kB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian stretch/main armhf openssh-sftp-server armhf 1:7.4p1-10+deb9u4 [35.2 kB]
Fetched 35.2 kB in 1s (35.2 kB/s)
Selecting previously unselected package openssh-sftp-server.
(Reading database ... 21211 files and directories currently installed.)
Preparing to unpack .../openssh-sftp-server_1%3a7.4p1-10+deb9u4_armhf.deb ...
Unpacking openssh-sftp-server (1:7.4p1-10+deb9u4) ...
Setting up openssh-sftp-server (1:7.4p1-10+deb9u4) ...
*** CONFIG ***
sudo: raspi-config: command not found
bash: /etc/systemd/system/getty@tty1.service.d/autologin.conf: No such file or directory
bash: /etc/systemd/system/getty@tty1.service.d/autologin.conf: No such file or directory
bash: /etc/systemd/system/getty@tty1.service.d/autologin.conf: No such file or directory
*** SOFTWARE UPDATE ***
Reading package lists... Done
Building dependency tree
Reading state information... Done
bash-completion is already the newest version (1:2.1-4.3).
curl is already the newest version (7.52.1-5+deb9u8).
htop is already the newest version (2.0.2-1).
The following additional packages will be installed:
dc git-man liberror-perl libjq1 libonig4
Suggested packages:
gettext-base git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb
git-arch git-cvs git-mediawiki git-svn
Recommended packages:
less
The following NEW packages will be installed:
dc dphys-swapfile git git-man jq liberror-perl libjq1 libonig4
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,514 kB of archives.
After this operation, 23.4 MB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian stretch/main armhf liberror-perl all 0.17024-1 [26.9 kB]
Get:2 https://cdn-aws.deb.debian.org/debian stretch/main armhf git-man all 1:2.11.0-3+deb9u4 [1,433 kB]
Get:3 https://cdn-aws.deb.debian.org/debian stretch/main armhf git armhf 1:2.11.0-3+deb9u4 [3,661 kB]
Get:4 https://cdn-aws.deb.debian.org/debian stretch/main armhf dc armhf 1.06.95-9+b3 [64.8 kB]
Get:5 https://cdn-aws.deb.debian.org/debian stretch/main armhf dphys-swapfile all 20100506-3 [19.7 kB]
Get:6 https://cdn-aws.deb.debian.org/debian stretch/main armhf libonig4 armhf 6.1.3-2 [128 kB]
Get:7 https://cdn-aws.deb.debian.org/debian stretch/main armhf libjq1 armhf 1.5+dfsg-1.3 [122 kB]
Get:8 https://cdn-aws.deb.debian.org/debian stretch/main armhf jq armhf 1.5+dfsg-1.3 [59.2 kB]
Fetched 5,514 kB in 2s (2,743 kB/s)
Selecting previously unselected package liberror-perl.
(Reading database ... 21215 files and directories currently installed.)
Preparing to unpack .../0-liberror-perl_0.17024-1_all.deb ...
Unpacking liberror-perl (0.17024-1) ...
Selecting previously unselected package git-man.
Preparing to unpack .../1-git-man_1%3a2.11.0-3+deb9u4_all.deb ...
Unpacking git-man (1:2.11.0-3+deb9u4) ...
Selecting previously unselected package git.
Preparing to unpack .../2-git_1%3a2.11.0-3+deb9u4_armhf.deb ...
Unpacking git (1:2.11.0-3+deb9u4) ...
Selecting previously unselected package dc.
Preparing to unpack .../3-dc_1.06.95-9+b3_armhf.deb ...
Unpacking dc (1.06.95-9+b3) ...
Selecting previously unselected package dphys-swapfile.
Preparing to unpack .../4-dphys-swapfile_20100506-3_all.deb ...
Unpacking dphys-swapfile (20100506-3) ...
Selecting previously unselected package libonig4:armhf.
Preparing to unpack .../5-libonig4_6.1.3-2_armhf.deb ...
Unpacking libonig4:armhf (6.1.3-2) ...
Selecting previously unselected package libjq1:armhf.
Preparing to unpack .../6-libjq1_1.5+dfsg-1.3_armhf.deb ...
Unpacking libjq1:armhf (1.5+dfsg-1.3) ...
Selecting previously unselected package jq.
Preparing to unpack .../7-jq_1.5+dfsg-1.3_armhf.deb ...
Unpacking jq (1.5+dfsg-1.3) ...
Setting up git-man (1:2.11.0-3+deb9u4) ...
Setting up liberror-perl (0.17024-1) ...
Setting up libonig4:armhf (6.1.3-2) ...
Setting up libjq1:armhf (1.5+dfsg-1.3) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up dc (1.06.95-9+b3) ...
Processing triggers for systemd (232-25+deb9u8) ...
Setting up git (1:2.11.0-3+deb9u4) ...
Setting up jq (1.5+dfsg-1.3) ...
Setting up dphys-swapfile (20100506-3) ...
Processing triggers for systemd (232-25+deb9u8) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
vnstati
The following NEW packages will be installed:
vnstat
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 78.6 kB of archives.
After this operation, 206 kB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian stretch/main armhf vnstat armhf 1.15-2 [78.6 kB]
Fetched 78.6 kB in 1s (56.9 kB/s)
Selecting previously unselected package vnstat.
(Reading database ... 22140 files and directories currently installed.)
Preparing to unpack .../vnstat_1.15-2_armhf.deb ...
Unpacking vnstat (1.15-2) ...
Setting up vnstat (1.15-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/vnstat.service → /lib/systemd/system/vnstat.service.
Processing triggers for systemd (232-25+deb9u8) ...
*** ADDING MAIN USER admin ***
Adding user `admin' ...
Adding new group `admin' (1001) ...
Adding new user `admin' (1001) with group `admin' ...
Creating home directory `/home/admin' ...
Copying files from `/etc/skel' ...
Adding user `admin' to group `sudo' ...
Adding user admin to group sudo
Done.
%sudo ALL=(ALL) NOPASSWD:ALL
*** ADDING SERVICE USER bitcoin
Adding user `bitcoin' ...
Adding new group `bitcoin' (1002) ...
Adding new user `bitcoin' (1002) with group `bitcoin' ...
Creating home directory `/home/bitcoin' ...
Copying files from `/etc/skel' ...
*** SWAP FILE ***
*** INCREASE OPEN FILE LIMIT ***
*** BITCOIN ***
--2019-02-04 10:05:05-- https://bitcoin.org/bin/bitcoin-core-0.17.0.1/bitcoin-0.17.0.1-arm-linux-gnueabihf.tar.gz
Resolving bitcoin.org (bitcoin.org)... 138.68.248.245
Connecting to bitcoin.org (bitcoin.org)|138.68.248.245|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24306145 (23M) [application/octet-stream]
Saving to: ‘bitcoin-0.17.0.1-arm-linux-gnueabihf.tar.gz’
bitcoin-0.17.0.1-arm-linu 100%[====================================>] 23.18M 202KB/s in 1m 59s
2019-02-04 10:07:04 (200 KB/s) - ‘bitcoin-0.17.0.1-arm-linux-gnueabihf.tar.gz’ saved [24306145/24306145]
--2019-02-04 10:07:05-- https://bitcoin.org/laanwj-releases.asc
Resolving bitcoin.org (bitcoin.org)... 138.68.248.245
Connecting to bitcoin.org (bitcoin.org)|138.68.248.245|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 17940 (18K) [application/octet-stream]
Saving to: ‘laanwj-releases.asc’
laanwj-releases.asc 100%[====================================>] 17.52K --.-KB/s in 0.001s
2019-02-04 10:07:06 (19.1 MB/s) - ‘laanwj-releases.asc’ saved [17940/17940]
key 90C8019E36C2E964:
25 signatures not checked due to missing keys
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 90C8019E36C2E964: public key "Wladimir J. van der Laan (Bitcoin Core binary release signing key) <laanwj@gmail.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
gpg: no ultimately trusted keys found
--2019-02-04 10:07:07-- https://bitcoin.org/bin/bitcoin-core-0.17.0.1/SHA256SUMS.asc
Resolving bitcoin.org (bitcoin.org)... 138.68.248.245
Connecting to bitcoin.org (bitcoin.org)|138.68.248.245|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1979 (1.9K) [application/octet-stream]
Saving to: ‘SHA256SUMS.asc’
SHA256SUMS.asc 100%[====================================>] 1.93K --.-KB/s in 0.006s
2019-02-04 10:07:08 (303 KB/s) - ‘SHA256SUMS.asc’ saved [1979/1979]
goodSignature(1)
correctKey(1)
bitcoin-0.17.0/
bitcoin-0.17.0/bin/
bitcoin-0.17.0/bin/bitcoin-cli
bitcoin-0.17.0/bin/bitcoind
bitcoin-0.17.0/bin/bitcoin-qt
bitcoin-0.17.0/bin/bitcoin-tx
bitcoin-0.17.0/bin/test_bitcoin
bitcoin-0.17.0/include/
bitcoin-0.17.0/include/bitcoinconsensus.h
bitcoin-0.17.0/lib/
bitcoin-0.17.0/lib/libbitcoinconsensus.so
bitcoin-0.17.0/lib/libbitcoinconsensus.so.0
bitcoin-0.17.0/lib/libbitcoinconsensus.so.0.0.0
bitcoin-0.17.0/share/
bitcoin-0.17.0/share/man/
bitcoin-0.17.0/share/man/man1/
bitcoin-0.17.0/share/man/man1/bitcoin-cli.1
bitcoin-0.17.0/share/man/man1/bitcoind.1
bitcoin-0.17.0/share/man/man1/bitcoin-qt.1
bitcoin-0.17.0/share/man/man1/bitcoin-tx.1
*** LITECOIN ***
--2019-02-04 10:07:13-- https://download.litecoin.org/litecoin-0.16.3/linux/litecoin-0.16.3-arm-linux-gnueabihf.tar.gz
Resolving download.litecoin.org (download.litecoin.org)... 104.27.4.55, 104.27.5.55
Connecting to download.litecoin.org (download.litecoin.org)|104.27.4.55|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9568024 (9.1M) [application/octet-stream]
Saving to: ‘litecoin-0.16.3-arm-linux-gnueabihf.tar.gz’
litecoin-0.16.3-arm-linux 100%[====================================>] 9.12M 5.23MB/s in 1.7s
2019-02-04 10:07:15 (5.23 MB/s) - ‘litecoin-0.16.3-arm-linux-gnueabihf.tar.gz’ saved [9568024/9568024]
litecoin-0.16.3/
litecoin-0.16.3/bin/
litecoin-0.16.3/bin/litecoin-cli
litecoin-0.16.3/bin/litecoind
litecoin-0.16.3/bin/litecoin-tx
litecoin-0.16.3/bin/test_litecoin
litecoin-0.16.3/share/
litecoin-0.16.3/share/man/
litecoin-0.16.3/share/man/man1/
litecoin-0.16.3/share/man/man1/litecoin-cli.1
litecoin-0.16.3/share/man/man1/litecoind.1
litecoin-0.16.3/share/man/man1/litecoin-tx.1
*** LND ***
--2019-02-04 10:07:16-- https://github.com/lightningnetwork/lnd/releases/download/v0.5.1-beta/lnd-linux-armv7-v0.5.1-beta.tar.gz
Resolving github.com (github.com)... 140.82.118.3, 140.82.118.4
Connecting to github.com (github.com)|140.82.118.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/49765480/fd08b500-f311-11e8-8398-419cca1df903?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190204%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190204T100716Z&X-Amz-Expires=300&X-Amz-Signature=55bf712cd42a2425f68d2a08b5a05c37303ec6334d4cbdd0941b53304aa1fc8d&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dlnd-linux-armv7-v0.5.1-beta.tar.gz&response-content-type=application%2Foctet-stream [following]
--2019-02-04 10:07:16-- https://github-production-release-asset-2e65be.s3.amazonaws.com/49765480/fd08b500-f311-11e8-8398-419cca1df903?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190204%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190204T100716Z&X-Amz-Expires=300&X-Amz-Signature=55bf712cd42a2425f68d2a08b5a05c37303ec6334d4cbdd0941b53304aa1fc8d&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dlnd-linux-armv7-v0.5.1-beta.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.108.139
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.108.139|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19198203 (18M) [application/octet-stream]
Saving to: ‘lnd-linux-armv7-v0.5.1-beta.tar.gz’
lnd-linux-armv7-v0.5.1-be 100%[====================================>] 18.31M 5.28MB/s in 4.9s
2019-02-04 10:07:22 (3.73 MB/s) - ‘lnd-linux-armv7-v0.5.1-beta.tar.gz’ saved [19198203/19198203]
--2019-02-04 10:07:22-- https://github.com/lightningnetwork/lnd/releases/download/v0.5.1-beta/manifest-v0.5.1-beta.txt
Resolving github.com (github.com)... 140.82.118.4, 140.82.118.3
Connecting to github.com (github.com)|140.82.118.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/49765480/fe39e200-f311-11e8-9178-5d26551a454e?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190204%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190204T100725Z&X-Amz-Expires=300&X-Amz-Signature=838d29594d525c1ab751e105b36d4e7838cfe37b2ee5c10e9ddd8582691beb58&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dmanifest-v0.5.1-beta.txt&response-content-type=application%2Foctet-stream [following]
--2019-02-04 10:07:25-- https://github-production-release-asset-2e65be.s3.amazonaws.com/49765480/fe39e200-f311-11e8-9178-5d26551a454e?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190204%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190204T100725Z&X-Amz-Expires=300&X-Amz-Signature=838d29594d525c1ab751e105b36d4e7838cfe37b2ee5c10e9ddd8582691beb58&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dmanifest-v0.5.1-beta.txt&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.238.51
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.238.51|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2026 (2.0K) [application/octet-stream]
Saving to: ‘manifest-v0.5.1-beta.txt’
manifest-v0.5.1-beta.txt 100%[====================================>] 1.98K --.-KB/s in 0.002s
2019-02-04 10:07:26 (1007 KB/s) - ‘manifest-v0.5.1-beta.txt’ saved [2026/2026]
--2019-02-04 10:07:26-- https://github.com/lightningnetwork/lnd/releases/download/v0.5.1-beta/manifest-v0.5.1-beta.txt.sig
Resolving github.com (github.com)... 140.82.118.3, 140.82.118.4
Connecting to github.com (github.com)|140.82.118.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/49765480/fe39e200-f311-11e8-8fb5-c3aa7d97cb88?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190204%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190204T100726Z&X-Amz-Expires=300&X-Amz-Signature=ce7ec6f0a9944f66f01b5cac9babfc21c8ffb52fb85b90a78b30a76115661da5&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dmanifest-v0.5.1-beta.txt.sig&response-content-type=application%2Foctet-stream [following]
--2019-02-04 10:07:26-- https://github-production-release-asset-2e65be.s3.amazonaws.com/49765480/fe39e200-f311-11e8-8fb5-c3aa7d97cb88?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190204%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190204T100726Z&X-Amz-Expires=300&X-Amz-Signature=ce7ec6f0a9944f66f01b5cac9babfc21c8ffb52fb85b90a78b30a76115661da5&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dmanifest-v0.5.1-beta.txt.sig&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.238.51
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.238.51|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 566 [application/octet-stream]
Saving to: ‘manifest-v0.5.1-beta.txt.sig’
manifest-v0.5.1-beta.txt. 100%[====================================>] 566 --.-KB/s in 0.001s
2019-02-04 10:07:27 (935 KB/s) - ‘manifest-v0.5.1-beta.txt.sig’ saved [566/566]
--2019-02-04 10:07:27-- https://keybase.io/roasbeef/pgp_keys.asc
Resolving keybase.io (keybase.io)... 52.55.1.130, 52.6.136.121
Connecting to keybase.io (keybase.io)|52.55.1.130|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6909 (6.7K) [text/plain]
Saving to: ‘pgp_keys.asc’
pgp_keys.asc 100%[====================================>] 6.75K --.-KB/s in 0s
2019-02-04 10:07:28 (59.0 MB/s) - ‘pgp_keys.asc’ saved [6909/6909]
gpg: key 8B80CD2BB8BD8132: public key "Olaoluwa Osuntokun <laolu32@gmail.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
goodSignature(1)
correctKey(1)
*** Installing Go ***
--2019-02-04 10:07:35-- https://storage.googleapis.com/golang/go1.11.linux-armv6l.tar.gz
Resolving storage.googleapis.com (storage.googleapis.com)... 216.58.206.80, 2a00:1450:4009:809::2010
Connecting to storage.googleapis.com (storage.googleapis.com)|216.58.206.80|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 101718267 (97M) [application/octet-stream]
Saving to: ‘go1.11.linux-armv6l.tar.gz’
go1.11.linux-armv6l.tar.g 100%[====================================>] 97.01M 8.63MB/s in 11s
2019-02-04 10:07:47 (8.86 MB/s) - ‘go1.11.linux-armv6l.tar.gz’ saved [101718267/101718267]
*** RASPIBLITZ EXTRAS ***
Reading package lists... Done
Building dependency tree
Reading state information... Done
bc is already the newest version (1.06.95-9+b3).
The following NEW packages will be installed:
dialog
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 240 kB of archives.
After this operation, 883 kB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian stretch/main armhf dialog armhf 1.3-20160828-2 [240 kB]
Fetched 240 kB in 0s (248 kB/s)
Selecting previously unselected package dialog.
(Reading database ... 22155 files and directories currently installed.)
Preparing to unpack .../dialog_1.3-20160828-2_armhf.deb ...
Unpacking dialog (1.3-20160828-2) ...
Setting up dialog (1.3-20160828-2) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
fuse libfuse2
Recommended packages:
exfat-utils
The following NEW packages will be installed:
exfat-fuse fuse libfuse2
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 214 kB of archives.
After this operation, 426 kB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian stretch/main armhf libfuse2 armhf 2.9.7-1+deb9u2 [116 kB]
Get:2 https://cdn-aws.deb.debian.org/debian stretch/main armhf fuse armhf 2.9.7-1+deb9u2 [70.3 kB]
Get:3 https://cdn-aws.deb.debian.org/debian stretch/main armhf exfat-fuse armhf 1.2.5-2 [27.6 kB]
Fetched 214 kB in 1s (148 kB/s)
Selecting previously unselected package libfuse2:armhf.
(Reading database ... 22313 files and directories currently installed.)
Preparing to unpack .../libfuse2_2.9.7-1+deb9u2_armhf.deb ...
Unpacking libfuse2:armhf (2.9.7-1+deb9u2) ...
Selecting previously unselected package fuse.
Preparing to unpack .../fuse_2.9.7-1+deb9u2_armhf.deb ...
Unpacking fuse (2.9.7-1+deb9u2) ...
Selecting previously unselected package exfat-fuse.
Preparing to unpack .../exfat-fuse_1.2.5-2_armhf.deb ...
Unpacking exfat-fuse (1.2.5-2) ...
Setting up libfuse2:armhf (2.9.7-1+deb9u2) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up fuse (2.9.7-1+deb9u2) ...
update-initramfs: deferring update (trigger activated)
Setting up exfat-fuse (1.2.5-2) ...
Processing triggers for initramfs-tools (0.130) ...
ln: failed to create hard link '/boot/initrd.img-4.14.66+.dpkg-bak' => '/boot/initrd.img-4.14.66+': Operation not permitted
update-initramfs: Generating /boot/initrd.img-4.14.66+
Image Name: uInitrd
Created: Mon Feb 4 10:08:42 2019
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 5715880 Bytes = 5581.91 kB = 5.45 MB
Load Address: 00000000
Entry Point: 00000000
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libevent-2.0-5 libminiupnpc10 libnatpmp1 transmission-common
Suggested packages:
minissdpd natpmp-utils transmission-daemon transmission-gtk
Recommended packages:
minissdpd
The following NEW packages will be installed:
libevent-2.0-5 libminiupnpc10 libnatpmp1 transmission-cli transmission-common
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 776 kB of archives.
After this operation, 2,814 kB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian stretch/main armhf libevent-2.0-5 armhf 2.0.21-stable-3 [134 kB]
Get:2 https://cdn-aws.deb.debian.org/debian stretch/main armhf libminiupnpc10 armhf 1.9.20140610-4 [25.7 kB]
Get:3 https://cdn-aws.deb.debian.org/debian stretch/main armhf libnatpmp1 armhf 20110808-4+b1 [8,338 B]
Get:4 https://cdn-aws.deb.debian.org/debian stretch/main armhf transmission-common all 2.92-2+deb9u1 [288 kB]
Get:5 https://cdn-aws.deb.debian.org/debian stretch/main armhf transmission-cli armhf 2.92-2+deb9u1 [320 kB]
Fetched 776 kB in 0s (823 kB/s)
Selecting previously unselected package libevent-2.0-5:armhf.
(Reading database ... 22348 files and directories currently installed.)
Preparing to unpack .../libevent-2.0-5_2.0.21-stable-3_armhf.deb ...
Unpacking libevent-2.0-5:armhf (2.0.21-stable-3) ...
Selecting previously unselected package libminiupnpc10:armhf.
Preparing to unpack .../libminiupnpc10_1.9.20140610-4_armhf.deb ...
Unpacking libminiupnpc10:armhf (1.9.20140610-4) ...
Selecting previously unselected package libnatpmp1:armhf.
Preparing to unpack .../libnatpmp1_20110808-4+b1_armhf.deb ...
Unpacking libnatpmp1:armhf (20110808-4+b1) ...
Selecting previously unselected package transmission-common.
Preparing to unpack .../transmission-common_2.92-2+deb9u1_all.deb ...
Unpacking transmission-common (2.92-2+deb9u1) ...
Selecting previously unselected package transmission-cli.
Preparing to unpack .../transmission-cli_2.92-2+deb9u1_armhf.deb ...
Unpacking transmission-cli (2.92-2+deb9u1) ...
Setting up libminiupnpc10:armhf (1.9.20140610-4) ...
Setting up libnatpmp1:armhf (20110808-4+b1) ...
Setting up transmission-common (2.92-2+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up libevent-2.0-5:armhf (2.0.21-stable-3) ...
Setting up transmission-cli (2.92-2+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libtorrent19 libxmlrpc-core-c3
Suggested packages:
screen | dtach
The following NEW packages will be installed:
libtorrent19 libxmlrpc-core-c3 rtorrent
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 891 kB of archives.
After this operation, 2,281 kB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian stretch/main armhf libxmlrpc-core-c3 armhf 1.33.14-4 [128 kB]
Get:2 https://cdn-aws.deb.debian.org/debian stretch/main armhf libtorrent19 armhf 0.13.6-1.1 [345 kB]
Get:3 https://cdn-aws.deb.debian.org/debian stretch/main armhf rtorrent armhf 0.9.6-2+b1 [418 kB]
Fetched 891 kB in 1s (630 kB/s)
Selecting previously unselected package libxmlrpc-core-c3.
(Reading database ... 22489 files and directories currently installed.)
Preparing to unpack .../libxmlrpc-core-c3_1.33.14-4_armhf.deb ...
Unpacking libxmlrpc-core-c3 (1.33.14-4) ...
Selecting previously unselected package libtorrent19:armhf.
Preparing to unpack .../libtorrent19_0.13.6-1.1_armhf.deb ...
Unpacking libtorrent19:armhf (0.13.6-1.1) ...
Selecting previously unselected package rtorrent.
Preparing to unpack .../rtorrent_0.9.6-2+b1_armhf.deb ...
Unpacking rtorrent (0.9.6-2+b1) ...
Setting up libtorrent19:armhf (0.13.6-1.1) ...
Setting up libxmlrpc-core-c3 (1.33.14-4) ...
Setting up rtorrent (0.9.6-2+b1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
byobu | screenie | iselect ncurses-term
The following NEW packages will be installed:
screen
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 568 kB of archives.
After this operation, 860 kB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian stretch/main armhf screen armhf 4.5.0-6 [568 kB]
Fetched 568 kB in 0s (677 kB/s)
Selecting previously unselected package screen.
(Reading database ... 22526 files and directories currently installed.)
Preparing to unpack .../screen_4.5.0-6_armhf.deb ...
Unpacking screen (4.5.0-6) ...
Processing triggers for systemd (232-25+deb9u8) ...
Setting up screen (4.5.0-6) ...
Processing triggers for systemd (232-25+deb9u8) ...
Cloning into 'raspiblitz'...
remote: Enumerating objects: 61, done.
remote: Counting objects: 100% (61/61), done.
remote: Compressing objects: 100% (33/33), done.
remote: Total 5134 (delta 32), reused 51 (delta 27), pack-reused 5073
Receiving objects: 100% (5134/5134), 23.70 MiB | 5.49 MiB/s, done.
Resolving deltas: 100% (3603/3603), done.
cp: -r not specified; omitting directory '/home/admin/raspiblitz/home.admin/config.scripts'
bash: /home/pi/.bashrc: No such file or directory
bash: /home/pi/.bashrc: No such file or directory
bash: /home/pi/.bashrc: No such file or directory
bash: /home/pi/.bashrc: No such file or directory
*** HARDENING ***
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
mailx system-log-daemon monit
Recommended packages:
iptables whois python3-pyinotify
The following NEW packages will be installed:
fail2ban
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/288 kB of archives.
After this operation, 1,321 kB of additional disk space will be used.
Selecting previously unselected package fail2ban.
(Reading database ... 22586 files and directories currently installed.)
Preparing to unpack .../fail2ban_0.9.6-2_all.deb ...
Unpacking fail2ban (0.9.6-2) ...
Setting up fail2ban (0.9.6-2) ...
Processing triggers for systemd (232-25+deb9u8) ...
*** RASPI BOOSTRAP SERVICE ***
Created symlink /etc/systemd/system/multi-user.target.wants/bootstrap.service → /etc/systemd/system/bootstrap.service.
*** RASPI BACKGROUND SERVICE ***
Created symlink /etc/systemd/system/multi-user.target.wants/background.service → /etc/systemd/system/background.service.
*** Adding Tor Sources to sources.list ***
deb http://deb.torproject.org/torproject.org stretch main
deb-src http://deb.torproject.org/torproject.org stretch main
OK
*** Installing dirmngr ***
Reading package lists... Done
Building dependency tree
Reading state information... Done
dirmngr is already the newest version (2.1.18-8~deb9u3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
*** Fetching GPG key ***
gpg: packet(13) too large
gpg: read_block: read error: Invalid packet
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gpg: WARNING: nothing exported
gpg: no valid OpenPGP data found.
gpg: keyserver receive failed: No data
gpg: WARNING: nothing exported
gpg: no valid OpenPGP data found.
!!!!!! Please check if the above really worked!
**********************************************
ALMOST READY
**********************************************
Your SD Card Image for RaspiBlitz is almost ready.
Last step is to install LCD drivers. This will reboot your Pi when done.
Maybe take the chance and look thru the output above if you can spot any errror.
After final reboot - your SD Card Image is ready.
IMPORTANT IF WANT TO MAKE A RELEASE IMAGE FROM THIS BUILD:
login once after reboot without HDD and run 'XXprepareRelease.sh'
Press ENTER to install LCD and reboot ...
sudo: raspi-config: command not found
E: Unable to locate package raspberrypi-bootloader
E: No packages found
Cloning into 'LCD-show'...
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 861 (delta 1), reused 0 (delta 0), pack-reused 853
Receiving objects: 100% (861/861), 460.67 KiB | 0 bytes/s, done.
Resolving deltas: 100% (548/548), done.
cp: cannot create regular file '/boot/overlays/': Not a directory
cp: cannot create regular file '/boot/overlays/tft35a.dtbo': No such file or directory
cp: cannot create regular file '/usr/share/X11/xorg.conf.d/': Not a directory
this is not raspberrypi kernel, no need to update touch configure, reboot
Connection to 192.168.1.175 closed by remote host.
Connection to 192.168.1.175 closed.

BIN
dietpi/pictures/5_options_to_copy.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

2
home.admin/00infoBlitz.sh

@ -192,7 +192,7 @@ else
if [ ${#dynDomain} -gt 0 ]; then
#check if dyndns resolves to correct IP
ipOfDynDNS=$(getent hosts rootzoll.chickenkiller.com | awk '{ print $1 }')
ipOfDynDNS=$(getent hosts ${dynDomain} | awk '{ print $1 }')
if [ "${ipOfDynDNS}:${public_port}" != "${public_addr}" ]; then
public_color="${color_red}"
else

64
home.admin/00infoLCD.sh

@ -52,17 +52,15 @@ while :
continue
fi
## get basic info from SD
bootstrapInfoExists=$(ls ${infoFile} 2>/dev/null | grep -c '.info')
if [ ${bootstrapInfoExists} -eq 1 ]; then
source ${infoFile}
fi
# get final config if already avaulable
# get config info if already available
configExists=$(ls ${configFile} 2>/dev/null | grep -c '.conf')
if [ ${configExists} -eq 1 ]; then
source ${configFile}
setupStep=100
fi
# if setup not marked as done (=100) load boostrap info file
if [ "${setupStep}" != "100" ]; then
source ${infoFile}
fi
# if no information available from files - set default
@ -110,22 +108,6 @@ while :
continue
fi
# when setup is in progress - password has been changed
if [ ${setupStep} -lt 100 ]; then
l1="Login to your RaspiBlitz with:\n"
l2="ssh admin@${localip}\n"
l3="Use your Password A\n"
boxwidth=$((${#localip} + 24))
sleep 3
dialog --backtitle "RaspiBlitz ${codeVersion} ${localip} - Welcome (${setupStep})" --infobox "$l1$l2$l3" 5 ${boxwidth}
sleep 7
continue
fi
###########################
# DISPLAY AFTER SETUP
###########################
# check if recovering/upgrade is running
if [ "${state}" = "recovering" ]; then
if [ ${#message} -eq 0 ]; then
@ -135,7 +117,7 @@ while :
l2="---> ${message}\n"
l3="Please keep running until reboot."
boxwidth=$((${#localip} + 28))
dialog --backtitle "RaspiBlitz ${codeVersion} (${state}) ${localip}" --infobox "$l1$l2$l3" 5 ${boxwidth}
dialog --backtitle "RaspiBlitz ${codeVersion} (${state}) ${setupStep} ${localip}" --infobox "$l1$l2$l3" 5 ${boxwidth}
sleep 3
continue
fi
@ -162,6 +144,22 @@ while :
continue
fi
# when setup is in progress - password has been changed
if [ ${setupStep} -lt 100 ]; then
l1="Login to your RaspiBlitz with:\n"
l2="ssh admin@${localip}\n"
l3="Use your Password A\n"
boxwidth=$((${#localip} + 24))
sleep 3
dialog --backtitle "RaspiBlitz ${codeVersion} ${localip} - Welcome (${setupStep})" --infobox "$l1$l2$l3" 5 ${boxwidth}
sleep 7
continue
fi
###########################
# DISPLAY AFTER SETUP
###########################
# check if bitcoin is ready
sudo -u bitcoin ${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo 1>/dev/null 2>error.tmp
clienterror=`cat error.tmp`
@ -185,19 +183,23 @@ while :
if [ "${locked}" -gt 0 ]; then
# special case: LND wallet is locked ---> show unlock info
h=5
l1="!!! LND WALLET IS LOCKED !!!\n"
l2="Login: ssh admin@${localip}\n"
l3="Use your Password A\n"
#if [ "${rtlWebinterface}" = "on" ]; then
# l2="Open: http://${localip}:3000\n"
# l3="Use Password C to unlock\n"
#fi
l4=""
if [ "${rtlWebinterface}" = "on" ]; then
l2="Browser: http://${localip}:3000\n"
l3="PasswordB=login / PasswordC=unlock\n"
l4="PasswordA: ssh admin@${localip}"
h=6
fi
if [ "${autoUnlock}" = "on" ]; then
l2="ssh admin@${localip}\n"
l3="Waiting for AUTO-UNLOCK"
fi
boxwidth=$((${#localip} + 24))
dialog --backtitle "RaspiBlitz ${codeVersion} (${localip}) - ${hostname}" --infobox "$l1$l2$l3" 5 ${boxwidth}
dialog --backtitle "RaspiBlitz ${codeVersion} (${localip}) - ${hostname}" --infobox "$l1$l2$l3$l4" ${h} ${boxwidth}
sleep 5
continue
fi
@ -216,4 +218,4 @@ while :
done
fi
fi

35
home.admin/00mainMenu.sh

@ -69,12 +69,23 @@ fi
if [ "${state}" = "presync" ]; then
# stopping the pre-sync
echo ""
echo "********************************************"
echo "Stopping pre-sync ... pls wait (up to 1min)"
echo "********************************************"
sudo -u root bitcoin-cli -conf=/home/admin/assets/bitcoin.conf stop
echo "bitcoind called to stop .."
sleep 50
# analyse if blockchain was detected broken by pre-sync
blockchainBroken=$(sudo tail /mnt/hdd/bitcoin/debug.log | grep -c "Please restart with -reindex or -reindex-chainstate to recover.")
if [ ${blockchainBroken} -eq 1 ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "Detected corrupted blockchain on pre-sync !"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "Deleting blockchain data ..."
echo "(needs to get downloaded fresh during setup)"
sudo rm -f -r /mnt/hdd/bitcoin
else
echo "********************************************"
echo "Stopping pre-sync ... pls wait (up to 1min)"
echo "********************************************"
sudo -u root bitcoin-cli -conf=/home/admin/assets/bitcoin.conf stop
echo "bitcoind called to stop .."
sleep 50
fi
# unmount the temporary mount
echo "Unmount HDD .."
@ -91,9 +102,8 @@ fi
if [ "${state}" = "ready" ]; then
configExists=$(ls ${configFile} | grep -c '.conf')
if [ ${configExists} -eq 1 ]; then
echo "setup is done - loading config data"
echo "loading config data"
source ${configFile}
setupStep=100
else
echo "setup still in progress - setupStep(${setupStep})"
fi
@ -182,7 +192,7 @@ if [ ${setupStep} -eq 0 ]; then
# old data setup
BACKTITLE="RaspiBlitz - Manual Update"
TITLE="⚡ Found old RaspiBlitz Data on HDD ⚡"
MENU="\n ATTENTION: OLD DATA COULD COINTAIN FUNDS\n"
MENU="\n ATTENTION: OLD DATA COULD CONTAIN FUNDS\n"
OPTIONS+=(MANUAL "read how to recover your old funds" \
DELETE "erase old data, keep blockchain, reboot" )
HEIGHT=11
@ -204,7 +214,7 @@ elif [ ${setupStep} -lt 100 ]; then
# see function above
if [ ${setupStep} -gt 59 ]; then
waitUntilChainNetworkIsReady
fi
fi
# continue setup
BACKTITLE="${hostname} / ${network} / ${chain}"
@ -458,8 +468,9 @@ case $CHOICE in
;;
MANUAL)
echo "************************************************************************************"
echo "PLEASE open in browser for more information:"
echo "https://github.com/rootzoll/raspiblitz#recover-your-coins-from-a-failing-raspiblitz"
echo "PLEASE go to RaspiBlitz FAQ:"
echo "https://github.com/rootzoll/raspiblitz"
echo "And check: How can I recover my coins from a failing RaspiBlitz?"
echo "************************************************************************************"
exit 0
;;

17
home.admin/00settingsMenuServices.sh

@ -2,7 +2,9 @@
# get raspiblitz config
echo "get raspiblitz config"
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
echo "services default values"
if [ ${#autoPilot} -eq 0 ]; then autoPilot="off"; fi
if [ ${#autoUnlock} -eq 0 ]; then autoUnlock="off"; fi
@ -32,7 +34,7 @@ fi
# show select dialog
echo "run dialog ..."
CHOICES=$(dialog --checklist 'Activate/Deactivate Services:' 15 45 7 \
CHOICES=$(dialog --title ' Additional Services ' --checklist ' use spacebar to activate/de-activate ' 15 45 7 \
1 'Channel Autopilot' ${autoPilot} \
2 'Testnet' ${chainValue} \
3 ${dynDomainMenu} ${domainValue} \
@ -52,12 +54,14 @@ if [ ${dialogcancel} -eq 1 ]; then
fi
needsReboot=0
anychange=0
# AUTOPILOT process choice
choice="off"; check=$(echo "${CHOICES}" | grep -c "1")
if [ ${check} -eq 1 ]; then choice="on"; fi
if [ "${autoPilot}" != "${choice}" ]; then
echo "Autopilot Setting changed .."
anychange=1
sudo /home/admin/config.scripts/lnd.autopilot.sh ${choice}
needsReboot=1
else
@ -72,6 +76,7 @@ if [ "${chain}" != "${choice}" ]; then
dialog --title 'FAIL' --msgbox 'Litecoin-Testnet not available.' 5 25
else
echo "Testnet Setting changed .."
anychange=1
sudo /home/admin/config.scripts/network.chain.sh ${choice}net
walletExists=$(sudo ls /mnt/hdd/lnd/data/chain/${network}/${choice}net/wallet.db 2>/dev/null | grep -c 'wallet.db')
if [ ${walletExists} -eq 0 ]; then
@ -141,6 +146,7 @@ choice="off"; check=$(echo "${CHOICES}" | grep -c "3")
if [ ${check} -eq 1 ]; then choice="on"; fi
if [ "${domainValue}" != "${choice}" ]; then
echo "Dynamic Domain changed .."
anychange=1
sudo /home/admin/config.scripts/internet.dyndomain.sh ${choice}
needsReboot=1
else
@ -152,6 +158,7 @@ choice="off"; check=$(echo "${CHOICES}" | grep -c "4")
if [ ${check} -eq 1 ]; then choice="on"; fi
if [ "${runBehindTor}" != "${choice}" ]; then
echo "TOR Setting changed .."
anychange=1
sudo /home/admin/config.scripts/internet.tor.sh ${choice}
needsReboot=1
else
@ -170,7 +177,7 @@ if [ "${rtlWebinterface}" != "${choice}" ]; then
l2="Try to open the following URL in your local webrowser"
l3="and login with your PASSWORD B."
l4="---> http://${localip}:3000"
dialog --title 'OK' --msgbox "${l1}\n${l2}\n${l3}\n${l4}" 11 50
dialog --title 'OK' --msgbox "${l1}\n${l2}\n${l3}\n${l4}" 11 65
fi
needsReboot=1
else
@ -182,6 +189,7 @@ choice="off"; check=$(echo "${CHOICES}" | grep -c "6")
if [ ${check} -eq 1 ]; then choice="on"; fi
if [ "${autoUnlock}" != "${choice}" ]; then
echo "LND Autounlock Setting changed .."
anychange=1
sudo /home/admin/config.scripts/lnd.autounlock.sh ${choice}
l1="AUTO-UNLOCK IS NOW OFF"
if [ "${choice}" = "on" ]; then
@ -196,6 +204,11 @@ else
echo "LND Autounlock Setting unchanged."
fi
if [ ${anychange} -eq 0 ]; then
dialog --pause "Hint: Use Spacebar to check/uncheck services." 8 58 5
exit 0
fi
if [ ${needsReboot} -eq 1 ]; then
sleep 2
dialog --pause "OK. System will reboot to activate changes." 8 58 8

59
home.admin/10setupBlitz.sh

@ -101,7 +101,11 @@ fi #end - when lighting is running
bitcoinRunning=$(systemctl status ${network}d.service 2>/dev/null | grep -c running)
if [ ${bitcoinRunning} -eq 0 ]; then
# double check
dialog --pause " Double checking for ${network}d - please wait .." 8 58 120
seconds=120
if [ ${setupStep} -lt 60 ]; then
seconds=10
fi
dialog --pause " Double checking for ${network}d - please wait .." 8 58 ${seconds}
bitcoinRunning=$(${network}-cli getblockchaininfo | grep "initialblockdownload" -c)
else
echo "${network} is running"
@ -119,6 +123,19 @@ fi #end - when bitcoin is running
mountOK=$( sudo cat /etc/fstab | grep -c '/mnt/hdd' )
if [ ${mountOK} -eq 1 ]; then
# FAILSAFE: check if raspiblitz.conf is available
configExists=$(ls /mnt/hdd/raspiblitz.conf | grep -c '.conf')
if [ ${configExists} -eq 0 ]; then
echo ""
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "FAIL: /mnt/hdd/raspiblitz.conf should exists at this point, but not found!"
echo "Please report to: https://github.com/rootzoll/raspiblitz/issues/293"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "Press ENTER to EXIT."
read key
exit 1
fi
# are there any signs of blockchain data and activity
# setup running with admin user, but has no permission to read /mnt/hdd/bitcoin/blocks/, sudo needed
blockchainDataExists=$(sudo ls /mnt/hdd/${network}/blocks/blk00000.dat 2>/dev/null | grep -c '.dat')
@ -139,20 +156,28 @@ if [ ${mountOK} -eq 1 ]; then
fi
fi
# check if there is a download to continue
# check if there is torrent data to continue
torrentProgressExists=$(sudo ls /mnt/hdd/ 2>/dev/null | grep "torrent" -c)
if [ ${torrentProgressExists} -eq 1 ]; then
echo "found torrent data .. resuming"
./50torrentHDD.sh
exit 1
# check if there is a running screen session to return to
noScreenSession=$(screen -ls | grep -c "No Sockets found")
if [ ${noScreenSession} -eq 0 ]; then
echo "found torrent data .. resuming"
./50torrentHDD.sh
exit 1
fi
fi
# check if there is a download to continue
# check if there is ftp data to continue
downloadProgressExists=$(sudo ls /mnt/hdd/ 2>/dev/null | grep "download" -c)
if [ ${downloadProgressExists} -eq 1 ]; then
echo "found download in data .. resuming"
./50downloadHDD.sh
exit 1
# check if there is a running screen session to return to
noScreenSession=$(screen -ls | grep -c "No Sockets found")
if [ ${noScreenSession} -eq 0 ]; then
echo "found download in data .. resuming"
./50downloadHDD.sh
exit 1
fi
fi
# HDD is empty - get Blockchain
@ -165,7 +190,7 @@ if [ ${mountOK} -eq 1 ]; then
T "TORRENT --> MAINNET + TESTNET thru Torrent (DEFAULT)" \
D "DOWNLOAD --> MAINNET + TESTNET per FTP (FALLBACK)" \
C "COPY --> BLOCKCHAINDATA from another node with SCP" \
A "ADAPTER --> BLOCKCHAINDATA from 2nd HDD via powered adapter cable"\
N "CLONE --> BLOCKCHAINDATA from 2nd HDD (extra cable)"\
S "SYNC --> MAINNET thru Bitcoin Network (ULTRA SLOW)" 2>&1 >/dev/tty)
# Litecoin
@ -189,19 +214,19 @@ if [ ${mountOK} -eq 1 ]; then
clear
case $menuitem in
T)
./50torrentHDD.sh
/home/admin/50torrentHDD.sh
;;
C)
./50copyHDD.sh
/home/admin/50copyHDD.sh
;;
A)
./50adapterHDD.sh
N)
/home/admin/50cloneHDD.sh
;;
S)
./50syncHDD.sh
/home/admin/50syncHDD.sh
;;
D)
./50downloadHDD.sh
/home/admin/50downloadHDD.sh
;;
esac
exit 1
@ -232,6 +257,6 @@ if [ ${formatExt4OK} -eq 1 ]; then
fi
# the HDD had no init yet
echo "HDD needs init"
echo "init HDD ..."
./30initHDD.sh
exit 1

1
home.admin/20recoverDialog.sh

@ -1,6 +1,7 @@
#!/bin/bash
## get basic info
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
# show password info dialog

4
home.admin/20setupDialog.sh

@ -8,7 +8,7 @@ source /home/admin/raspiblitz.info 2>/dev/null
# ENTER NAME
###################
# welcome and ask for name of RaspiBlitz
# welcome and ask for name of RaspiBlitz
result=""
while [ ${#result} -eq 0 ]
do
@ -17,6 +17,8 @@ while [ ${#result} -eq 0 ]
dialog --backtitle "RaspiBlitz - Setup (${network}/${chain})" --inputbox "$l1$l2" 11 52 2>$_temp
result=$( cat $_temp | tr -dc '[:alnum:]-.' | tr -d ' ' )
shred $_temp
echo "processing ..."
sleep 3
done
# set lightning alias

37
home.admin/30initHDD.sh

@ -1,9 +1,14 @@
#!/bin/bash
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
echo ""
echo "*** Checking if HDD is connected ***"
sleep 5
device="sda1"
existsHDD=$(lsblk | grep -c sda1)
if [ ${existsHDD} -eq 1 ]; then
echo "OK - HDD found at sda1"
@ -28,6 +33,38 @@ if [ ${existsHDD} -eq 1 ]; then
fi
# quick basic size check
echo ""
echo "*** HDD Size Check ***"
# bitcoin > 450 GB
minSize=450000000000
# litecoin > 31 GB
if [ "${network}" = "litecoin" ]; then
minSize=31000000000
fi
isSize=$(lsblk -o NAME,SIZE -b | grep "${device}" | awk '$1=$1' | cut -d " " -f 2)
if [ ${isSize} -lt ${minSize} ]; then
if [ ${isSize} -gt 1 ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "WARNING: HDD might be too small"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "You HDD was detected with the size of ${isSize} bytes"
echo "For ${network} at least ${minSize} bytes is recommended"
echo "If you want to change to a bigger HDD:"
echo "* Unplug power of RaspiBlitz"
echo "* Make a fresh SD card again"
echo "* Start again with bigger HDD"
echo "If you want to try with HDD connected, press ENTER to continue."
read key
else
echo "WARN: Was not able to get size of HDD ... skipping"
sleep 3
fi
else
echo "OK: HDD seems big enough"
fi
echo ""
mountOK=$(df | grep -c /mnt/hdd)
if [ ${mountOK} -eq 1 ]; then
echo "FAIL - HDD is mounted"

36
home.admin/40addHDD.sh

@ -2,7 +2,7 @@
echo ""
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
source /home/admin/raspiblitz.info
echo "*** Adding HDD to the System ***"
echo "started from state(${state})"
@ -14,7 +14,7 @@ if [ ${existsHDD} -gt 0 ]; then
if [ ${mountOK} -eq 1 ]; then
echo "FAIL - HDD is already mounted"
echo "If you want to add HDD freshly to the system, then unmount the HDD first and try again"
else
else
echo ""
echo "*** Check HDD ***"
formatExt4OK=$(lsblk -o UUID,NAME,FSTYPE,SIZE,LABEL,MODEL | grep BLOCKCHAIN | grep -c ext4)
@ -30,7 +30,7 @@ if [ ${existsHDD} -gt 0 ]; then
echo ${fstabAdd}
# adding the new line after line 3 to the /etc/fstab
sudo sed "3 a ${fstabAdd}" -i /etc/fstab
else
else
echo "UUID is already in /etc/fstab"
fi
fstabOK=$(cat /etc/fstab | grep -c ${uuid})
@ -38,13 +38,41 @@ if [ ${existsHDD} -gt 0 ]; then
echo "OK - HDD is listed in /etc/fstab"
echo ""
echo "*** Mount HDD ***"
sudo mkdir /mnt/hdd
sudo mkdir /mnt/hdd 2>/dev/null
sudo mount -a
mountOK=$(df | grep -c /mnt/hdd)
if [ ${mountOK} -eq 1 ]; then
echo "OK - HDD is mounted"
echo ""
# init the RASPIBLITZ Config
configFile="/mnt/hdd/raspiblitz.conf"
configExists=$(sudo ls ${configFile} | grep -c 'raspiblitz.conf')
if [ ${configExists} -eq 0 ]; then
# create file and use init values from raspiblitz.info
source /home/admin/_version.info
sudo touch $configFile
sudo chmod 777 ${configFile}
echo "# RASPIBLITZ CONFIG FILE" > $configFile
echo "raspiBlitzVersion='${codeVersion}'" >> $configFile
echo "network=${network}" >> $configFile
echo "chain=${chain}" >> $configFile
echo "hostname=${hostname}" >> $configFile
# try to determine publicIP and if not possible use localIP as placeholder
# https://github.com/rootzoll/raspiblitz/issues/312#issuecomment-462675101
freshPublicIP=$(curl -s http://v4.ipv6-test.com/api/myip.php)
if [ ${#freshPublicIP} -eq 0 ]; then
localIP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
echo "WARNING: No publicIP information at all yet - working with placeholder : ${localIP}"
freshPublicIP="${localIP}"
fi
echo "publicIP=${freshPublicIP}" >> $configFile
fi
# move SSH pub keys to HDD so that they survive an update
echo "moving SSH pub keys to HDD"
sudo cp -r /etc/ssh /mnt/hdd/ssh

10
home.admin/50adapterHDD.sh → home.admin/50cloneHDD.sh

@ -1,7 +1,7 @@
#!/bin/bash
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
source /home/admin/raspiblitz.info
echo ""
echo "*** Check 1st HDD ***"
@ -34,7 +34,7 @@ while [ ${ready} -eq 0 ]
done
echo ""
echo "*** Copy Blockchain form a second HDD ***"
echo "*** Clone Blockchain form a second HDD ***"
echo ""
echo "WARNING: The RaspiBlitz cannot run 2 HDDs without extra Power!"
echo ""
@ -204,5 +204,7 @@ else
fi
# setup script will decide the next logical step
./10setupBlitz.sh
if [ ${setupStep} -lt 100 ]; then
# setup script will decide the next logical step
/home/admin/10setupBlitz.sh
fi

57
home.admin/50copyHDD.sh

@ -1,17 +1,45 @@
#!/bin/bash
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
source /home/admin/raspiblitz.info
# get local ip
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
# additional prep if this is used to replace corrupted blockchain
if [ "${setupStep}" = "100" ]; then
# warn user
echo "!! Press ENTER to delete the old blockchain .. CTRL+C to CANCEL"
read key
# make sure services are not running
echo "stopping servcies ..."
sudo systemctl stop lnd
sudo systemctl stop bitcoind
fi
# create bitcoin base directory and link with bitcoin user
echo "delete and create new blockchain directory ..."
sudo rm -rf /mnt/hdd/bitcoin 2>/dev/null
sudo rm -rf /home/bitcoin/.bitcoin 2>/dev/null
sudo mkdir /mnt/hdd/bitcoin
sudo chown bitcoin:bitcoin /mnt/hdd/bitcoin
sudo ln -s /mnt/hdd/bitcoin /home/bitcoin/.bitcoin
# check setup
echo "checking setup ..."
sudo touch /home/bitcoin/.bitcoin/test.txt
createdCorerct=$(sudo ls /mnt/hdd/bitcoin/test.txt | grep -c 'test.txt')
sudo rm /home/bitcoin/.bitcoin/test.txt
if [ ${createdCorerct} -eq 0 ]; then
sudo rm -rf /mnt/hdd/bitcoin
sudo rm -rf /home/bitcoin/.bitcoin
echo "FAILED: sudo ln -s /mnt/hdd/bitcoin /home/bitcoin/.bitcoin"
echo "Press ENTER to get back to menu ..."
read key
exit 1
fi
clear
echo "************************************************************************************"
echo "Instructions to COPY/TRANSFER SYNCED BLOCKCHAIN from another computer"
@ -29,18 +57,13 @@ echo "Make sure the bitcoin client on that computer is stopped."
echo ""
echo "COPY, PASTE & EXECUTE the following command on the blockchain source computer:"
echo "sudo scp -r ./chainstate ./indexes ./testnet3 ./blocks bitcoin@${localip}:/home/bitcoin/.bitcoin"
echo ""
echo "This command will ask for your SSH PASSWORD A from this RaspiBlitz."
echo ""
echo "This command may ask you first about the admin password of the other computer (because sudo)."
echo "Then it will ask for your SSH PASSWORD A from this RaspiBlitz."
echo "It can take multiple hours until transfer is complete - be patient."
echo "************************************************************************************"
echo "PRESS ENTER if transfers is done OR if you want to choose another another option."
#echo "Copy, Paste and Execute the following commands - line by line:"
#echo "sudo scp -r ./chainstate bitcoin@${localip}:/home/bitcoin/.bitcoin/chainstate"
#echo "sudo scp -r ./indexes bitcoin@${localip}:/home/bitcoin/.bitcoin/indexes"
#echo "sudo scp -r ./blocks bitcoin@${localip}:/home/bitcoin/.bitcoin/blocks"
#echo ""
#echo "Every command above needs your SSH PASSWORD A to work and will take some time to transfer."
#echo "PRESS ENTER if all 3 transfers are done or if you dont care and you want to return to menu."
sleep 2
read key
# unlink bitcoin user (will created later in setup again)
@ -72,8 +95,8 @@ if [ ${count} -gt 0 ]; then
echo "Found data in /mnt/hdd/bitcoin/indexes/txindex"
anyDataAtAll=1
fi
if [ ${count} -lt 5200 ]; then
echo "FAIL: less then 5200 .ldb files (${count}) in /mnt/hdd/bitcoin/chainstate (transfere seems invalid)"
if [ ${count} -lt 1500 ]; then
echo "FAIL: less then 1500 .ldb files (${count}) in /mnt/hdd/bitcoin/indexes/txindex (transfere seems invalid)"
quickCheckOK=0
fi
@ -103,10 +126,16 @@ if [ ${anyDataAtAll} -eq 1 ]; then
else
echo "back to menu ..."
# when no data transferred - just delete bitcoin base dir again
sudo rm -rf /mnt/hdd/bitcoin
sleep 2
fi
# setup script will decide the next logical step
./10setupBlitz.sh
if [ ${setupStep} -lt 100 ]; then
# setup script will decide the next logical step
/home/admin/10setupBlitz.sh
else
"DONE - reboot is needed: sudo shutdown -r now"
fi

21
home.admin/50downloadHDD.sh

@ -1,6 +1,9 @@
#!/bin/bash
echo ""
## get basic info
source /home/admin/raspiblitz.info
# *** BITCOIN (just mainnet) ***
bitcoinList="" # url to list with other sources
#bitcoinUrl="ftp://anonymous:anonymous@91.83.237.185:21/raspiblitz-bitcoin-2018-07-16"
@ -15,9 +18,6 @@ litecoinSize=22220000 # 22221160-tolerance
# NOTE TO GET THE SIZE RIGHT: for new download add 9999999999 as size. Run download.
# When finished the warning comes up and behind WARNING: copy that number
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
# settings based on network
list=$bitcoinList
url=$bitcoinUrl
@ -111,7 +111,7 @@ if [ ${isRunning} -eq 1 ]; then
echo "killing screen session PID(${sessionPID})"
# kill all child processes of screen sceesion
pkill -P ${sessionPID}
echo "proccesses klilled"
echo "proccesses killed"
sleep 3
# tell the screen session to quit and wait a bit
screen -S ${name} -X quit 1>/dev/null
@ -141,7 +141,7 @@ if [ ${finalSize} -lt ${targetSize} ]; then
dialog --title " WARNING (${finalSize}) " --yesno "The download failed or is not complete. Maybe try again (later). Do you want keep already downloaded data for next try?" 8 57
response=$?
case $response in
1) sudo rm -rf ${targetDir} ;;
1) sudo rm -rf /mnt/hdd/download ;;
esac
./00mainMenu.sh
exit 1;
@ -153,10 +153,11 @@ else
sudo mv ${targetDir}${targetPath} /mnt/hdd/${network}
echo "OK"
# set SetupState
sudo sed -i "s/^setupStep=.*/setupStep=50/g" /home/admin/raspiblitz.info
# continue setup
./60finishHDD.sh
if [ ${setupStep} -lt 100 ]; then
# set SetupState
sudo sed -i "s/^setupStep=.*/setupStep=50/g" /home/admin/raspiblitz.info
# continue setup
./60finishHDD.sh
fi
fi

2
home.admin/50syncHDD.sh

@ -1,7 +1,7 @@
#!/bin/bash
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
source /home/admin/raspiblitz.info
# only show warning when bitcoin
if [ "$network" = "bitcoin" ]; then

13
home.admin/50torrentHDD.sh

@ -5,7 +5,7 @@ echo ""
# why there are two torrent files
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
source /home/admin/raspiblitz.info
# make sure rtorrent is available
sudo apt-get install rtorrent -y
@ -268,8 +268,9 @@ sudo rm -r ${targetDir}
echo "OK"
date +%s
# set SetupState
sudo sed -i "s/^setupStep=.*/setupStep=50/g" /home/admin/raspiblitz.info
# continue setup
./60finishHDD.sh
if [ ${setupStep} -lt 100 ]; then
# set SetupState
sudo sed -i "s/^setupStep=.*/setupStep=50/g" /home/admin/raspiblitz.info
# continue setup
./60finishHDD.sh
fi

2
home.admin/60finishHDD.sh

@ -2,7 +2,7 @@
echo ""
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
source /home/admin/raspiblitz.info
echo "*** Checking HDD ***"
mountOK=$(df | grep -c /mnt/hdd)

3
home.admin/70initLND.sh

@ -2,7 +2,8 @@
echo ""
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
# verify that bitcoin is running
echo "*** Checking ${network} ***"

5
home.admin/80scanLND.sh

@ -1,4 +1,7 @@
source /mnt/hdd/raspiblitz.conf
#!/bin/bash
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
### USER PI AUTOSTART (LCD Display)
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')

8
home.admin/90finishSetup.sh

@ -73,12 +73,6 @@ echo "enable lazy firewall"
sudo ufw --force enable
echo ""
# set raspi config as environment for lnd service
sudo systemctl stop lnd
sudo systemctl disable lnd
sudo sed -i "s/^EnvironmentFile=.*/EnvironmentFile=\/mnt\/hdd\/raspiblitz.conf/g" /etc/systemd/system/lnd.service
sudo systemctl enable lnd
# update system
echo ""
echo "*** Update System ***"
@ -87,4 +81,4 @@ sudo apt-get update
echo "OK - System is now up to date"
# mark setup is done
sudo sed -i "s/^setupStep=.*/setupStep=90/g" /home/admin/raspiblitz.info
sudo sed -i "s/^setupStep=.*/setupStep=100/g" /home/admin/raspiblitz.info

12
home.admin/95finalSetup.sh

@ -19,16 +19,6 @@ dialog --backtitle "RaspiBlitz - Setup" --title " RaspiBlitz Setup is done :) "
Press OK for a final reboot.
" 10 42
# init the RASPIBLITZ Config
echo "# RASPIBLITZ CONFIG FILE" > $configFile
echo "raspiBlitzVersion='${codeVersion}'" >> $configFile
sudo chmod 777 ${configFile}
# transfer data from SD info file
echo "hostname=${hostname}" >> $configFile
echo "network=${network}" >> $configFile
echo "chain=${chain}" >> $configFile
# let migration/init script do the rest
/home/admin/_bootstrap.migration.sh
@ -39,7 +29,7 @@ cp $logFile /home/admin/raspiblitz.setup.log
echo "Setting the Name/Alias/Hostname .."
sudo /home/admin/config.scripts/lnd.setname.sh ${hostname}
# mark setup is done (100%)
# mark setup is done
sudo sed -i "s/^setupStep=.*/setupStep=100/g" /home/admin/raspiblitz.info
clear

1
home.admin/97addMobileWallet.sh

@ -1,6 +1,7 @@
#!/bin/bash
# get raspiblitz config
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
# check if dynamic domain is set

3
home.admin/97addMobileWalletShango.sh

@ -1,6 +1,7 @@
#!/bin/bash
# load raspiblitz config data (with backup from old config)
# load raspiblitz config data
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
# make sure qrcode-encoder in installed

19
home.admin/97addMobileWalletZap.sh

@ -1,6 +1,7 @@
#!/bin/bash
# load raspiblitz config data
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
# export go vars (if needed)
@ -25,7 +26,7 @@ if [ ${goInstalled} -eq 0 ];then
goInstalled=$(go version 2>/dev/null | grep -c 'go')
fi
if [ ${goInstalled} -eq 0 ];then
echo "FAIL: Was not able to install GO (needed to run ZapConnect)"
echo "FAIL: Was not able to install GO (needed to run LndConnect)"
exit 1
fi
@ -35,11 +36,11 @@ echo "*** Setup ***"
echo ""
echo "Installing zapconnect. Please wait..."
echo ""
echo "Getting github.com/LN-Zap/zapconnect (please wait) ..."
go get -d github.com/LN-Zap/zapconnect
cd $GOPATH/src/github.com/LN-Zap/zapconnect
echo "Getting github.com/LN-Zap/lndconnect (please wait) ..."
go get -d github.com/LN-Zap/lndconnect
cd $GOPATH/src/github.com/LN-Zap/lndconnect
echo ""
echo "Building github.com/LN-Zap/zapconnect ..."
echo "Building github.com/LN-Zap/lndconnect ..."
make
cd
sleep 3
@ -69,11 +70,11 @@ clear
echo "*** STEP 2 : Click on Scan (make whole QR code fill camera) ***"
if [ ${#dynDomain} -eq 0 ]; then
# If you drop the -i parameter, zapconnect will use the external IP.
zapconnect -i
# If you drop the -i parameter, lndconnect will use the external IP.
lndconnect -i
else
# when dynamic domain is set
zapconnect --host=${dynDomain}
lndconnect --host=${dynDomain}
fi
echo "(To shrink QR code: OSX->CMD- / LINUX-> CTRL-) Press ENTER when finished."
@ -82,5 +83,5 @@ read key
clear
echo "If its not working - check issues on GitHub:"
echo "https://github.com/LN-Zap/zap-iOS/issues"
echo "https://github.com/LN-Zap/zapconnect/issues"
echo "https://github.com/LN-Zap/lndconnect/issues"
echo ""

3
home.admin/AAunlockLND.sh

@ -1,7 +1,8 @@
#!/bin/bash
# load raspiblitz config data (with backup from old config)
source /mnt/hdd/raspiblitz.conf 2>/dev/null
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
if [ ${#network} -eq 0 ]; then network=`cat .network`; fi
if [ ${#network} -eq 0 ]; then network="bitcoin"; fi
if [ ${#chain} -eq 0 ]; then

3
home.admin/BBcashoutWallet.sh

@ -5,7 +5,8 @@ _error="./.error.out"
echo "please wait ..."
# load raspiblitz config data (with backup from old config)
source /mnt/hdd/raspiblitz.conf 2>/dev/null
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
if [ ${#network} -eq 0 ]; then network=`cat .network`; fi
if [ ${#network} -eq 0 ]; then network="bitcoin"; fi
if [ ${#chain} -eq 0 ]; then

3
home.admin/BBcloseAllChannels.sh

@ -1,7 +1,8 @@
#!/bin/bash
# load raspiblitz config data (with backup from old config)
source /mnt/hdd/raspiblitz.conf 2>/dev/null
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
if [ ${#network} -eq 0 ]; then network=`cat .network`; fi
if [ ${#network} -eq 0 ]; then network="bitcoin"; fi
if [ ${#chain} -eq 0 ]; then

3
home.admin/BBconnectPeer.sh

@ -3,7 +3,8 @@ _temp="./download/dialog.$$"
_error="./.error.out"
# load raspiblitz config data (with backup from old config)
source /mnt/hdd/raspiblitz.conf 2>/dev/null
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
if [ ${#network} -eq 0 ]; then network=`cat .network`; fi
if [ ${#network} -eq 0 ]; then network="bitcoin"; fi
if [ ${#chain} -eq 0 ]; then

3
home.admin/BBcreateInvoice.sh

@ -4,7 +4,8 @@ _error="./.error.out"
sudo chmod 7777 ${_error}
# load raspiblitz config data (with backup from old config)
source /mnt/hdd/raspiblitz.conf 2>/dev/null
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
if [ ${#network} -eq 0 ]; then network=`cat .network`; fi
if [ ${#network} -eq 0 ]; then network="bitcoin"; fi
if [ ${#chain} -eq 0 ]; then

3
home.admin/BBfundWallet.sh

@ -1,7 +1,8 @@
#!/bin/bash
# load raspiblitz config data (with backup from old config)
source /mnt/hdd/raspiblitz.conf 2>/dev/null
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
if [ ${#network} -eq 0 ]; then network=`cat .network`; fi
if [ ${#network} -eq 0 ]; then network="bitcoin"; fi
if [ ${#chain} -eq 0 ]; then

3
home.admin/BBopenChannel.sh

@ -3,7 +3,8 @@ _temp="./download/dialog.$$"
_error="./.error.out"
# load raspiblitz config data (with backup from old config)
source /mnt/hdd/raspiblitz.conf 2>/dev/null
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
if [ ${#network} -eq 0 ]; then network=`cat .network`; fi
if [ ${#network} -eq 0 ]; then network="bitcoin"; fi
if [ ${#chain} -eq 0 ]; then

16
home.admin/BBpayInvoice.sh

@ -3,7 +3,8 @@ _temp="./download/dialog.$$"
_error="./.error.out"
# load raspiblitz config data (with backup from old config)
source /mnt/hdd/raspiblitz.conf 2>/dev/null
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
if [ ${#network} -eq 0 ]; then network=`cat .network`; fi
if [ ${#network} -eq 0 ]; then network="bitcoin"; fi
if [ ${#chain} -eq 0 ]; then
@ -13,6 +14,7 @@ fi
echo ""
echo "*** Precheck ***"
echo "please wait a moment ..."
# check if chain is in sync
chainInSync=$(lncli --chain=${network} --network=${chain}net getinfo | grep '"synced_to_chain": true' -c)
@ -80,9 +82,11 @@ command="lncli --chain=${network} --network=${chain}net sendpayment --force --pa
# info output
clear
echo "******************************"
echo "************************************************************"
echo "Pay Invoice / Payment Request"
echo "******************************"
echo "This script is as an example how to use the lncli interface."
echo "Its not optimized for performance or error handling."
echo "************************************************************"
echo ""
echo "COMMAND LINE: "
echo $command
@ -96,9 +100,15 @@ error=`cat ${_error}`
#echo "result(${result})"
#echo "error(${error})"
resultIsError=$(echo "${result}" | grep -c "payment_error")
if [ ${resultIsError} -gt 0 ]; then
error="${result}"
fi
if [ ${#error} -gt 0 ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "FAIL"
echo "try with a wallet app or the RTL WebGUI (see services)"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "${error}"
else

4
home.admin/XXcleanHDD.sh

@ -64,9 +64,7 @@ else
sudo rm -f -r /mnt/hdd/tor
sudo rm -f /mnt/hdd/raspiblitz.conf
sudo rm -f /home/admin/raspiblitz.info
# recreate /mnt/hdd/ssh otherwise link with /etc/ssh is broken
sudo mkdir /mnt/hdd/ssh
fi

3
home.admin/XXdebugLogs.sh

@ -6,7 +6,8 @@
source /home/admin/_version.info
## get basic info (its OK if not set yet)
source /mnt/hdd/raspiblitz.conf 2>/dev/null
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
# for old nodes
if [ ${#network} -eq 0 ]; then

2
home.admin/XXprepareRelease.sh

@ -11,6 +11,6 @@ echo "OK"
echo " "
echo "Will shutdown now."
echo "Wait until Respebarry LEDs show now activity anymore."
echo "Wait until Raspberry LEDs show no activity anymore."
echo "Then remove SD card and make an release image from it."
sudo shutdown now

2
home.admin/_background.sh

@ -16,6 +16,8 @@ configFile="/mnt/hdd/raspiblitz.conf"
configExists=$(ls ${configFile} | grep -c '.conf')
if [ ${configExists} -eq 1 ]; then
source ${configFile}
else
source ${infoFile}
fi
echo "_background.sh STARTED"

46
home.admin/_bootstrap.sh

@ -19,6 +19,8 @@ source /home/admin/_version.info
# CONFIGFILE - configuration of RaspiBlitz
# used by fresh SD image to recover configuration
# and delivers basic config info for scripts
# make raspiblitz.conf if not there
sudo touch /mnt/hdd/raspiblitz.conf
configFile="/mnt/hdd/raspiblitz.conf"
# LOGFILE - store debug logs of bootstrap
@ -51,6 +53,9 @@ echo "message=" >> $infoFile
echo "network=${network}" >> $infoFile
echo "chain=${chain}" >> $infoFile
echo "setupStep=${setupStep}" >> $infoFile
if [ "${setupStep}" != "100" ]; then
echo "hostname=${hostname}" >> $infoFile
fi
sudo chmod 777 ${infoFile}
################################
@ -207,7 +212,7 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then
echo "OK - No config file found: ${configFile}" >> $logFile
fi
# check if HDD cointains existing LND data (old RaspiBlitz Version)
# check if HDD contains existing LND data (old RaspiBlitz Version)
echo "Check if HDD contains existing LND data .." >> $logFile
lndDataExists=$(ls /mnt/hdd/lnd/lnd.conf | grep -c '.conf')
if [ ${lndDataExists} -eq 1 ]; then
@ -222,9 +227,8 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then
# check if HDD contains pre-loaded blockchain data
echo "Check if HDD contains pre-loaded blockchain data .." >> $logFile
# setup running with admin user, but has no permission to read /mnt/hdd/bitcoin/blocks/, sudo needed
litecoinDataExists=$(sudo ls /mnt/hdd/litecoin/blocks/blk00000.dat 2>/dev/null | grep -c '.dat')
bitcoinDataExists=$(sudo ls /mnt/hdd/bitcoin/blocks/blk00000.dat 2>/dev/null | grep -c '.dat')
litecoinDataExists=$(ls /mnt/hdd/litecoin/blocks/blk00000.dat 2>/dev/null | grep -c '.dat')
bitcoinDataExists=$(ls /mnt/hdd/bitcoin/blocks/blk00000.dat 2>/dev/null | grep -c '.dat')
# check if node can go into presync (only for bitcoin)
if [ ${bitcoinDataExists} -eq 1 ]; then
@ -241,6 +245,8 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then
# check if pre-sync was already activated on last power-on
#presyncActive=$(systemctl status bitcoind | grep -c 'could not be found')
echo "starting pre-sync in background" >> $logFile
# make sure that debug file is clean, so just pre-sync gets analysed on stop
sudo rm /mnt/hdd/bitcoin/debug.log
# starting in background, because this scripts is part of systemd
# so to change systemd needs to happen after delay in seperate process
sudo chown -R bitcoin:bitcoin /mnt/hdd/bitcoin 2>> $logFile
@ -282,6 +288,15 @@ if [ ${configExists} -eq 1 ]; then
# wait otherwise looking for publicIP fails
sleep 5
freshPublicIP=$(curl -s http://v4.ipv6-test.com/api/myip.php)
if [ ${#freshPublicIP} -eq 0 ]; then
# prevent having no publicIP set at all and LND getting stuck
# https://github.com/rootzoll/raspiblitz/issues/312#issuecomment-462675101
if [ ${#publicIP} -eq 0 ]; then
localIP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
echo "WARNING: No publicIP information at all - working with placeholder: ${localIP}" >> $logFile
freshPublicIP="${localIP}"
fi
fi
if [ ${#freshPublicIP} -eq 0 ]; then
echo "WARNING: Was not able to determine external IP on startup." >> $logFile
else
@ -324,7 +339,30 @@ fi
# SD INFOFILE BASICS
################################
# state info
sed -i "s/^state=.*/state=ready/g" ${infoFile}
sed -i "s/^message=.*/message='waiting login'/g" ${infoFile}
# determine network and chain from system
# check for BITCOIN
loaded=$(sudo systemctl status bitcoind | grep -c 'loaded')
if [ ${loaded} -gt 0 ]; then
sed -i "s/^network=.*/network=bitcoin/g" ${infoFile}
source /mnt/hdd/bitcoin/bitcoin.conf
if [ ${testnet} -gt 0 ]; then
sed -i "s/^chain=.*/chain=test/g" ${infoFile}
else
sed -i "s/^chain=.*/chain=main/g" ${infoFile}
fi
fi
# check for LITECOIN
loaded=$(sudo systemctl status litecoind | grep -c 'loaded')
if [ ${loaded} -gt 0 ]; then
sed -i "s/^network=.*/network=litecoin/g" ${infoFile}
sed -i "s/^chain=.*/chain=main/g" ${infoFile}
fi
echo "DONE BOOTSTRAP" >> $logFile
exit 0

2
home.admin/_version.info

@ -1,2 +1,2 @@
# RaspiBlitz Version - always [main].[sub]
codeVersion="0.99"
codeVersion="1.0"

2
home.admin/assets/background.service

@ -21,4 +21,4 @@ RestartSec=10
StandardOutput=journal
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target

4
home.admin/assets/bootstrap.service

@ -8,10 +8,10 @@ After=network.target
[Service]
User=root
Group=root
Type=simple
Type=oneshot
RemainAfterExit=true
ExecStart=/home/admin/_bootstrap.sh
StandardOutput=journal
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target

4
home.admin/assets/lnd.service

@ -9,7 +9,7 @@ After=bitcoind.service
#OnFailure=systemd-sendmail@%n
[Service]
EnvironmentFile=
EnvironmentFile=/mnt/hdd/raspiblitz.conf
ExecStart=/usr/local/bin/lnd --externalip=${publicIP}
PIDFile=/home/bitcoin/.lnd/lnd.pid
User=bitcoin
@ -22,4 +22,4 @@ Restart=always
RestartSec=60
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target

10
home.admin/config.scripts/blitz.setpassword.sh

@ -18,7 +18,8 @@ fi
_temp="./dialog.$$"
# load raspiblitz config (if available)
source /mnt/hdd/raspiblitz.conf 2>/dev/null
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
if [ ${#network} -eq 0 ]; then
network="bitcoin"
fi
@ -75,7 +76,7 @@ if [ "${abcd}" = "a" ]; then
# ask user for new password A (first time)
dialog --backtitle "RaspiBlitz - Setup"\
--insecure --passwordbox "Please enter your Master/Admin Password A:\n(min 8chars, 1word, chars+number, no specials)" 10 52 2>$_temp
--insecure --passwordbox "Set new Master/Admin Password A:\n(min 8chars, 1word, chars+number, no specials)" 10 52 2>$_temp
# get user input
password1=$( cat $_temp )
@ -220,9 +221,12 @@ elif [ "${abcd}" = "c" ]; then
echo "****************************************************************************"
echo "This is your Password C on the RaspiBlitz to unlock your LND wallet."
echo "If you had Auto-Unlock active - you need to re-activate after this."
echo "To CANCEL use CTRL+C"
echo "****************************************************************************"
echo "LND needs to be restarted to lock wallet first .. (please wait)"
sudo systemctl restart lnd
sleep 6
# let LND-CLI handle the password change
sudo -u bitcoin lncli --chain=${network} --network=${chain}net changepassword

5
home.admin/config.scripts/bonus.rtl.sh

@ -9,6 +9,7 @@ fi
# check and load raspiblitz config
# to know which network is running
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
if [ ${#network} -eq 0 ]; then
echo "FAIL - missing /mnt/hdd/raspiblitz.conf"
@ -45,7 +46,9 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
echo "*** Get the RTL Source Code ***"
git clone https://github.com/ShahanaFarooqui/RTL.git
cd RTL
git reset --hard v0.1.12-alpha
#git reset --hard v0.1.13-alpha
git reset --hard v0.1.14-alpha
# install
echo "*** Run: npm install ***"

214
home.admin/config.scripts/internet.tor.sh

@ -8,12 +8,42 @@
# command info
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
echo "small config script to switch TOR on or off"
echo "internet.tor.sh [on|off]"
echo "internet.tor.sh [on|off|prepare]"
exit 1
fi
# function: install keys & sources
prepareTorSources()
{
# Prepare for TOR service
echo "*** INSTALL TOR REPO ***"
echo ""
echo "*** Install dirmngr ***"
sudo apt install dirmngr -y
echo ""
echo "*** Adding KEYS deb.torproject.org ***"
curl https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | sudo gpg --import
sudo gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
echo ""
echo "*** Adding Tor Sources to sources.list ***"
echo "deb https://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list
echo "deb-src https://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list
echo "OK"
echo ""
}
# if started with prepare
if [ "$1" = "prepare" ] || [ "$1" = "-prepare" ]; then
prepareTorSources
exit 0
fi
# check and load raspiblitz config
# to know which network is running
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
if [ ${#network} -eq 0 ]; then
echo "FAIL - missing /mnt/hdd/raspiblitz.conf"
@ -26,6 +56,8 @@ if [ ${#runBehindTor} -eq 0 ]; then
fi
# location of TOR config
# make sure /etc/tor exists
sudo mkdir /etc/tor 2>/dev/null
torrc="/etc/tor/torrc"
# stop services
@ -55,24 +87,31 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
echo ""
fi
echo "*** Updating System ***"
sudo apt-get update
echo ""
# check if TOR package is installed
packageInstalled=$(dpkg -s tor-arm | grep -c 'Status: install ok')
if [ ${packageInstalled} -eq 0 ]; then
echo "*** Install Tor ***"
sudo apt install tor tor-arm -y
# calling function from above
prepareTorSources
echo ""
echo "*** Tor Config ***"
sudo rm -r -f /mnt/hdd/tor 2>/dev/null
sudo mkdir /mnt/hdd/tor
sudo mkdir /mnt/hdd/tor/sys
sudo mkdir /mnt/hdd/tor/web80
sudo mkdir /mnt/hdd/tor/lnd9735
sudo mkdir /mnt/hdd/tor/lndrpc9735
sudo chmod -R 700 /mnt/hdd/tor
sudo chown -R bitcoin:bitcoin /mnt/hdd/tor
cat > ./torrc <<EOF
echo "*** Updating System ***"
sudo apt-get update
echo ""
echo "*** Install Tor ***"
sudo apt install tor tor-arm -y
echo ""
echo "*** Tor Config ***"
#sudo rm -r -f /mnt/hdd/tor 2>/dev/null
sudo mkdir /mnt/hdd/tor 2>/dev/null
sudo mkdir /mnt/hdd/tor/sys 2>/dev/null
sudo mkdir /mnt/hdd/tor/web80 2>/dev/null
sudo mkdir /mnt/hdd/tor/lnd9735 2>/dev/null
sudo mkdir /mnt/hdd/tor/lndrpc9735 2>/dev/null
sudo chmod -R 700 /mnt/hdd/tor
sudo chown -R bitcoin:bitcoin /mnt/hdd/tor
cat > ./torrc <<EOF
### See 'man tor', or https://www.torproject.org/docs/tor-manual.html
DataDirectory /mnt/hdd/tor/sys
@ -110,98 +149,65 @@ HiddenServicePort 9735 127.0.0.1:9735
# NOTE: bitcoind get tor service automatically - see /mnt/hdd/bitcoin for onion key
EOF
sudo rm $torrc
sudo mv ./torrc $torrc
sudo chmod 644 $torrc
sudo chown -R bitcoin:bitcoin /var/run/tor/
echo ""
sudo rm $torrc
sudo mv ./torrc $torrc
sudo chmod 644 $torrc
sudo chown -R bitcoin:bitcoin /var/run/tor/
echo ""
# NYX - Tor monitor tool
# https://nyx.torproject.org/#home
echo "*** Installing NYX - TOR monitoring Tool ***"
nyxInstalled=$(sudo pip list 2>/dev/null | grep 'nyx' -c)
if [ ${nyxInstalled} -eq 0 ]; then
sudo pip install nyx
else
echo "NYX already installed"
fi
echo ""
# NYX - Tor monitor tool
# https://nyx.torproject.org/#home
echo "*** Installing NYX - TOR monitoring Tool ***"
nyxInstalled=$(sudo pip list 2>/dev/null | grep 'nyx' -c)
if [ ${nyxInstalled} -eq 0 ]; then
sudo pip install nyx
else
echo "NYX already installed"
fi
echo ""
echo "*** Activating TOR system service ***"
echo "ReadWriteDirectories=-/mnt/hdd/tor" | sudo tee -a /lib/systemd/system/tor@default.service
sudo systemctl daemon-reload
sudo systemctl enable tor@default
echo ""
echo "*** Activating TOR system service ***"
echo "ReadWriteDirectories=-/mnt/hdd/tor" | sudo tee -a /lib/systemd/system/tor@default.service
sudo systemctl daemon-reload
sudo systemctl enable tor@default
echo ""
#echo "*** Waiting for TOR to boostrap ***"
#torIsBootstrapped=0
#while [ ${torIsBootstrapped} -eq 0 ]
#do
# echo "--- Checking 1 ---"
# date +%s
# sudo cat /mnt/hdd/tor/notice.log 2>/dev/null | grep "Bootstrapped" | tail -n 10
# torIsBootstrapped=$(sudo cat /mnt/hdd/tor/notice.log 2>/dev/null | grep "Bootstrapped 100" -c)
# echo "torIsBootstrapped(${torIsBootstrapped})"
# echo "If this takes too long --> CTRL+c, reboot and check manually"
# sleep 5
#done
#echo "OK - Tor Bootstrap is ready"
#echo ""
echo "*** Changing ${network} Config ***"
networkIsTor=$(sudo cat /home/bitcoin/.${network}/${network}.conf | grep 'onlynet=onion' -c)
if [ ${networkIsTor} -eq 0 ]; then
echo "*** Changing ${network} Config ***"
networkIsTor=$(sudo cat /home/bitcoin/.${network}/${network}.conf | grep 'onlynet=onion' -c)
if [ ${networkIsTor} -eq 0 ]; then
echo "Only Connect thru TOR"
echo "onlynet=onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf
if [ "${network}" = "bitcoin" ]; then
echo "Adding some bitcoin onion nodes to connect to"
echo "addnode=fno4aakpl6sg6y47.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf
echo "addnode=toguvy5upyuctudx.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf
echo "addnode=ndndword5lpb7eex.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf
echo "addnode=6m2iqgnqjxh7ulyk.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf
echo "addnode=5tuxetn7tar3q5kp.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf
fi
echo "Only Connect thru TOR"
echo "onlynet=onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf
if [ "${network}" = "bitcoin" ]; then
echo "Adding some bitcoin onion nodes to connect to"
echo "addnode=fno4aakpl6sg6y47.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf
echo "addnode=toguvy5upyuctudx.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf
echo "addnode=ndndword5lpb7eex.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf
echo "addnode=6m2iqgnqjxh7ulyk.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf
echo "addnode=5tuxetn7tar3q5kp.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf
fi
sudo cp /home/bitcoin/.${network}/${network}.conf /home/admin/.${network}/${network}.conf
sudo chown admin:admin /home/admin/.${network}/${network}.conf
sudo cp /home/bitcoin/.${network}/${network}.conf /home/admin/.${network}/${network}.conf
sudo chown admin:admin /home/admin/.${network}/${network}.conf
else
echo "Chain network already configured for TOR"
fi
else
echo "Chain network already configured for TOR"
fi
echo "TOR package/service is installed and was prepared earlier .. just activating again"
#echo "*** ${network} re-init - Waiting for Onion Address ***"
# restarting bitcoind to start with tor and generare onion.address
#echo "restarting ${network}d ..."
#sudo systemctl restart ${network}d
#sleep 8
#onionAddress=""
#while [ ${#onionAddress} -eq 0 ]
#do
# echo "--- Checking 2 ---"
# date +%s
# testNetAdd=""
# if [ "${chain}" = "test" ];then
# testNetAdd="/testnet3"
# fi
# sudo cat /mnt/hdd/${network}${testNetAdd}/debug.log 2>/dev/null | grep "tor" | tail -n 10
# onionAddress=$(sudo -u bitcoin ${network}-cli getnetworkinfo | grep '"address"' | cut -d '"' -f4)
# echo "Can take up to 20min - if this takes longer --> CTRL+c, reboot and check manually"
# sleep 5
#done
#onionPort=$(sudo -u bitcoin ${network}-cli getnetworkinfo | grep '"port"' | tr -dc '0-9')
#echo "Your Chain Network Onion Address is: ${onionAddress}:${onionPort}"
#echo ""
#echo "*** Setting your Onion Address ***"
#onionLND=$(sudo cat /mnt/hdd/tor/lnd9735/hostname)
#echo "Your Lightning Tor Onion Address is: ${onionLND}:9735"
#echo ""
echo "*** Enable TOR service ***"
sudo systemctl enable tor@default
echo ""
fi
# ACTIVATE LND OVER TOR
echo "*** Putting LND behind TOR ***"
echo "Make sutre LND is disabled"
echo "Make sure LND is disabled"
sudo systemctl disable lnd 2>/dev/null
echo "editing /etc/systemd/system/lnd.service"
@ -245,18 +251,6 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
echo "OK"
echo ""
echo "*** Remove Tor ***"
sudo apt remove tor tor-arm -y
echo ""
echo "*** Remove NYX ***"
sudo pip uninstall nyx -y
echo ""
echo "*** Remove TOR Files/Config ***"
sudo rm -r -f /mnt/hdd/tor
echo ""
echo "needs reboot to activate new setting"
exit 0
fi

1
home.admin/config.scripts/lnd.autonat.sh

@ -27,6 +27,7 @@ echo "making sure services are not running"
sudo systemctl stop lnd 2>/dev/null
# add default value to raspi config if needed
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
if [ ${#autoNatDiscovery} -eq 0 ]; then
echo "autoNatDiscovery=off" >> /mnt/hdd/raspiblitz.conf

1
home.admin/config.scripts/lnd.autopilot.sh

@ -28,6 +28,7 @@ if [ ${valueExists} -eq 0 ]; then
fi
# add default value to raspi config if needed
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
if [ ${#autoPilot} -eq 0 ]; then
echo "autoPilot=off" >> /mnt/hdd/raspiblitz.conf

3
home.admin/config.scripts/lnd.export.sh

@ -42,7 +42,8 @@ if [ "$1" = "" ] || [ $# -eq 0 ]; then
fi
# load data from config
source /mnt/hdd/raspiblitz.conf 2>/dev/null
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
########################
# CANCEL

5
home.admin/config.scripts/network.chain.sh

@ -15,9 +15,10 @@ fi
# check and load raspiblitz config
# to know which network is running
source /mnt/hdd/raspiblitz.conf 2>/dev/null
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
if [ ${#network} -eq 0 ]; then
echo "FAIL - missing /mnt/hdd/raspiblitz.conf"
echo "FAIL - missing network info"
exit 1
fi

27
home.admin/config.scripts/network.reindex.sh

@ -9,7 +9,8 @@ fi
# check and load raspiblitz config
# to know which network is running
source /mnt/hdd/raspiblitz.conf 2>/dev/null
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
if [ ${#network} -eq 0 ]; then
echo "FAIL - missing /mnt/hdd/raspiblitz.conf"
exit 1
@ -41,6 +42,7 @@ fi
# while loop to wait to finish
finished=0
progress=0
while [ ${finished} -eq 0 ]
do
clear
@ -51,14 +53,20 @@ while [ ${finished} -eq 0 ]
echo "THIS CAN TAKE SOME LONG TIME"
echo "If you dont see any progress after 24h keep X pressed to stop."
progress=0
# get blockchain sync progress
blockchaininfo=$(sudo -u bitcoin ${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo)
progress=$(echo "${blockchaininfo}" | jq -r '.verificationprogress')
#progress=$(echo "${progress}*100" | bc)
inprogress="$(echo "${blockchaininfo}" | jq -r '.initialblockdownload')"
if [ "${inprogress}" = "false" ]; then
finished=1
fi
echo ""
echo "PROGRESS: ${progress}%"
echo "RUNNING: ${inprogress}"
echo "PROGRESS: ${progress}"
echo ""
#TODO: detect and display progress
#TODO: determine when finished and then finished=1
echo "You can close terminal while reindex is running.."
echo "But you have to login again to check if ready."
@ -73,9 +81,14 @@ while [ ${finished} -eq 0 ]
done
# trigger reboot when finished
echo "*************************"
echo "Re-Index finished"
if [ ${finished} -eq 0 ]; then
echo "Re-Index CANCELED"
else
echo "Re-Index finished"
fi
echo "Starting reboot ..."
echo "*************************"
# stop bitcoind

BIN
pictures/RTL-dashboard.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

BIN
pictures/befestigung.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 KiB

BIN
pictures/download-ftp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
pictures/download-torrent.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
pictures/export.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
pictures/hardwaresetup.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

BIN
pictures/mainmenu-services.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
pictures/mainmenu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
pictures/mainmenu1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
pictures/mainmenu2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
pictures/mainmenu3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
pictures/mobile.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
pictures/raspiblitz.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

BIN
pictures/ssh5-blockchain2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 65 KiB

BIN
pictures/ssh5-blockchain2.png.old

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
pictures/ssh9b-reboot.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 15 KiB

BIN
pictures/ssh9c-unlock.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 15 KiB

BIN
pictures/ssh9d-blockchainsync.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
pictures/ssh9d-lndscan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
pictures/ssh9e-mainmenu1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

BIN
pictures/ssh9e-mainmenu2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

BIN
pictures/ssh9z-ready.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
pictures/tor1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 39 KiB

BIN
pictures/wallet-recover.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

15
shoppinglist_au.md

@ -1,8 +1,9 @@
The RaspiBlitz software is build and tested for the following Hardware set that you can buy cheap on Amazon.com.au:
* RaspBerry Pi 3 ($38.75): https://www.amazon.com/RS-Components-Raspberry-Pi-Motherboard/dp/B07BFH96M3
* Micro SD-Card 16GB ($6.23): https://www.amazon.com/SanDisk-Mobile-MicroSDHC-SDSDQM-B35A-Adapter/dp/B004ZIENBA
* Power ($21.04): https://www.amazon.com.au/Ils-Supply-Adapter-Charger-Raspberry/dp/B07F2JLSCL/
* 1TB Hard Drive($49.99): https://www.amazon.com/Toshiba-Advance-Portable-External-HDTC910XR3AA/dp/B079H7VYY6
* Case ($7.50): https://www.amazon.com/Raspberry-Model-Protective-Heatsinks-Clear/dp/B01CDVSBPO
* LCD-Display ($19.99): https://www.amazon.com/ELEGOO-Raspberry-Display-480x320-Interface/dp/B01N3JROH8
## Shopping List: Amazon Australia
* RaspBerry Pi 3: https://www.amazon.com/RS-Components-Raspberry-Pi-Motherboard/dp/B07BFH96M3
* Micro SD-Card 16GB: https://www.amazon.com/SanDisk-Mobile-MicroSDHC-SDSDQM-B35A-Adapter/dp/B004ZIENBA
* Power: https://www.amazon.com.au/Ils-Supply-Adapter-Charger-Raspberry/dp/B07F2JLSCL/
* 1TB Hard Drive: https://www.amazon.com/Toshiba-Advance-Portable-External-HDTC910XR3AA/dp/B079H7VYY6
* Case: https://www.amazon.com/Raspberry-Model-Protective-Heatsinks-Clear/dp/B01CDVSBPO
* LCD-Display: https://www.amazon.com/ELEGOO-Raspberry-Display-480x320-Interface/dp/B01N3JROH8

17
shoppinglist_ch.md

@ -1,13 +1,10 @@
The RaspiBlitz software is built and tested for the following hardware set that you can buy on [PLAY-ZONE](https://www.play-zone.ch/) and [BRACK](https://www.brack.ch/):
## Shopping List: PlayZone/Brack Czech
* Raspberry Pi3 Model B+ (CHF 57.90): https://www.play-zone.ch/de/raspberry-pi3-model-b-1-4ghz-gigabit-lan-wlan-bluetooth-64bit-inkl-16-gb-noobs-sd-karte.html
* Includes a Micro SD card with 16GB capacity
* 3.5'' TFT Display (CHF 69.90): https://www.play-zone.ch/de/3-5-tft-display-800x480-pixel-60fps-mit-acryl-gehause-fur-den-raspberry-pi.html
* Raspberry Pi3 Model B+: https://www.play-zone.ch/de/raspberry-pi3-model-b-1-4ghz-gigabit-lan-wlan-bluetooth-64bit-inkl-16-gb-noobs-sd-karte.html
* Includes a Micro SD card with 16GB capacity
* 3.5'' TFT Display: https://www.play-zone.ch/de/3-5-tft-display-800x480-pixel-60fps-mit-acryl-gehause-fur-den-raspberry-pi.html
* Includes an acryl glass case
* Power supply 3A (CHF 29.90): https://www.play-zone.ch/de/netzteil-ac-dc-adapter-5v-dc-3000ma-microusb.html
* 1TB Hard Drive (CHF 51.00): https://www.brack.ch/maxtor-externe-festplatte-421628
* Power supply >=3A: https://www.play-zone.ch/de/netzteil-ac-dc-adapter-5v-dc-3000ma-microusb.html
* 1TB Hard Drive: https://www.brack.ch/maxtor-externe-festplatte-421628
Total: CHF 208.70
**Warning**: This display is different from the one available at Amazon and needs a specific driver!
Be sure to select "No" when asked by the install script if you have the default display!
**Warning**: This display is different from the one available at Amazon and needs a specific driver! You need to build your own sd card image and select "No" when asked by the building script if you have the default display!

16
shoppinglist_cn.md

@ -1,19 +1,15 @@
## Hardware Needed (Taobao.com/T-Mall Shopping List)
## Shopping List: Taobao/T-Mall China
*The RaspiBlitz software is build and tested for the following Hardware set that you can buy cheap on taobao.com:*
Set RaspBerry Pi + accessories (¥378.00 CNY) :
Set RaspBerry Pi + accessories:
* RaspBerry Pi 3 B+
* Micro SD-Card 16GB
* Power Unit 2.5A
* Power Unit 2.5A (3A+ is remmomended)
* several items (e.g. cooling fins)
https://item.taobao.com/item.htm?spm=a1z09.2.0.0.46982e8dibAzMc&id=550270480898&_u=b110k44d3302
Single HDD (Bulk) :
* 1TB Hard Drive (¥379.00 CNY)
* 1TB Hard Drive
https://detail.tmall.com/item.htm?id=38476523976&spm=a1z09.2.0.0.46982e8dibAzMc&_u=b110k44d53f4&sku_properties=5919063:6536025
Set LCD Display + Clear case (acrylic) (¥110.00 CNY) :
https://item.taobao.com/item.htm?spm=a1z0d.6639537.1997196601.60.49a77484QE4kv4&id=577238622706
**Total Price: ¥867.00 CNY** approx. 111 EUR or 128 USD
Set LCD Display + Clear case (acrylic):
https://item.taobao.com/item.htm?spm=a1z0d.6639537.1997196601.60.49a77484QE4kv4&id=577238622706

18
shoppinglist_cz.md

@ -1,13 +1,9 @@
## Hardware Needed (Alza.cz, Amazon.com and czc.cz Shopping List)
## Shopping List: Amazon/Alza/CZC Czech
_The RaspiBlitz software is build and tested for the following Hardware set that you can buy cheap on Alza.cz, Amazon.com and czc.cz:_
- RaspBerry Pi 3 (1.129 Kč) https://www.alza.cz/raspberry-pi-3-model-b-d5284636.htm?o=1
- Micro SD-Card 16GB (379 Kč) https://www.alza.cz/EN/kingston-micro-sdhc-16gb-class-10-uhs-i-industrial-temp-sd-adapter?dq=4156874&o=2
- Power (399 Kč)https://www.alza.cz/EN/alzapower-q100-quick-charge-3-0-black-d5324257.htm?o=2
- RaspBerry Pi 3: https://www.alza.cz/raspberry-pi-3-model-b-d5284636.htm?o=1
- Micro SD-Card 16GB: https://www.alza.cz/EN/kingston-micro-sdhc-16gb-class-10-uhs-i-industrial-temp-sd-adapter?dq=4156874&o=2
- Power: https://www.alza.cz/EN/alzapower-q100-quick-charge-3-0-black-d5324257.htm?o=2
- maybe you need an micro usb cable
- 1TB Hard Drive (1.349 Kč) https://www.czc.cz/toshiba-canvio-basics-1tb-cerna/235949/produkt?gclid=EAIaIQobChMIgpLF5Mac3gIVCM53Ch3D9QWpEAQYAyABEgK-ZfD_BwE
- Case (159 Kč) https://www.alza.cz/EN/raspberry-pi-black-d3837597.htm?o=1
- LCD-Display (450.46 Kč) (delivered to Czech Republic) https://www.amazon.com/dp/B01N3JROH8/ref=cm_sw_r_cp_ep_dp_-gOuBb2Q6T0C5
**Total Price: 3.865,46 Kč**
- 1TB Hard Drive: https://www.czc.cz/toshiba-canvio-basics-1tb-cerna/235949/produkt?gclid=EAIaIQobChMIgpLF5Mac3gIVCM53Ch3D9QWpEAQYAyABEgK-ZfD_BwE
- Case: https://www.alza.cz/EN/raspberry-pi-black-d3837597.htm?o=1
- LCD-Display (delivered to Czech Republic): https://www.amazon.com/dp/B01N3JROH8/ref=cm_sw_r_cp_ep_dp_-gOuBb2Q6T0C5

8
shoppinglist_de.md

@ -0,0 +1,8 @@
## Shopping List: Amazon Germany
* RaspBerry Pi 3: https://www.amazon.de/dp/B07BDR5PDW
* Micro SD-Card 16GB: https://www.amazon.de/gp/product/B073K14CVB/
* Power >=3A: https://www.amazon.de/gp/product/B01JZE38QE
* 1TB Hard Drive: https://www.amazon.de/dp/B07997KKSK?th=1
* Case: https://www.amazon.de/dp/B0173GQF8Y
* LCD-Display: https://www.amazon.de/gp/product/B06X191RX7

18
shoppinglist_fr.md

@ -1,12 +1,8 @@
## Hardware Needed (Amazon.fr Shopping List)
## Shopping List: Amazon France
*The RaspiBlitz software is build and tested for the following Hardware set that you can buy cheap on Amazon.fr:*
* RaspBerry Pi 3 (38,00 EUR) https://www.amazon.fr/dp/B07BDR5PDW
* Micro SD-Card 16GB (9,53 EUR) https://www.amazon.fr/dp/B073K14CVB/
* Power (8,99 EUR) https://www.amazon.fr/dp/B01566WOAG
* 1TB Hard Drive (46,80 EUR) https://www.amazon.fr/dp/B07997KKSK
* Case (7,41 EUR) https://www.amazon.fr/dp/B0173GQF70/
* LCD-Display (16,99 EUR) https://www.amazon.fr/dp/B01N2N86HB/
**Total Price: 127,72 EUR**
* RaspBerry Pi 3: https://www.amazon.fr/dp/B07BDR5PDW
* Micro SD-Card 16GB: https://www.amazon.fr/dp/B073K14CVB/
* Power: https://www.amazon.fr/dp/B01566WOAG
* 1TB Hard Drive: https://www.amazon.fr/dp/B07997KKSK
* Case: https://www.amazon.fr/dp/B0173GQF70/
* LCD-Display: https://www.amazon.fr/dp/B01N2N86HB/

14
shoppinglist_uk.md

@ -1,8 +1,8 @@
*The RaspiBlitz software is build and tested for the following Hardware set that you can buy cheap on Amazon.co.uk:*
## Shopping List: Amazon UK
* RaspBerry Pi 3 https://www.amazon.co.uk/Raspberry-Pi-Model-64-Bit-Processor/dp/B07BDR5PDW
* Micro SD-Card 16GB https://www.amazon.co.uk/Kingston-SDC10G2-16GB-microSDHC-Included/dp/B0162YQEIE
* Power https://www.amazon.co.uk/iTrunk-Raspberry-Model-Supply-Charger/dp/B01MFFSPHE
* 1TB Hard Drive https://www.amazon.co.uk/Toshiba-Canvio-Basics-Portable-External/dp/B00KWHJY7Q
* Case https://www.amazon.co.uk/SB-Components-Transparent-Case-Raspberry/dp/B0173GQF8Y
* LCD-Display https://www.amazon.co.uk/ELEGOO-480x320-Raspberry-Monitor-Interface/dp/B01MRQTMTD
* RaspBerry Pi 3: https://www.amazon.co.uk/Raspberry-Pi-Model-64-Bit-Processor/dp/B07BDR5PDW
* Micro SD-Card 16GB: https://www.amazon.co.uk/Kingston-SDC10G2-16GB-microSDHC-Included/dp/B0162YQEIE
* Power: https://www.amazon.co.uk/iTrunk-Raspberry-Model-Supply-Charger/dp/B01MFFSPHE
* 1TB Hard Drive: https://www.amazon.co.uk/Toshiba-Canvio-Basics-Portable-External/dp/B00KWHJY7Q
* Case: https://www.amazon.co.uk/SB-Components-Transparent-Case-Raspberry/dp/B0173GQF8Y
* LCD-Display: https://www.amazon.co.uk/ELEGOO-480x320-Raspberry-Monitor-Interface/dp/B01MRQTMTD

18
shoppinglist_usa.md

@ -1,12 +1,8 @@
## Hardware Needed (Amazon.com Shopping List)
## Shopping List: Amazon USA
*The RaspiBlitz software is build and tested for the following Hardware set that you can buy cheap on Amazon.com:*
* RaspBerry Pi 3 ($39.70 USD) http://a.co/ahl7RIp
* Micro SD-Card 16GB ($5.99 USD) http://a.co/d/710f4oJ
* Power ($8.88 USD) http://a.co/d/fVVOYZZ
* 1TB Hard Drive ($49.99 USD) http://a.co/eUgVfLd
* Case ($7.99 USD) http://a.co/1774Hwl
* LCD-Display ($19.99 USD) http://a.co/65p2wu6
**Total Price: $132.54 USD**
* RaspBerry Pi 3: http://a.co/ahl7RIp
* Micro SD-Card 16GB: http://a.co/d/710f4oJ
* Power: http://a.co/d/fVVOYZZ
* 1TB Hard Drive: http://a.co/eUgVfLd
* Case: http://a.co/1774Hwl
* LCD-Display: http://a.co/65p2wu6
Loading…
Cancel
Save