- Download Image
- Unzip Image
- Copy Image on SD Card (dd if=./ArchLinuxARM-2014.03-rpi.img of=/dev/disk2)
- Boot Raspberry Pi
-
Find out IP
-
Password is root
[root@alarmpi ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 1.7G 415M 1.1G 27% /
devtmpfs 84M 0 84M 0% /dev
tmpfs 232M 0 232M 0% /dev/shm
tmpfs 232M 288K 231M 1% /run
tmpfs 232M 0 232M 0% /sys/fs/cgroup
tmpfs 232M 0 232M 0% /tmp
/dev/mmcblk0p1 90M 25M 66M 28% /boot
-
Open fdisk
[root@alarmpi ~]# fdisk /dev/mmcblk0
Welcome to fdisk (util-linux 2.24.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help):
-
Press ‘p’ to print the partition table:
Welcome to fdisk (util-linux 2.24.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/mmcblk0: 14.7 GiB, 15811477504 bytes, 30881792 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x417ee54b Device Boot Start End Blocks Id System /dev/mmcblk0p1 2048 186367 92160 c W95 FAT32 (LBA) /dev/mmcblk0p2 186368 3667967 1740800 5 Extended /dev/mmcblk0p5 188416 3667967 1739776 83 Linux
-
Press 'd' to delete a partition:
- Enter '2' to choose the second partition.
Command (m for help): d Partition number (1,2,5, default 5): 2 Partition 2 has been deleted.
-
Press 'n' to create a new partition:
- Enter 'e' to select extended as partition type.
- Partition number: to accept 2 as default partition number.
- First sector: to accept default.
- Last sector: to accept default.
Command (m for help): n Partition type: p primary (1 primary, 0 extended, 3 free) e extended Select (default p): e Partition number (2-4, default 2): 2 First sector (186368-30881791, default 186368): Last sector, +sectors or +size{K,M,G,T,P} (186368-30881791, default 30881791): Created a new partition 2 of type 'Extended' and of size 14.7 GiB.
-
Press 'n' to create a new partition:
- Enter 'l' to select logical as partition type.
- First sector: to accept default.
- Last sector: to accept default.
Command (m for help): n Partition type: p primary (1 primary, 1 extended, 2 free) l logical (numbered from 5) Select (default p): l Adding logical partition 5 First sector (188416-30881791, default 188416): Last sector, +sectors or +size{K,M,G,T,P} (188416-30881791, default 30881791): Created a new partition 5 of type 'Linux' and of size 14.7 GiB.
-
Press 'w' to write the new partition table.
Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Re-reading the partition table failed.: Device or resource busy The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8). [root@alarmpi ~]#
-
Reboot to force the kernel to recognize the new parition table
[root@alarmpi ~]# reboot
-
Reconnect to raspberry
-
Execute following command
[root@alarmpi ~]# resize2fs /dev/mmcblk0p5
resize2fs 1.42.9 (28-Dec-2013) Filesystem at /dev/mmcblk0p5 is mounted on /; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 The filesystem on /dev/mmcblk0p5 is now 3836672 blocks long.
-
Control if everythink worked
[root@alarmpi ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/root 15G 416M 14G 3% / devtmpfs 84M 0 84M 0% /dev tmpfs 232M 0 232M 0% /dev/shm tmpfs 232M 288K 231M 1% /run tmpfs 232M 0 232M 0% /sys/fs/cgroup tmpfs 232M 0 232M 0% /tmp /dev/mmcblk0p1 90M 25M 66M 28% /boot
-
Find out the current configured timezone
[root@alarmpi ~]# timedatectl status
-
List avaiable timezones
[root@alarmpi ~]# timedatectl list-timezones
-
Set your timezone (for example Europe/Berlin)
[root@alarmpi ~]# timedatectl set-timezone Europe/Berlin
-
Set the hostname to your liking (e.g. arch):
[root@alarmpi ~]# hostnamectl set-hostname arch
-
Add the same hostname to /etc/hosts:
[root@alarmpi ~]# nano /etc/hosts
# # /etc/hosts: static lookup table for host names # #<ip-address> <hostname.domain.org> <hostname> 127.0.0.1 localhost.localdomain localhost arch ::1 localhost.localdomain localhost arch # End of file
- After you add your hostname press "crtl+x", "y" and hit "enter" to exit nano and save your changes
-
Docker with the needed kernel extensions
[root@alarmpi ~]# wget -O - https://raw.github.com/resin-io/docker-install-script/master/install.sh | sh
-
Enable ip forwarding
[root@alarmpi ~]# echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.d/40-ip-forward.conf
-
Enable docker service at startup
[root@alarmpi ~]# systemctl enable docker.service
-
Reboot
[root@alarmpi ~]# reboot