Skip to content

Setting up Ubuntu

arminmayrhofer edited this page Feb 12, 2019 · 44 revisions

The bitcoin node that we will install runs on a Linux/Debian-based operating system. In order to most effectively interact with it, we recommend running an Ubuntu installation. If you don't have access to a machine that runs Ubuntu, you can run Ubuntu virtually on your Mac or Windows machine.

Installation on Mac

We are looking at a Mac as an example. In principle the same process applies for Windows. To run Ubuntu in parallel to the Mac OS you can choose several methods, e.g.

  • Partition your harddrive and install Ubuntu next to Mac OS.
  • Use Parallels to run Ubuntu virtually (commercial product)
  • Use Virtualbox to run Unbuntu virtually (open source)

This guide will walk you through the VirtualBox setup. Alternatively to this guide, you can also use instructions on WikiHow here.

Download Ubuntu

You will use this downloaded Ubuntu OS through VirtualBox.

  • Download from 'Ubuntu Desktop' from here

Get VirtualBox

  • Download VirtualBox from the download page. Choose the version for OS X (Download Page)
  • Install VirtualBox by double-clicking the downloaded .dmg file and following the instructions in the installer

Create new Ubuntu Virtual Machine

  • Open VirtualBox
  • Click 'New'
  • Select the follow parameters:
    • Screen 1 (Memory Size: Choose around 50% of your RAM to allow sufficient space for Ubuntu to run. In my example this is 8000 MB)
    • Screen 2 'Hard Disk': Choose default 'Create a virtual hard disk now'
    • Screen 3 'Hard Disk file type': Choose default 'VDI (VirtualBox Disk Image)'
    • Screen 4 'Storage on physical hard disk': Choose default 'Dynamically allocated'
    • Screen 5 'File location and size': Change to 20,00 GB

Set up Ubuntu

Launch Ubuntu for the first time

  1. Click on your newly created image
  2. Select 'Settings'
  3. Select 'Storage'
  4. Add CD image by clicking the CD symbol
  5. Click 'Choose Disk' and select the Ubuntu .iso image file you downloaded earlier
  6. Confirm with 'OK'
  7. Run Ubuntu by double-clicking or clicking 'Start'
  8. Choose your language
  9. Select 'Install Ubuntu'
  10. Check 'Download updates while installing Ubuntu'
  11. Use the default option 'Erase disk and install Ubuntu'. Don't worry, the warning relates to what VirtualBox sees. VirtualBox has no knowledge of and access to your actual OS, it lives in a virtual machine only.
  12. Select 'Continue' on the 'Write the changes to disk' screen.
  13. Continue through the setup wizard for your location and keyboard layout
  14. Enter your details in 'Who are you'. I suggest to keep it simply. This will be the login and password to use to access/unlock Ubuntu on your virtual machine, so remember or write this down.
  15. Let the installation finish and restart Ubuntu with 'Restart Now'

Additional pre-requisities in Ubuntu

There are some additional applications that we want to install to support our work on the Bitcoin Node and overall make things easier to use. Select to the 'Application Software' icon in the navigation on the left and install:

  1. Installing Build Essentials
    The build-essential software contains an informational list of software’s which are treated as important for building Debian packages including gcc compiler, make and other needed tools.
    sudo apt install build-essential
  2. Setting up Share Folders and Clipboard
    This will help exchange files and do copy/paste between your local machine and Ubuntu
  • While Ubunutu is running, look for the VirtualBox application menu, go to the main Menu -> Devices -> Insert Guest Addition CD image
  • Select Run and enter your Ubuntu password and click Authenticate.
  • Wait the script to run and at the end press return to close the terminal window
    1. Folders
    • Go to the main Menu -> Devices -> Shared Folders -> Shared Folder Settings
    • Select the small Add Folder icon
    • Select 'Other' and choose your Downloads folder and check Auto-Mountand '. You can choose any folder you want, but I suggest using the downloads folder to have direct access to downloaded files later.
    • Verify your Folder is added and select OK
    1. Clipboard
    • Go to the main Menu -> Devices -> Shared clipboard -> Bidirectional
    • Open Search your Computer -> type Terminal -> Open the Terminal application
    • type: sudo adduser [your-Ubuntu-user-name] vboxsf (note that copy/pasting does not work just yet).
    • Enter your Ubuntu user password and hit enter. This should look like this:
    • Close the Terminal window
    • In order for the shared folders and clipboard to take effect, you need to restart. On the top-right cogwheel select 'Shut down' then 'Restart' to restart Ubuntu after the installation
    • Now when you open you 'Finder' you should see your shared folder called 'sf_Downloads'
    • Copy/Paste will now also work between your machine and Ubuntu, however the keyboard shortcuts are likely different. Instead of 'cmd-c or p' on Mac, you will need to use 'shift-ctrl-c or p' in Ubuntu. Alternatively, just use right-click and 'paste'.
  1. P7Zip
  • Launch Termininal and installP7Zip - the unzip software you need for some of your downloads
  • Enter sudo apt-get install p7zip-full
  • You will be prompted for your Ubuntu password and it should look like this:
  1. Etcher
  • Launch your browser
  • Download Etcher from here
  • Navigate to the Download folder and right-click Extract Here
  • You will use this software to copy the Debian OS onto your SD card later. You might only require Etcher on your local machine and not on your Virtualbox. More on that later.

Performance Tuning your virtual Ubuntu instance and Miscellaneous

Ubuntu runs a bit sluggish with the default settings. It is highly recommended to also carry out these configuration tweaks next to ensure you have a smooth Ubuntu experience.

  1. Shut down your Ubuntu
  2. In VirtualBox choose Settings and System
    • On the Motherboard tab uncheck Floppy
    • Also set your set your Base Memoryto about 50% of your RAM, in my case 8000 MB
  3. Choose Processor tab
    • Increase Processors to 2
    • Check `Enable PAE/NX``
  4. Choose Display and Screen tab
    • Increase Video Memory to 64 MB
  5. Choose Network and Adapter 1 tab
    • For Attached tochoose NAT
    • For Name choose your Wifi adapter
  6. IGNORE FOR NOW (START) - Choose Network and Adapter 2 tab
    • Check Enable Network Adapter
    • For Attached tochoose Host-only Adapter
    • For Name choose vboxnet0 *** . -- IGNORE FOR NOW (STOP)
  7. Click OK to finish

Create a Backup

In order to keep all those settings for the future and in case you need to experiment with installs or at any point in team want to revert back to this clean configuration you can create backup which is called a snapshot:

  1. Ensure you Ubuntu is shut down
  2. Click on your instance in VB and select Take. Select an appropriate name and description for your snapshot
  3. At any point in time you can right-click this snapshot and select Restore to bring back your original setting.

Compare the VirtualBox User Manual for more details


NEXT CHAPTER: Setting up your Node