准备工作
1、下载镜像压缩包,解压成 img
2、准备一张 sd 卡,读卡器
3、orangepi 或 bananapi 或树莓派等 arm 开发板
烧制系统到sd卡
本例将介绍在 linux 系统下。
xiao@xiao-desktop cd /dev
xiao@xiao-desktop ls
ls 命令,记录未插入 sd 卡前,dev 目录下的文件。然后再将 sd 卡放入读卡器插上电脑的 usb 插口,
再 ls 命令,对比发现 sd 卡,例如本例发现 dev 目录下多了: sdc、sdc1、sdc2 三个文件。
或用 fdisk -l 命令,找到 sd 卡。
清除 sd 卡分区,重新建分区:
xiao@xiao-desktop /dev $ sudo umount /dev/sdc*
xiao@xiao-desktop /dev $ sudo fdisk /dev/sdc
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
////////清除所有分区
Command (m for help): o
Created a new DOS disklabel with disk identifier 0xf22376e6.
////////查看分区,分区已被清除
Command (m for help): p
Disk /dev/sdd: 30 GiB, 32220643328 bytes, 62930944 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: 0xf22376e6
////////新建分区
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-62930943, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-62930943, default 62930943):
Created a new partition 1 of type 'Linux' and of size 30 GiB.
////////保存修改
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
格式化 sd 卡:
xiao@xiao-desktop /dev $ sudo mkfs.vfat /dev/sdc1
写入镜像:
……