-
Notifications
You must be signed in to change notification settings - Fork 0
Raspberry Pi 3
These are the steps to follow in order to get the full BlackoutPedia installation running on the Raspberry Pi 3
- Basic arch linux installation
- Copy pre-populated index directory
- Configure access point
- BlackoutPedia installation
- You have a Linux based PC that has a SD card reader
- The PC is connected to your home network
- The Raspberry Pi can be connected to the same home network by its wired
eth0
interface - You have a power supply for the Pi
- You have a Micro SD card ready with a minimum size of
64GB
- You can become
root
user on the PC - Your PC has internet access
- You understand the above
At the time of writing I decided to use 32-bit arch linux, since it perfectly installs headless (we need no screen or keyboard connected to the Raspberry and can work with the Raspberry through ssh), it is lean and supports all aspect of the Pi's hardware that we need.
First thing is to attach the SD card to the PC and created a partition setup. The following table explains the partitions we want to setup
Partition | Type | Size | Purpose |
---|---|---|---|
1 | W95 FAT32 (LBA) | 100 MB | Boot partition |
2 | Linux | 10 GB | Root parition for arch linux |
3 | Linux | Rest | Data partition, where we hold the index directory |
The reason for having the third data partition is so that we can replace the arch linux installation itself independent of the data that is used by BlackoutPedia
As user root
run
fdisk /dev/mmcblk0
Now create a fresh DOS partition table, by typing o
Create the first partition and set the correct type
np 1 Enter +100M
t c
Now create the remaining two paritions
np 2 Enter +10G
np 3 Enter Enter
Finally save the partitioning to the SD card by typing w
Then create the file systems on the partitions and mount the first two partitions
mkfs.vfat /dev/mmcblk0p1
mkfs.ext4 /dev/mmcblk0p2
mkfs.ext4 /dev/mmcblk0p3
mkdir boot
mkdir root
mount /dev/mmcblk0p1 boot
mount /dev/mmcblk0p2 root
Download the arch linux distribution. Make sure you use the 32-bit one, since at the time of writing, the wifi driver for the Raspberry Pi was not available for the 64-bit version. Once downloaded extract arch linux
wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz
bsdtar -xpf ArchLinuxARM-rpi-2-latest.tar.gz -C root
Finally move the boot content to the boot partition and unmount everything
mv root/boot/* boot
umount boot root
mkdir data
mount /dev/mmcblk0p3 data
cp -r 201708_dewiki data
umount data
Boot Raspberry Pi and update
ssh alarm@1.2.3.4
pacman -Syu
Install create_ap
pacman -S create_ap
create_ap -n wlan0 BlackoutPedia
systemctl start create_ap
systemctl enable create_ap