pine64

My PINE64+ 1GB has arrived and, of course, I’m already playing around with it.

First of all I needed a bootable ubuntu image so I went on the official forum and checked if there was something ready to be used.

Fortunately there are a bunch of good guys there that make good things happen. One of these guys is longsleep, the only user who released a fully working ubuntu 16.04 image so far and many thanks goes to him for his work.

These are the steps you need to follow in order to install ubuntu 16.06 xenial on your PINE64 using a mac computer:

  • Download the latest image file from here (versions might vary with the time)
  • Extract the .img file
  • Flash the .img file into the SD card using the following commands:

*Assuming that your SD card is mounted under /dev/disk2 (otherwise change the number 2 with the appropriate of your system)

# diskutil unmountDisk /dev/disk2
# sudo dd if=/path_to_your_file/xenial-pine64-bspkernel-*.img of=/dev/rdisk2 bs=32m

The last command will take few minutes to complete so be patient

  • Unmount the SD from your mac
  • Insert the SD on your PINE64 and power it up
  • Wait for ubuntu to boot
  • Login using the following credentials:
# username: ubuntu
# password: ubuntu
  • Change the credential with a more secure one
  • Enjoy your PINE64 with the latest ubuntu version

Kudos to the fantastic PINE64’s team who kindly decided to send me a board free of charge in order to test it and document what I will run on top of it with the aim of supporting its community. Keep the good work up!

Stay tuned for more exciting how-to articles!

** Thanks to Lars Hansen for adding some details on how to flash an img file from a Windows computer.

  • Download Win32 DiskImager
  • Extract the .img from the .xz file using 7zip
  • Write the image to the SD card using DiskImager.
  • Insert SD card into Pine64, and boot up.

I’ve been playing around with .onion domain names for a while, tried various hash generator tools and get, more or less, custom domain names.

There are multiple tools out there to hash generate but the one that works better for me is, with no doubt, scallion.

Scallion lets you create vanity GPG keys and .onion addresses (for Tor’s hidden services) using OpenCL.

What are valid characters?

  • Tor .onion addresses use Base32, consisting of all letters and the digits 2 through 7, inclusive. They are case-insensitive.
  • GPG fingerprints use hexadecimal, consisting of the digits 0-9 and the letters A-F.

The main reason for preferring scallion to other tools is basically because it is GPU-based, obviously under Windows (linux has several issues with graphic card drivers).

If you are interested on generating your own .onion domain name, you can follow these simple steps:

  • Download scallion
  • Unzip the gpg.zip file
  • Download and install Visual Studio Express
  • Download and intall mono
  • Open ‘scallion.sln’ in Visual Studio Express
  • Build the solution, I did everything in debug mode.

Once all the above steps are completed, open a terminal and use these commands:

  • List devices:
$ mono scallion/bin/Debug/scallion.exe -l
  • Generate a hash:
$ mono C:\path\scallion.exe name_you_want_to_generate

SHA1 hashing is done on the GPU. The hashrates for several GPUs that have been tested are below:

GPU Speed
nVidia Quadro K2000M 90 MH/s
AMD Radeon HD5770 520 MH/s
AMD Radeon HD6850 600 MH/s
NVIDIA GTS 250 128 MH/s
Intel i7-2620M 9.9 MH/s
NVIDIA GTX 970 2350 MH/s

*MH/s = million hashes per second

Enjoy your vanity .onion addresses.

If, like myself, you need to choose from which country you get out on the internet using Tor, all what you need to do is to edit your “/etc/tor/torrc” (for Linux) – %appdata%/tor (for Windows) file adding or modifying the following settings:

StrictExitNodes 1
ExitNodes {Country_Code}

You can add comma if you’d like to use more than one exit node:

StrictExitNodes 1
ExitNodes {Country_Code_1},{Country_Code_2}

Or, if you don’t want to get out from a specific country:

StrictExitNodes 1
ExcludeExitNodes {Country_Code_1}

Here is a list of Tor country codes:

