Installing Arch Linux on the Pinebook Pro

The pinebook pro is a beautiful 64-bit ARM based laptop, that reminds me of the form factor of a modern macbook air, shipping with a premium magnesium alloy shell, 128GB eMMC and a 10,000 mAH battery. All this for $200. As a NIX machine, I decided to stick with Arch Linux, but have plans to one day install OpenBSD on it. A big thanks to the team (Nadia Holmquist Pedersen) who has put together a pre-built flashable Arch Linux image, tailored for ARM and specially some of the hardware in the Pinebook Pro.
Read more →

Linux Storage and File Systems

Partitioning Two popular partition schemes are used in the wild, MBR and GPT. MBR MBR, or Master Boot Record, often associated with BIOS, was introduced in 1983 with IBM PC DOS 2.0, is a special boot sector located at the beginning of a drive. This sector contains a boot loader (e.g GRUB), and details about the logical partitions. MBR supports drives upto 2TiB, and up to 4 primary partitions.

fdisk /dev/vda Welcome to fdisk (util-linux 2.

Read more →

C

If you need a compiler and build system, my post on [make]({% post_url 2016-10-09-make %}) and GCC could be handy. Philosophy Rob Pike’s 5 Rules of Programming Source You can’t tell where a program is going to spend its time. Bottlenecks occur in surprising places, so don’t try to second guess and put in a speed hack until you’ve proven that’s where the bottleneck is. Measure. Don’t tune for speed until you’ve measured, and even then don’t unless one part of the code overwhelms the rest.
Read more →

make

A small orientation guide, to getting a gcc and make C development environment running. Assuming everything is installed on your system. Example source tree (physical organisation) is as follows: seething ├── include │ ├── allheads.h │ ├── engine │ │ └── safe_sum.h │ ├── logger.h │ ├── one_loney_integer.h │ └── person.h ├── src │ ├── engine │ │ └── safe_sum.c │ ├── logger.c │ ├── main.c │ ├── person.c │ └── person_tests.
Read more →

Linux Ops Guide

Here I aim to cover a set of common administration tasks. Things like, the hostname, system logs, what users are currently logged in, physical devices that are connected, logical volumes, file system and inode allocation, attached network interfaces and their addressing, processes and daemons currently running, kernel verison, local users and groups, installed packages, remote mounts, network shares, system uptime, bread and butter OS stats (CPU, IO, network, memory). Booting shutdown -r +5 System going down for a reboot #wall broadcast msg shutdown -c #cancel reboot shutdown -r 00:00 #schedule for midnight shutdown -h +5 #halt system in 5 mins shutdown -h now Alternatively, just use systemd:
Read more →

Secure SHell (SSH)

The OpenSSH secure shell, ssh, provides the necessary client/server security plumbing, to allow shell execution on a remote machine. ssh can be used interactively, as per a normal shell, or to run one off commands, for example: $ ssh ben@wookie.local uname -a ben@wookie.local’s password: Linux wookie.local 3.14-1-686-pae #1 SMP Debian 3.14.7-1 (2014-06-16) i686 GNU/Linux Hot tip: the w command is gem for showing users currently logged in $ w -f USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT ben tty2 :0 17:05 10:36m 16:53 50.
Read more →