Wednesday, 16 April 2014

Install ArchLinux

We need

  • Raspberry Pi
  • SD Card, minium 4GB
  • Power supply
  • LAN connection and Wi-Fi router
  • PC with SD card connector (I describe operation on Ubuntu, it's possible use Windows)


Install image ArchLinux


Download image ArchLinux from http://www.raspberrypi.org/downloads/


unpack:
$ unzip ./ArchLinuxARM-2014.01-rpi.img.zip

call command:
$ lsblk

example response:
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sr0     11:0    1  1024M  0 rom 
sde      8:64   0 929.5G  0 disk
├─sde1   8:65   0   100M  0 part
├─sde2   8:66   0  97.6G  0 part
├─sde3   8:67   0     1K  0 part
├─sde4   8:68   0  1023K  0 part
├─sde5   8:69   0   293G  0 part /
├─sde6   8:70   0     8G  0 part [SWAP]
└─sde7   8:71   0 530.9G  0 part

insert SD card, wait few seconds and call again:
$ lsblk

example response:
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sr0     11:0    1  1024M  0 rom 
sda      8:0    1  14.9G  0 disk
└─sda1   8:1    1  14.9G  0 part /media/0C11-B443
sde      8:64   0 929.5G  0 disk
├─sde1   8:65   0   100M  0 part
├─sde2   8:66   0  97.6G  0 part
├─sde3   8:67   0     1K  0 part
├─sde4   8:68   0  1023K  0 part
├─sde5   8:69   0   293G  0 part /
├─sde6   8:70   0     8G  0 part [SWAP]
└─sde7   8:71   0 530.9G  0 part

On the second call, we see an additional drive sda. On my computer it is sda, on the other may be another drive. You need to be sure 100% that actually you call the name of the inserted SD card.

copy linux image to sd card (WARNING: change sda to name in your system. If you enter the wrong parameter, you can delete your data on HDD!):
$ sudo dd if=./ArchLinuxARM-2014.01-rpi.img of=/dev/sda bs=4096
next call:
$ sudo sync

Default ArchLinux image create 2GB partition. You can use the GParted to expand the partition to the entire SD card.

Screen before changes.


Screen after changes.


Insert SD card to Raspberry Pi, insert Wi-Fi dongle, connect LAN cable and supply power. In my description you don't need connect keyboard and monitor to Raspberry.

We have to wait a few minutes and we scan network from your PC (we need to determine Raspberry IP address):
$ sudo nmap -sP 192.168.1.*


You can compare results before and after connection Raspberry. New IP address is probably Raspberry Pi address. In my example is it 192.168.1.102. We can login via ssh:
$ ssh root@192.168.1.102

Default password is root

Change password, call:
# passwd
Upgrade ArchLinux:
# pacman -Syu

Real time clock


RaPi doesn't have a real-time clock. In many cases, time is needed (for example, an HTTPS connection and verification certificates). We can install Network Time Protocol daemon:
# pacman -S ntp
 We can check the current date and time, call:
# date
If the time is in the wrong time zone, we can change it. Below are a few useful commands.

To check the current zone:
# timedatectl status
To list available zones:
# timedatectl list-timezones
To change the time zone to the Warsaw zone:
# timedatectl set-timezone Europe/Warsaw


links:
http://www.raspberrypi.org/downloads/
http://superuser.com/questions/352598/how-to-find-the-dev-name-of-my-usb-device
http://raspberrypi.stackexchange.com/questions/266/how-can-i-keep-system-time
https://wiki.archlinux.org/index.php/time
 

No comments:

Post a Comment

Note: only a member of this blog may post a comment.