Sunday, 23 February 2014

BBB: Install Archlinux to eMMC on any OS

With a new BBB with default distro Angstrom:

# Boot on Angstrom SD Image. Keep network cable attached, to get up to date system clock.
# What we will do:
# 1: Unmount and format boot and root partition on MMC, remount
# 2: Copy Archlinux boot and root files to respective folders
# 3: Reboot and set up Archlinux
# Read this for another perspective:
# This procedure created on 23.02.2014

# MMC device is
# /dev/mmcblk1
# Partition 1: boot requires boot flag
# /dev/mmcblk1p1
# Partition 2: root
# /dev/mmcblk1p2

# Unmount all partitions on the MMC
umount /dev/mmcblk1p1
umount /dev/mmcblk1p2

# Make and format filesystem, you may need to re-add partitions as FAT16
mkfs.vfat -F 16 /dev/mmcblk1p1
mkfs.ext4 /dev/mmcblk1p2


mkdir boot
mount /dev/mmcblk1p1 boot/
tar -xvf BeagleBone-bootloader.tar.gz -C boot/
# Ignore permission isssues, three files in boot now
umount boot

mkdir root
mount /dev/mmcblk1p2 root/
tar -xf ArchLinuxARM-am33x-latest.tar.gz -C root/
# If you get timestamp errors, ignore them. You forgot to keep connection to internet, to set systemclock.
umount root

# Reboot without SD card inserted. Default action is to boot SD card. SSH to IP.

passwd # Enter <rootpass>

# Set hostname
hostnamectl set-hostname kali

# Unsure of available timezones? timedatectl list-timezones
timedatectl set-timezone Europe/Oslo

# Check if correct date time?

# Initialize package manager key
pacman-key --init

# Do full upgrade, say Yes where applicable
pacman -Syu

# Check available MMC space, you should have ~1.1 GiB
df -h

# SSH back in and install your applications, set them up and enjoy
pacman -S vim mlocate screen

# Add radio if you want
pacman -S rtl-sdr
pacman -S gnuradio

# Add X if you want
pacman -S xfce4

# Add irssi client if you want
pacman -S irssi

# Add gcc compiler if you want
pacman -S gcc

Saturday, 1 February 2014

RPi: Install Raspbian to Pi on OS X

Goal of this post

Get you started with the Raspberry Pi Model B with as little extra hardware as possible.

What you need

  • Raspberry Pi Model B
  • SD Card 8 GiB Class 10
  • Micro-USB cable for power
  • Network cable for communication
  • A computer
  • Network router (optional)
  • External power supply for Raspberry Pi (5V, ~1A) (optional, very recommended)

What you do

Take careful note of everything in bold red, you might need to change these fields.

Prepare SD Card

  1. Download latest Raspbian operating system -
  2. Open Terminal
  3. df -h
  4. Insert SD Card into computer
  5. df -h (Note rdisk-number for SD Card, ex: /dev/disk1s1)
  6. sudo diskutil unmount /dev/disk1s1
  7. sudo dd bs=1m if=~/Downloads/2013-02-09-wheezy-raspbian.img of=/dev/rdisk1
  8. Wait until dd has done its job, around 2-3 minutes
  9. sudo diskutil eject /dev/rdisk1
  10. Remove SD Card and insert into Raspberry Pi
  11. Plug Raspberry Pi into network and attach power, three leds should light up, indicating power and network connection

Discover Raspberry Pi network address

Either use a network scan for port 22 (SSH) or log in to your router and check DHCP leases.

Make SSH connection

  1. Open Terminal
  2. ssh pi@
  3. Default password is "raspberry"
  4. Run raspb-config and set up your own settings
  5. Go Crazy.