Sunday, August 13, 2017

Pinebook: Installing Armbian

I just got my Pinebook last week. If you don't know what a Pinebook is: here. I have a couple of pine64's and they are pretty cool. I'm using them as servers, and not using the GPIO or Euler Bus. But the Pinebook is different.

Disclaimer: If you brick your Pinebook, I'm sorry - this is just how I installed Armbian on mine.

Please see Update 3 at the bottom - It was much easier to use Armbian's install tool. My way worked - but there was a lot more effort involved.

The first thing I had to do was, of course, charge the battery. I guess I've learned patience over the years.

After charging the battery, and turning it on, I was able to get a feel for the machine. I have to say that it is one slick little machine. I was only able to get the 14" version, 11" was not an option. And I waited quite a while for it (them). I had originally registered on the waiting list with one email address - but I waited so long that I figured it got lost or something - so I registered with another email address. This gave me the opportunity to purchase two, which I did. The second is on its way.

Aside from the extravagant shipping costs, it's a really inexpensive machine (US $99). It doesn't have a LAN port, but that's about all it's lacking. WiFi, Bluetooth, Micro-SD slot, and two USB ports. I don't know if either is USB-3, tbh.

The distro it shipped with has issues, though. During my initial drive - I caught a segmentation fault from Java. This is easy enough to work around - I installed Oracle's Java which worked fine. But then I ran 'man' and it was broke. I've been using Linux for a while now, and why memorize stuff when you have man right there to remind you? I have a low threshold for that kind of thing. I didn't want to invest a bunch of time and find out something else was broke.

I have had such good luck with Armbian that I wanted to give it a try. They only have Ubuntu versions available for Pinebook, which is OK. I prefer Debian, but the Pinebook version comes with a root user built-in. I'm so happy with Armbian that I donated a small amount (More than a beer, but less than a Pinebook).

I actually got the image using Pine's pine64-installer, which I got from their website. I downloaded the available Armbian image and burned it to a SD card, and booted the Pinebook with it installed. When an SD card is inserted, the Pinebook defaults to booting the SD card instead of the emmc. This gave me a chance to try it out and see if anything was broken. Everything worked fine, including man.

Then, I shut down the Pinebook and removed the SD card. I copied the image (from ~/.config/pine64-installer/downloadedImage) to the card, and restarted the Pinebook. By that, I mean I cp'd the image to /home/panchod/ on the SD card. The short version is that I then dd'd the image from the SD card to /dev/mmcblk0. (sudo dd if=/home/panchod/<imageFileName> of=/dev/mmcblk0 bs=4M) Rebooted (without the SD card inserted) and boom - a working Armbian computer.

I say short version because I tried some stuff in the middle there. Once I realized (thanks to parted) that /dev/mmcblkboot0 was not a part of mmcblk0, I tried writing the image directly to the root of the volume. This is what worked.

I haven't tried it yet - but there's a shortcut on the default XFCE4 desktop called "Config". Opening that yields an ncurses application - and one of the options of that application is <Install>. I bet that would work, too. I'll let you know when the new one gets here. I ordered the 64GB emmc, so I'll have to change that out first.

All-in-all I'm very pleased with the Pinebook so far. Just for a goof, I compiled sqlite on it, and it works great. I have MySQL5.7 compiled for a pine64 - I wonder if it will work on the Pinebook. Armbian came with build-essential already built-in. I'll scp the client over - don't really need a server when I've got one running on the pine64.

That's it - please let me know if you run into any issues - or if you have an easier way.

Oh, yeah - almost forgot. I don't want to complain about pine64.org, but I'm going to anyway. I didn't try to reach tech support, pretty sure it only exists as a wiki and a forum. I didn't find anything on their forum about writing an 'outside' distro to the emmc. They only have two images that will automatically write themselves to the emmc: One is Android and the other is Ubuntu/Mate. I didn't want the Ubuntu/Mate one - I'm thinking that's the same as what the computer came with.

Linux is about freedom - and I think it would be a good idea to be make it easy to change distros on the Pinebook. I've been dying to give Linux From Scratch another go - and it would be awesome if I could do it on a Pinebook

Update 1: Both USB ports are 2.0

Update 2: The MySQL5.7 client that I compiled for the Pine64 works just fine on Pinebook. I thought it would. I just now checked apt-cache and it says they have mysql-server5.7 available (and default). I guess I didn't need to compile it after all - but I would swear that it wasn't available at that time.

Update 3: My new Pinebook came today, and I replaced the emmc module with the 64GB one (which had an Android image on it already). I ran Armbian off of the Micro-SD card, and this time I installed to the emmc using the Config program I mentioned above. It worked flawlessly.

2 comments:

  1. So how does the Pinebook work? I haven't found any real impressions of it. I'm thinking of getting one to replace an old tablet. I know, different animals, but I really just want a lite weight, smallish computer to play a few simple games (solitare and maybe Mahjong, things like that) and occasionally look up something on the internet. This appears to be small and light enough, and still has some "fun factor" that I can experiment with a little. Not looking for a speed demon, but not a slug either. Ambian seems to be a good choice, but maybe the Android version would be better? My old tablet is a dual core ARM...

    ReplyDelete
  2. I'm not entirely sure how to answer that. I'm writing this comment using my Pinebook and Firefox. Armbian is a full Linux distro - with just about any game that Debian supports (including pysolfc (solitaire) and Mahjong). But you can also use it as a regular work station. It's a computer. I use mine just like a Linux laptop. Internet with Firefox, Email with Thunderbird, games, Libre Office, ssh client, and the like.

    For example, just for a goof I compiled sqlite3 from source on my Pinebook.

    I have no experience with the Android image - so you're on your own there.

    ReplyDelete