Browse Source

Merge pull request #17 from rootzoll/master

dev
bluecell296 6 years ago
committed by GitHub
parent
commit
8e8aea083d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      FAQ.md
  2. 6
      README.md
  3. 2
      home.admin/40addHDD.sh
  4. 6
      home.admin/50cloneHDD.sh
  5. 13
      home.admin/50copyHDD.sh
  6. 11
      home.admin/50downloadHDD.sh
  7. 11
      home.admin/50torrentHDD.sh
  8. 5
      home.admin/config.scripts/blitz.setpassword.sh
  9. BIN
      pictures/wallet-recover.png
  10. 2
      shoppinglist_de.md

12
FAQ.md

@ -71,7 +71,7 @@ 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. `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 but in the end (when copy is done) use the CTRL-C to stop script and make a reboot with `sudo shutdown -r now`.*
**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?
@ -156,14 +156,18 @@ 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.
- Follow the dialog and enter the cypher seed.
- 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.
![SSH8](pictures/ssh8-wallet.png)
- 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.

6
README.md

@ -36,11 +36,11 @@ If you start at home ordering the parts from Amazon (see shopping list below) th
The RaspiBlitz is build from the following parts:
* RaspBerryPi 3 B+
* Micro SD-Card 16GB
* Strong USB Powersupply >=3A
* 1TB Hard Drive
* Cheap Casing
* LCD-Display
* Micro SD-Card 16GB
* Powersupply >=3A (big & stable)
* Cheap Casing
**All together under 150 USD / 130 EUR (depending on country & shop)**

2
home.admin/40addHDD.sh

@ -38,7 +38,7 @@ 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

6
home.admin/50cloneHDD.sh

@ -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

13
home.admin/50copyHDD.sh

@ -8,6 +8,7 @@ localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1
# create bitcoin base directory and link with bitcoin user
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
@ -18,6 +19,7 @@ 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
@ -40,8 +42,9 @@ 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."
@ -115,5 +118,7 @@ else
fi
# setup script will decide the next logical step
/home/admin/10setupBlitz.sh
if [ ${setupStep} -lt 100 ]; then
# setup script will decide the next logical step
/home/admin/10setupBlitz.sh
fi

11
home.admin/50downloadHDD.sh

@ -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

11
home.admin/50torrentHDD.sh

@ -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

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

@ -221,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 - use command 'raspiblitz' to get back to main menu"
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

BIN
pictures/wallet-recover.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

2
shoppinglist_de.md

@ -2,7 +2,7 @@
* 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/dp/B01E75SB2C
* 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
Loading…
Cancel
Save