Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Created February 25, 2017 12:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patterns/a7094716f873c5eeda1cc6ad0c82a9ed to your computer and use it in GitHub Desktop.
Save patterns/a7094716f873c5eeda1cc6ad0c82a9ed to your computer and use it in GitHub Desktop.
Build Bitcoin full node on BeagleBone Black
# Download latest Debian image for microSD from
# List drives before inserting microSD
df -h
# Insert microSD, then Look for the newly listed SD drive (disk2s1)
df -h
# Unmount the microSD
sudo diskutil unmount /dev/disk2s1
# Write image adjust the device name carefully
sudo dd bs=1m if=~/Downloads/bone-debian-8.6-lxqt-4gb-armhf-2016-11-06-4gb.img of=/dev/rdisk2
# OSX may prompt you when finished, choose Eject
# After multiple attempts, may be necessary to clear ssh host entry
ssh-keygen -R
# ethernet + router admin to detect dhcp assigned IP (
ssh debian@
# Unless you have a separate boot partition, can't extend microSD partition
# can't use (
# Instead, leave root partition. Create other partitions for mount points
# use the Debian hardening guide (
# Looks straight to use parted according to
# There is a limit on the max partitions value of 8 (MMC_BLOCK_MINORS)
# and using extended+logical makes the value jump (so plan ahead or skip /tmp, /opt)
sudo lsblk -o name,mountpoint,label,size,uuid
sudo fdisk /dev/mmcblk0
#/ 4 (Exist)
#/tmp 2 ext2 (skip)
#/home 4 ext4 (skip)
#/var 11+ - 20570112 45735935
#/usr/local 8 - 45735936 end
##sudo partprobe
sudo shutdown -h now
sudo mkfs -t ext4 -L "msdvar" /dev/mmcblk0p2
sudo mkfs -t ext4 -L "msdloc" /dev/mmcblk0p3
# Follow the guide from
# to mount and copy /usr/local, then repeat for /var
# Update DNS resolver list
sudo vi /etc/dhcp/dhclient.conf
# Remove sym link
sudo rm /etc/resolv.conf
sudo cp /var/run/connman/resolv.conf /etc/resolv.conf
sudo vi /etc/resolv.conf
sudo apt-get update
# Remove a slow package from upgrade, C9 SDK
##sudo apt-mark hold c9-core-installer
sudo rm -rf /root/.c9/*
sudo apt-get remove --purge c9-core-installer
sudo apt-get autoremove
# Takes forever, serial console would be good instead of ssh connect
sudo apt-get upgrade
# ctl-A-d to leave
# screen -r to re-attach
# Use get-started guide on golang to get go1.8-linux-armv6l
# Use the documentation on github for btcsuite/btcwallet to build btcd+btcwallet
# If USB drive needs, format with ext4
# Copy db/chainstate from desktop full node to USB
# then mount USB to BBB's file sys (see for why perm may not change for vfat
#todo some sudo vi /etc/fstab steps go here
sudo mount /dev/sda1 /opt/btcd/data -o umask=000
# Make world writable, if needed
sudo chmod 777 /opt/btcd/data
sudo chmod 777 /opt/btcd/data/mainnet
cp /var/opt/src/ ~/.btcd/btcd.conf
cp /var/opt/src/ ~/.btcwallet/btcwallet.conf
# Edit datadir and rpc user/pass
vi ~/.btcd/btcd.conf
#todo disabled apach2ctl steps (sudo vi /etc/init.d/apache2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment