安装步骤 官网wiki
Start fdisk to partition the SD card:
1
fdisk /dev/sdX
At the fdisk prompt, delete old partitions and create a new one:
- Type o. This will clear out any partitions on the drive.
- Type p to list partitions. There should be no partitions left.
- Type n, then p for primary, 1 for the first partition on the drive, press ENTER to accept the default first sector, then type +100M for the last sector.
- Type t, then c to set the first partition to type W95 FAT32 (LBA).
- Type n, then p for primary, 2 for the second partition on the drive, and then press ENTER twice to accept the default first and last sector.
- Write the partition table and exit by typing w.
Create and mount the FAT filesystem:
1
2
3mkfs.vfat /dev/sdX1
mkdir boot
mount /dev/sdX1 bootCreate and mount the ext4 filesystem:
1
2
3mkfs.ext4 /dev/sdX2
mkdir root
mount /dev/sdX2 rootDownload and extract the root filesystem (as root, not via sudo):
1
2
3
4
5这种方法下载的是2代的固件是32的,可能无法发挥cpu的全部性能,换到下面的连接可以安装专门为pi3编译的64位架构固件:)但是换成64的固件之后会有另外一个问题就是pi3自带的蓝牙&wifi模块是找不到驱动的
wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz
http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-3-latest.tar.gz
bsdtar -xpf ArchLinuxARM-rpi-2-latest.tar.gz -C root
syncMove boot files to the first partition:
1
mv root/boot/* boot
Unmount the two partitions:
1
umount boot root
Insert the SD card into the Raspberry Pi, connect ethernet, and apply 5V power.
Use the serial console or SSH to the IP address given to the board by your router.
- Login as the default user alarm with the password alarm.
- The default root password is root.
关于第五步使用两个镜像的区别已经简要说明了这里贴一下原文:
Ive just loaded the latest arch image on one of my Pi3’s and have the same problem. Currently wifi works using a USB dongle but not the onboard wifi.
EDIT:
Just reposting here in case someone else finds this thread. The current RPi3 image is using the 64bit kernel, as yet there is no driver available for the on board Wifi or Bluetooth using this kenel. The driver is provided by Broadcom and currently they haven’t released it. In the mean time the RPi2 image can be used as that is still using the 32bit kernel.
See: https://archlinuxarm.org/forum/viewtopic.php?f=65&t=11158
初始化工作
首先是使用alarm用户名alarm密码登陆系统
使用su切换为root,密码为root(之所以使用切换是因为默认禁止root远程登录,建议登陆之后)
u对于使用的pi3 64位的用户来说archlinux是没有wifi模块支持的 : (
如果使用的是32位image wifi的配置方式如下
The deprecated
netcfg
used/etc/network.d/
to store profiles. The successor ofnetcfg
isnetctl
.In order to setup a wireless network, install
netctl
usingsudo pacman -S netctl
. Next, you have to create a network profile./etc/netctl/examples/
contains some examples. Let’s assume you want to setup a WPA2-PSK network. Simply copy over the example file and start editing:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17/etc/netctl# install -m640 examples/wireless-wpa wireless-home
/etc/netctl# cat wireless-home
Description='A simple WPA encrypted wireless connection'
Interface=wlan0
Connection=wireless
Security=wpa
IP=dhcp
ESSID='MyNetwork'
# Prepend hexadecimal keys with \"
# If your key starts with ", write it as '""<key>"'
# See also: the section on special quoting rules in netctl.profile(5)
Key='WirelessKey'
# Uncomment this if your ssid is hidden
#Hidden=yesEdit
MyNetwork
andWirelessKey
as needed. Note the640
permissions, you do not want to leak your wireless passphrase to the world!Proceed with testing:
1
2# netctl start wireless-home
If you do not get an error, you should be connected. Let’s test this:
1
2$ ping 8.8.8.8
To make this network start on boot:
1
2# netctl enable wireless-home
需要修改镜像地址不然的话巨慢,有如下几种方式:
- /etc/pacman.conf下面新增[archlinuxcn]/nServer = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
- 修改/etc/pacman.d/mirrorlist Server = http://mirrors.163.com/archlinuxarm/$arch/$repo 主要是将海外的镜像源修改为网易的镜像地址
同步pacman仓库信息 pacman -Syy && pacman -Syu S表示同步远端package,yy表示强制刷新package databases,之后的u是为了升级过时的包,如果跳过这一步可能的后果就是本地数据与远端数据不一致,例如本地显示rsync 为1.1版本而镜像地址为1.2这样就会打印出找不到这个包的错误
以下为我首先安装的包
- git vim htop tmux bash-completion netcat samba go
一些文档
- archlinux 树莓派wiki)
- archpi 包含一些可以用树莓派做的好玩的简易事情和一些faq
To be continued…
转载请注明来源链接 http://just4fun.im/2017/08/20/树莓派安装archlinux/ 尊重知识,谢谢:)