Skip to content

Instantly share code, notes, and snippets.

@normandmickey
Last active January 26, 2019 15:09
Show Gist options
  • Save normandmickey/48e2732503d0eb1289f42eee619facd0 to your computer and use it in GitHub Desktop.
Save normandmickey/48e2732503d0eb1289f42eee619facd0 to your computer and use it in GitHub Desktop.
Change to root user
sudo su -
Locate device name for USB HDD
fdisk -l
Start fdisk using UDB HDD - Important!! replace "sdc" with your device name.
fdisk /dev/sdc
Delete existing partition
d
Write changes to drive
w
Start fdisk again
fdisk /dev/sdc
Create new partition
n
press enter
press enter
w
Format HDD (ext4)
mkfs.ext4 -L "BLOCKCHAIN" /dev/sdc1
Mount HDD
mkdir /mnt/BLOCKCHAIN
mount /dev/sdc1 /mnt/BLOCKCHAIN
Create directories for blockchain data
mkdir /mnt/BLOCKCHAIN/bitcoin
mkdir /mnt/BLOCKCHAIN/bitcoin/blocks
mkdir /mnt/BLOCKCHAIN/bitcoin/chainstate
mkdir /mnt/BLOCKCHAIN/bitcoin/testnet3
Enter your bitcoin directory
cd /home/norm/.bitcoin
cp -R chainstate/* /mnt/BLOCKCHAIN/bitcoin/chainstate
cp -R blocks/* /mnt/BLOCKCHAIN/bitcoin/blocks
cp -R testnet3/* /mnt/BLOCKCHAIN/bitcoin/testnet3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment