To bootstrap the OS we have to "burn" from a *nix like system the contents of a
decompressed *.tar.gz file to an
SD card. For the Raspberry Pi there exists two releases both for the older
B/B+
model and the newer
2nd
edition B model. You need also either a built-in (/dev/mmcblk_)
or USB card reader (/dev/sd_) for writing to the SD card. Replace
the underscore (_) with the number/letter that has been assigned to
your card reader, ie. check for example the output of dmesg.
sudo umount /media/$USER/* or sudo umount /mnt/*.
sudo bash.
touch disk.layout and insert the
content from below.
sfdisk --force /dev/mmcblk_ < disk.layout or
sfdisk --force /dev/sd_ < disk.layout.
mkfs.vfat /dev/mmcblk_p1 or mkfs.vfat /dev/sd_1.
mkfs.ext4 /dev/mmcblk_p2 or mkfs.ext4 /dev/sd_2.
mkdir boot root.
mount /dev/mmcblk_p1 boot or
mount /dev/sd_1 boot.
mount /dev/mmcblk_p2 root or
mount /dev/sd_2 root.
wget http://archlinuxarm.org/os/ArchLinuxARM-rpi-latest.tar.gz or
wget http://archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz.
apt-get install bsdtar):
bsdtar -xpf ArchLinuxARM-rpi-latest.tar.gz -C root or
bsdtar -xpf ArchLinuxARM-rpi-2-latest.tar.gz -C root.
sync.
mv root/boot/* boot.
umount boot root.
rmdir boot root.
After that you can remove the SD card and put it in the Raspberry Pi. To SSH to the Raspberry Pi use the default hostname alarmpi and the user root with password root.
Content of disk.layout file
# Partition table generated from /dev/mmcblk0
unit: sectors
: start= 8192, size= 196608, Id= c
: start= 204800, size= , Id=83
After a successful boot of the Raspberry Pi you can either attach a keyboard and
a display or ssh to it (ssh root@alarmpi).
pacman -Syu --noconfirm.
pacman -S sudo --noconfirm.
timedatectl set-timezone Europe/Rome.
useradd -m -G wheel -s /bin/bash USERNAME.
echo "root:PASSWORD" | chpasswd and
echo "USERNAME:PASSWORD" | chpasswd.
nano /etc/sudoers and remove the comment
tag # on the line before the
%wheel ALL=(ALL) NOPASSWD: ALL string. Save and exit by pressing
CTRL+O, CTRL+X.
hostnamectl set-hostname HOSTNAME.
reboot command.
After that the Raspberry Pi is reachable via SSH under
ssh root@HOSTNAME and ssh USERNAME@HOSTNAME with the
modified passwords.