ubuntuvirtualboxeos

EOS implementation Ubuntu 16.04 on VirtualBox


I am following NSJames video on how to install EOS on Ubuntu 16.04 using VirtualBox (https://www.youtube.com/watch?v=glB6UPHo1rA). I have run into problems with the genesis.json and config.sys. The only json file that I find is /home/prutovitz/eos/tutorials/bios-boot-tutorial/genesis.json and the config.ini seems not to be ok.

My question is what do I need to do to create the genesis file properly? The steps I have followed are:

// Set Network adapter to bridged adapter

sudo apt-get install virtualbox-guest-dkms
sudo adduser prutovitz vboxsf

// Get the EOS repository
cd ~
sudo apt install git
git clone https://github.com/eosio/eos --recursive

// Build EOS
cd eos
./eosio_build.sh

// Set Network adapter to host-only adapter

// Finish build
cd eos
cd build
sudo make install
// export PATH=$PATH:/usr/local/eosio/bin
nodeos
^c

// Now find genesis file
sudo find / -name genesis.json

This last line is where I should find a genesis file in ~/.local/share/eosio/nodeos/config but I don't.

Any ideas?


Solution

  • I figured it out. I am using the latest stable version of EOSIO namely v1.5.2. I am not sure when this changed, but in the current release the genesis.json file is no longer automatically created by nodeos. Istead you need to use:

    // Run this from any directory to create the genesis file. I did so from the EOS directory but it does not matter.

    nodeos --extract-genesis-json genesis.json

    // Then the first time you run nodeos, you use the following command and you will see it starts creating blocks

    nodeos -e -p eosio --genesis-json genesis.json --delete-all-blocks --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin

    // After the first time you run it, use the same command with the plugins but drop the --delete-all-blocks and eosio::history_api_plugin modifiers.

    nodeos -e -p eosio --plugin eosio::chain_api_plugin

    Thanks.