Country                               Abbrev
ASCENSION ISLAND                      {ac}
AFGHANISTAN                           {af}
ALAND                                 {ax}
ALBANIA                               {al}
ALGERIA                               {dz}
ANDORRA                               {ad}
ANGOLA                                {ao}
ANGUILLA                              {ai}
ANTARCTICA                            {aq}
ANTIGUA AND BARBUDA                   {ag}
ARGENTINA REPUBLIC                    {ar}
ARMENIA                               {am}
ARUBA                                 {aw}
AUSTRALIA                             {au}
AUSTRIA                               {at}
AZERBAIJAN                            {az}
BAHAMAS                               {bs}
BAHRAIN                               {bh}
BANGLADESH                            {bd}
BARBADOS                              {bb}
BELARUS                               {by}
BELGIUM                               {be}
BELIZE                                {bz}
BENIN                                 {bj}
BERMUDA                               {bm}
BHUTAN                                {bt}
BOLIVIA                               {bo}
BOSNIA AND HERZEGOVINA                {ba}
BOTSWANA                              {bw}
BOUVET ISLAND                         {bv}
BRAZIL                                {br}
BRITISH INDIAN OCEAN TERR             {io}
BRITISH VIRGIN ISLANDS                {vg}
BRUNEI DARUSSALAM                     {bn}
BULGARIA                              {bg}
BURKINA FASO                          {bf}
BURUNDI                               {bi}
CAMBODIA                              {kh}
CAMEROON                              {cm}
CANADA                                {ca}
CAPE VERDE                            {cv}
CAYMAN ISLANDS                        {ky}
CENTRAL AFRICAN REPUBLIC              {cf}
CHAD                                  {td}
CHILE                                 {cl}
PEOPLE'S REPUBLIC OF CHINA            {cn}
CHRISTMAS ISLANDS                     {cx}
COCOS ISLANDS                         {cc}
COLOMBIA                              {co}
COMORAS                               {km}
CONGO                                 {cg}
CONGO (DEMOCRATIC REPUBLIC)           {cd}
COOK ISLANDS                          {ck}
COSTA RICA                            {cr}
COTE D IVOIRE                         {ci}
CROATIA                               {hr}
CUBA                                  {cu}
CYPRUS                                {cy}
CZECH REPUBLIC                        {cz}
DENMARK                               {dk}
DJIBOUTI                              {dj}
DOMINICA                              {dm}
DOMINICAN REPUBLIC                    {do}
EAST TIMOR                            {tp}
ECUADOR                               {ec}
EGYPT                                 {eg}
EL SALVADOR                           {sv}
EQUATORIAL GUINEA                     {gq}
ESTONIA                               {ee}
ETHIOPIA                              {et}
FALKLAND ISLANDS                      {fk}
FAROE ISLANDS                         {fo}
FIJI                                  {fj}
FINLAND                               {fi}
FRANCE                                {fr}
FRANCE METROPOLITAN                   {fx}
FRENCH GUIANA                         {gf}
FRENCH POLYNESIA                      {pf}
FRENCH SOUTHERN TERRITORIES           {tf}
GABON                                 {ga}
GAMBIA                                {gm}
GEORGIA                               {ge}
GERMANY                               {de}
GHANA                                 {gh}
GIBRALTER                             {gi}
GREECE                                {gr}
GREENLAND                             {gl}
GRENADA                               {gd}
GUADELOUPE                            {gp}
GUAM                                  {gu}
GUATEMALA                             {gt}
GUINEA                                {gn}
GUINEA-BISSAU                         {gw}
GUYANA                                {gy}
HAITI                                 {ht}
HEARD & MCDONALD ISLAND           {hm}
HONDURAS                              {hn}
HONG KONG                             {hk}
HUNGARY                               {hu}
ICELAND                               {is}
INDIA                                 {in}
INDONESIA                             {id}
IRAN, ISLAMIC REPUBLIC OF             {ir}
IRAQ                                  {iq}
IRELAND                               {ie}
ISLE OF MAN                           {im}
ISRAEL                                {il}
ITALY                                 {it}
JAMAICA                               {jm}
JAPAN                                 {jp}
JORDAN                                {jo}
KAZAKHSTAN                            {kz}
KENYA                                 {ke}
KIRIBATI                              {ki}
KOREA, DEM. PEOPLES REP OF            {kp}
KOREA, REPUBLIC OF                    {kr}
KUWAIT                                {kw}
KYRGYZSTAN                            {kg}
LAO PEOPLE'S DEM. REPUBLIC            {la}
LATVIA                                {lv}
LEBANON                               {lb}
LESOTHO                               {ls}
LIBERIA                               {lr}
LIBYAN ARAB JAMAHIRIYA                {ly}
LIECHTENSTEIN                         {li}
LITHUANIA                             {lt}
LUXEMBOURG                            {lu}
MACAO                                 {mo}
MACEDONIA                             {mk}
MADAGASCAR                            {mg}
MALAWI                                {mw}
MALAYSIA                              {my}
MALDIVES                              {mv}
MALI                                  {ml}
MALTA                                 {mt}
MARSHALL ISLANDS                      {mh}
MARTINIQUE                            {mq}
MAURITANIA                            {mr}
MAURITIUS                             {mu}
MAYOTTE                               {yt}
MEXICO                                {mx}
MICRONESIA                            {fm}
MOLDAVA REPUBLIC OF                   {md}
MONACO                                {mc}
MONGOLIA                              {mn}
MONTENEGRO                            {me}
MONTSERRAT                            {ms}
MOROCCO                               {ma}
MOZAMBIQUE                            {mz}
MYANMAR                               {mm}
NAMIBIA                               {na}
NAURU                                 {nr}
NEPAL                                 {np}
NETHERLANDS ANTILLES                  {an}
NETHERLANDS, THE                      {nl}
NEW CALEDONIA                         {nc}
NEW ZEALAND                           {nz}
NICARAGUA                             {ni}
NIGER                                 {ne}
NIGERIA                               {ng}
NIUE                                  {nu}
NORFOLK ISLAND                        {nf}
NORTHERN MARIANA ISLANDS              {mp}
NORWAY                                {no}
OMAN                                  {om}
PAKISTAN                              {pk}
PALAU                                 {pw}
PALESTINE                             {ps}
PANAMA                                {pa}
PAPUA NEW GUINEA                      {pg}
PARAGUAY                              {py}
PERU                                  {pe}
PHILIPPINES (REPUBLIC OF THE)         {ph}
PITCAIRN                              {pn}
POLAND                                {pl}
PORTUGAL                              {pt}
PUERTO RICO                           {pr}
QATAR                                 {qa}
REUNION                               {re}
ROMANIA                               {ro}
RUSSIAN FEDERATION                    {ru}
RWANDA                                {rw}
SAMOA                                 {ws}
SAN MARINO                            {sm}
SAO TOME/PRINCIPE                     {st}
SAUDI ARABIA                          {sa}
SCOTLAND                              {uk}
SENEGAL                               {sn}
SERBIA                                {rs}
SEYCHELLES                            {sc}
SIERRA LEONE                          {sl}
SINGAPORE                             {sg}
SLOVAKIA                              {sk}
SLOVENIA                              {si}
SOLOMON ISLANDS                       {sb}
SOMALIA                               {so}
SOMOA,GILBERT,ELLICE ISLANDS          {as}
SOUTH AFRICA                          {za}
SOUTH GEORGIA, SOUTH SANDWICH ISLANDS {gs}
SOVIET UNION                          {su}
SPAIN                                 {es}
SRI LANKA                             {lk}
ST. HELENA                            {sh}
ST. KITTS AND NEVIS                   {kn}
ST. LUCIA                             {lc}
ST. PIERRE AND MIQUELON               {pm}
ST. VINCENT & THE GRENADINES      {vc}
SUDAN                                 {sd}
SURINAME                              {sr}
SVALBARD AND JAN MAYEN                {sj}
SWAZILAND                             {sz}
SWEDEN                                {se}
SWITZERLAND                           {ch}
SYRIAN ARAB REPUBLIC                  {sy}
TAIWAN                                {tw}
TAJIKISTAN                            {tj}
TANZANIA, UNITED REPUBLIC OF          {tz}
THAILAND                              {th}
TOGO                                  {tg}
TOKELAU                               {tk}
TONGA                                 {to}
TRINIDAD AND TOBAGO                   {tt}
TUNISIA                               {tn}
TURKEY                                {tr}
TURKMENISTAN                          {tm}
TURKS AND CALCOS ISLANDS              {tc}
TUVALU                                {tv}
UGANDA                                {ug}
UKRAINE                               {ua}
UNITED ARAB EMIRATES                  {ae}
UNITED KINGDOM (no new registrations) {gb}
UNITED KINGDOM                        {uk}
UNITED STATES                         {us}
UNITED STATES MINOR OUTL.IS.          {um}
URUGUAY                               {uy}
UZBEKISTAN                            {uz}
VANUATU                               {vu}
VATICAN CITY STATE                    {va}
VENEZUELA                             {ve}
VIET NAM                              {vn}
VIRGIN ISLANDS (USA)                  {vi}
WALLIS AND FUTUNA ISLANDS             {wf}
WESTERN SAHARA                        {eh}
YEMEN                                 {ye}
ZAMBIA                                {zm}
ZIMBABWE                              {zw}

I’ve never liked the standard colour path of OSX terminal and, not surprisingly, I didn’t like even the one that comes within Yosemite.

If you are like myself and you want to add some colours in your terminal, here is how you can do it:

  • open the Terminal
  • create a file called “.bash_profile” using your favourite text editor
  • add these lines into it:
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
export PS1="\[\e[00;31m\][\h@\u]\[\e[0m\]\[\e[00;37m\] > \[\e[0m\]\[\e[00;32m\]\w\[\e[0m\]\[\e[00;37m\] : \[\e[0m\]"
alias ll='ls -ltr'
  • save and close the file
  • restart your Terminal

The final result will be a Terminal coloured like the following one, showing “[hostname@user] > path :”

terminal

If you want to make your own combination of colours you can easily get your config using this web app https://bashrcgenerator.com/