Raspberry Pi 3 B+安装Arch Linux ARM
最近不知道怎么回事,一直有把笔记本系统更换为Arch Linux的骚动,无奈笔记本中工作资料比较多,未能实现该想法。不过内心的骚动还是要小小的满足一下滴,祭出吃灰的Raspberry Pi 3 Model B+先感受一下Arch魅力。
准备
- Raspberry Pi 3 B+
- 内存卡32G及读卡器
- Arch Linux ARM系统包
- 网线
安装
为了让每个人都能够安装本篇文章安装成功,我先在虚拟机里安装Arch Linux,感受一下Arch Linux的安装过程,以下操作都在虚拟机中进行,屏蔽了Windows/macOS/Linux系统带来的差异。
分区
内存卡连接至虚拟机,lsblk
查看内存卡盘符,fdisk /dev/sdx
格式化内存卡
可以看到sdb
是我的内存卡,有sdb1、sdb2
是由于之前安装都系统了。
本次使用到的fdisk
操作,更多查看Linux命令大全https://man.linuxde.net/fdisk
p
列出分区
o
创建DOS分区表
n
创建新分区
t -> 1 -> c
设置分区1的类型为W95 FAT32 (LBA)
w
写入保存分区并退出
下面开始分区
[root@archlinux ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.36).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): m
Help:
DOS (MBR)
a toggle a bootable flag
b edit nested BSD disklabel
c toggle the dos compatibility flag
Generic
d delete a partition
F list free unpartitioned space
l list known partition types
n add a new partition
p print the partition table
t change a partition type
v verify the partition table
i print information about a partition
Misc
m print this menu
u change display/entry units
x extra functionality (experts only)
Script
I load disk layout from sfdisk script file
O dump disk layout to sfdisk script file
Save & Exit
w write table to disk and exit
q quit without saving changes
Create a new label
g create a new empty GPT partition table
G create a new empty SGI (IRIX) partition table
o create a new empty DOS partition table
s create a new empty Sun partition table
Command (m for help): o
Created a new DOS disklabel with disk identifier 0x813d368b.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p):
Using default response p.
Partition number (1-4, default 1):
First sector (2048-62333951, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-62333951, default 62333951): +1G
Created a new partition 1 of t