Please login or register.

Building bitmonerod node on RasPi2 *in flight*

UPDATE

updated working instructions

below is outdated now

This is an update of saddam's instruction that smooth helped me to get working as I'm a bit of a 'Nix noob see Saddam's original getmonero forum post

Saddam's original BCT post

Download Ubuntu for Raspberry Pi: https://wiki.ubuntu.com/ARM/RaspberryPi Install Ubuntu onto the SD card: https://www.raspberrypi.org/documentation/installation/installing-images/README.md

(I’m using a mac and found these install instructions easier to use :- https://www.andrewmunsell.com/blog/getting-started-raspberry-pi-install-raspbian But we're obviously not installing Raspbian but ubuntu version 2015-04-06-ubuntu-trusty-2)

Plug RasPi2 into TV / monitor, router and plug in the USB Keyboard and mouse

Now, boot your Raspberry Pi. (Just plug in the usb lead)

Default username/password = ubuntu/ubuntu

sudo fdisk /dev/mmcblk0

Delete the 2nd partition

 d, 2

then re-create it using the defaults

 n, p, 2, enter, enter

then write and exit and reboot

 w
 sudo reboot

Now you need to resize your SD card

sudo resize2fs /dev/mmcblk0p2

Now update your repositories

sudo apt-get update

NOW CHANGE YOUR PASSWORD!

ububtu@ububtu:~$ passwd
Changing password for ubuntu.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

There is no swap partition/file included. If you want swap, it's recommended you do:

sudo apt-get install dphys-swapfile

I then installed SSH so I could remote into the RasPi2

sudo apt-get install openssh-server

At this point I ran

ifconfig

and made a note of the RasPi'2's mac address and set a reserved address on my router for consistant ssh access

You can now shutdown and unplug the TV/Monitor, Keyboard, Mouse and run headless if you prefer I also installed Screen to allow multiple sessions and have the confidence to exit and it still be running in the background Screen commands and usage https://www.digitalocean.com/community/tutorials/how-to-install-and-use-screen-on-an-ubuntu-cloud-server

sudo apt-get install screen

Thats the preparing of the RasPi2 and ubuntu done You now need to install all the dependencies that bitmonero requires

sudo apt-get install git vim libboost1.55-all-dev build-essential doxygen libdb5.3 libevent-dev libunbound-dev miniupnpc liblmdb-dev cmake libdb++-dev

This is the bit smooth helped me out with as cmake and libdb++-dev appeared to be missing from saddam's dependancies (even though libdb5.3 is there)

git clone https://github.com/monero-project/bitmonero.git bitmonero

then

cd bitmonero

then the tricky bit http://www.fprintf.net/vimCheatSheet.html is a vim cheat sheet I found

The file names are case sensitive

vim Makefile

Scroll down with the arrow key and in the “release-all” section add this code:

-D NO_AES=ON

type

i

to edit

esc

Hit escape to exit edit mode then

:x

to exit and save

cd src/blockchain_db/lmdb
vim db_lmdb.cpp

scroll to line 675 change “size_t mapsize = 1LL << 34;” to “size_t mapsize = 1LL << 30;”

:x

again to save and exit the change

cd
cd bitmonero
make release-all

This can take 2 hours or so edit not sure how long it took as I went to bed... at least 4 hours but did finish

cd build/release/bin
./bitmonerod --db-type berkeley

Hopefully Voila! I'm still watching mine compile - so not complete yet!

edit Completed compiling and now downloading the blockchain - I'm going to try and use the "blockchain_import" tools and copy the blockchain from my mac to the RasPi2's sd card and import it

another tip from smooth, to speed things up is to create a file in your bitmonero/BerkeleyDB directory called DB_CONFIG

touch bitmonero/BerkeleyDB/DB_CONFIG

This creates the new file DB_CONFIG and now edit it with vim

vim DB_CONFIG
i
set_cachesize 0 100000000 1
esc
:x

to save it

I'm not sure how log it will take to sync the blockchain before your monero node is up and running

Correlates on my RasPi2 and internet connection 1day of blockchain download = 1 hour - so about 15 days to go lol

FFS! the SD card in my RPi2 corrupted...... So I'm starting again, got to about 330 days of blockchain download and couldn't copy it of as it was suffering from a segmentation error :-( So starting again - slight difference I'm using a USB in an effort to speed things up and be a bit more reliable.

I adapted this guide so I could use the USB in the RPi 2

Obviously if this needs editing and tweaking let me know and i'll change it - also tips on the markdown language would be cool, I'm struggling a bit with hyperlinks

Replies: 2
wedgy2k edited 9 years ago Replies: 1 | Weight: -465 | Link [ - ]

Just thought I'd drop in a small update on this

  1. This is very, very slow (but I understand that Smooth and Fluffypony will develop this further) Since my commencement 14/04/2015 I've downloaded 70919 blocks -> 486403 to go as of 10/05/2015
  2. It is definitely faster to have the rootfs on a USB drive (I'm using a 32gb Scandisk stick) And I have managed to kill 2 SD Cards now, this does seem more solid.

to back up the block chain you've already downloaded (So can be restored if you need to and doesn't signify wasting the last 3 weeks.....) use rsync over SSH. So from my Mac (Yosemite 10.10.3) I run this command

rsync -avz --timeout=50 [email protected]:~/.bitmonero/ /Volumes/G-DRIVE/wedgy2kBackups/Cryptos/UbuPiBup

This copies the Berkeley DB dir to my mac for a later restore if needed

The --timeout=50 ,I need else my RPi 2 logon times me out :-(

As the others have done in other support threads - once I have a completed BerkeleyDB I'll upload it somewhere so you can download it if you desire (And save possibly 3 months! lol)

On a side note, I've really enjoyed playing with this and learning some *Nix

Reply to: wedgy2k
wedgy2k posted 9 years ago Weight: -313 | Link [ - ]

Update I've got this working finally thanks to NoodleDoodle

I cheated and purchased an external SSD - I'll create a new post with my instructions.